Commit 196d0b8 Initial checkin for upstream inclusion

2 files Merged and Committed by rasibley a year ago
Initial checkin for upstream inclusion

    
 1 @@ -0,0 +1,15 @@
 2 + ---
 3 + # This first play always runs on the local staging system
 4 + - hosts: localhost
 5 +   roles:
 6 +   - role: standard-test-basic
 7 +     tags:
 8 +     - classic
 9 +     tests:
10 +     - upstream-testset
11 +     required_packages:
12 +     - python3-dbus
13 +     - rpm-build    
14 +     - gcc 
15 +     - wget
16 +     - make
 1 @@ -0,0 +1,55 @@
 2 + #!/bin/bash -x
 3 + 
 4 + # Copyright (c) 2015 Red Hat, Inc. All rights reserved. This copyrighted material
 5 + # is made available to anyone wishing to use, modify, copy, or
 6 + # redistribute it subject to the terms and conditions of the GNU General
 7 + # Public License v.2.
 8 + #
 9 + # This program is distributed in the hope that it will be useful, but WITHOUT ANY
10 + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 + # PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 + #
13 + # You should have received a copy of the GNU General Public License
14 + # along with this program; if not, write to the Free Software
15 + # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 + #
17 + # Author: Vladimir Benes <vbenes@redhat.com>
18 + 
19 + PKG=dbus-python
20 + PKG_DIR=$2
21 + if [ -z "$PKG_DIR" ]; then
22 +   PKG_DIR=$1
23 + fi
24 + 
25 + RPMBUILD=$(rpm --eval '%{_topdir}')
26 + LOG="/tmp/$TEST.log"
27 + PKG_SRPM=$(rpm -q --qf '%{SOURCERPM}\n' python3-dbus | head -n1)
28 + PKG_PATH=$(rpm -q --qf '%{VERSION}/%{RELEASE}\n' python3-dbus | head -n1)
29 + PKG_BUILD_PATH=$(rpm -q --qf "$PKG_DIR-%{VERSION}\n" $PKG | head -n1)
30 + 
31 + echo "Downloading SRPM"
32 + wget https://kojipkgs.fedoraproject.org/packages/$PKG/$PKG_PATH/src/$PKG_SRPM
33 + rm -rf $RPMBUILD
34 + rpm -ivf $PKG_SRPM
35 + echo "Building dependencies"
36 + dnf builddep -y $PKG_SRPM
37 + echo "Rebuilding the package"
38 + rpmbuild -bc $RPMBUILD/SPECS/$PKG.spec
39 + echo "Running make check"
40 + cd $RPMBUILD/BUILD/$PKG*
41 + ./configure
42 + make check | tee -a $LOG
43 + rc=$?
44 + RESULT=FAIL
45 + 
46 + if [ $rc -eq 0 ]; then
47 +   RESULT="PASS"
48 + fi
49 + 
50 + if which rhts-report-result &> /dev/null; then
51 +    rhts-report-result $TEST $RESULT $LOG
52 + fi
53 + 
54 + exit $rc
55 + echo "Result is: $RESULT"
56 + rm $LOG