Commit 2ddeb05 Initial checking for upstream inclusion

4 files Merged and Committed by rasibley 2 years ago
Initial checking for upstream inclusion

    
 1 @@ -0,0 +1,64 @@
 2 + [root@localhost internal-testsuite]# cat Makefile 
 3 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 4 + #
 5 + #   Makefile of /tools/libmpc/Regression/internal-testsuite
 6 + #   Description: internal-testsuite
 7 + #   Author: Martin Coufal <mcoufal@redhat.com>
 8 + #
 9 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 + #
11 + #   Copyright (c) 2016 Red Hat, Inc.
12 + #
13 + #   This program is free software: you can redistribute it and/or
14 + #   modify it under the terms of the GNU General Public License as
15 + #   published by the Free Software Foundation, either version 2 of
16 + #   the License, or (at your option) any later version.
17 + #
18 + #   This program is distributed in the hope that it will be
19 + #   useful, but WITHOUT ANY WARRANTY; without even the implied
20 + #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
21 + #   PURPOSE.  See the GNU General Public License for more details.
22 + #
23 + #   You should have received a copy of the GNU General Public License
24 + #   along with this program. If not, see http://www.gnu.org/licenses/.
25 + #
26 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 + 
28 + export TEST=/tools/libmpc/Regression/internal-testsuite
29 + export TESTVERSION=1.0
30 + 
31 + BUILT_FILES=
32 + 
33 + FILES=$(METADATA) runtest.sh Makefile PURPOSE
34 + 
35 + .PHONY: all install download clean
36 + 
37 + run: $(FILES) build
38 + »       ./runtest.sh
39 + 
40 + build: $(BUILT_FILES)
41 + »       test -x runtest.sh || chmod a+x runtest.sh
42 + 
43 + clean:
44 + »       rm -f *~ $(BUILT_FILES)
45 + 
46 + 
47 + include /usr/share/rhts/lib/rhts-make.include
48 + 
49 + $(METADATA): Makefile
50 + »       @echo "Owner:           Martin Coufal <mcoufal@redhat.com>" > $(METADATA)
51 + »       @echo "Name:            $(TEST)" >> $(METADATA)
52 + »       @echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
53 + »       @echo "Path:            $(TEST_DIR)" >> $(METADATA)
54 + »       @echo "Description:     internal-testsuite" >> $(METADATA)
55 + »       @echo "Type:            Regression" >> $(METADATA)
56 + »       @echo "TestTime:        30m" >> $(METADATA)
57 + »       @echo "RunFor:          libmpc" >> $(METADATA)
58 + »       @echo "Requires:        libmpc gmp-devel mpfr-devel texinfo rpm-build gcc gcc-c++" >> $(METADATA)
59 + »       @echo "Priority:        Normal" >> $(METADATA)
60 + »       @echo "License:         GPLv2+" >> $(METADATA)
61 + »       @echo "Confidential:    no" >> $(METADATA)
62 + »       @echo "Destructive:     no" >> $(METADATA)
63 + »       @echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
64 + 
65 + »       rhts-lint $(METADATA)
 1 @@ -0,0 +1,60 @@
 2 + #!/bin/bash
 3 + # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
 4 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5 + #
 6 + #   runtest.sh of /tools/libmpc/Regression/internal-testsuite
 7 + #   Description: internal-testsuite
 8 + #   Author: Martin Coufal <mcoufal@redhat.com>
 9 + #
10 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 + #
12 + #   Copyright (c) 2016 Red Hat, Inc.
13 + #
14 + #   This program is free software: you can redistribute it and/or
15 + #   modify it under the terms of the GNU General Public License as
16 + #   published by the Free Software Foundation, either version 2 of
17 + #   the License, or (at your option) any later version.
18 + #
19 + #   This program is distributed in the hope that it will be
20 + #   useful, but WITHOUT ANY WARRANTY; without even the implied
21 + #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22 + #   PURPOSE.  See the GNU General Public License for more details.
23 + #
24 + #   You should have received a copy of the GNU General Public License
25 + #   along with this program. If not, see http://www.gnu.org/licenses/.
26 + #
27 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 + 
29 + # Include Beaker environment
30 + . /usr/bin/rhts-environment.sh || exit 1
31 + . /usr/share/beakerlib/beakerlib.sh || exit 1
32 + 
33 + PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' /usr/lib64/libmpc.so.3)}"
34 + export PACKAGE
35 + 
36 + rlJournalStart
37 +     rlPhaseStartSetup
38 +         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
39 +         rlRun "pushd $TmpDir"
40 + »       rlFetchSrcForInstalled $PACKAGE
41 + »       rlAssertRpm $PACKAGE
42 + »       rlRun "dnf builddep -y $PACKAGE"
43 +         rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm"
44 +         rlRun "rpmbuild --define='_topdir $TmpDir' -bc SPECS/libmpc.spec"
45 +     rlPhaseEnd
46 + 
47 +     rlPhaseStartTest
48 + »       rlRun "pushd BUILD/mpc-*"
49 +         # test
50 +         rlRun "make RUNTESTFLAGS='--tool_exec=$BIN' check |& tee $TmpDir/check.log"
51 +         rlRun "popd"
52 +         # no unexpected results should appear
53 +         rlRun "grep '^# of unexpected' check.log" 1
54 +     rlPhaseEnd
55 + 
56 +     rlPhaseStartCleanup
57 +         rlRun "popd"
58 +         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
59 +     rlPhaseEnd
60 + rlJournalPrintText
61 + rlJournalEnd
 1 @@ -0,0 +1,60 @@
 2 + #!/bin/bash
 3 + # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
 4 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 5 + #
 6 + #   runtest.sh of /tools/libmpc/Regression/internal-testsuite
 7 + #   Description: internal-testsuite
 8 + #   Author: Martin Coufal <mcoufal@redhat.com>
 9 + #
10 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 + #
12 + #   Copyright (c) 2016 Red Hat, Inc.
13 + #
14 + #   This program is free software: you can redistribute it and/or
15 + #   modify it under the terms of the GNU General Public License as
16 + #   published by the Free Software Foundation, either version 2 of
17 + #   the License, or (at your option) any later version.
18 + #
19 + #   This program is distributed in the hope that it will be
20 + #   useful, but WITHOUT ANY WARRANTY; without even the implied
21 + #   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22 + #   PURPOSE.  See the GNU General Public License for more details.
23 + #
24 + #   You should have received a copy of the GNU General Public License
25 + #   along with this program. If not, see http://www.gnu.org/licenses/.
26 + #
27 + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28 + 
29 + # Include Beaker environment
30 + . /usr/bin/rhts-environment.sh || exit 1
31 + . /usr/share/beakerlib/beakerlib.sh || exit 1
32 + 
33 + PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' /usr/lib64/libmpc.so.3)}"
34 + export PACKAGE
35 + 
36 + rlJournalStart
37 +     rlPhaseStartSetup
38 +         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
39 +         rlRun "pushd $TmpDir"
40 + »       rlFetchSrcForInstalled $PACKAGE
41 + »       rlAssertRpm $PACKAGE
42 + »       rlRun "dnf builddep -y $PACKAGE"
43 +         rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm"
44 +         rlRun "rpmbuild --define='_topdir $TmpDir' -bc SPECS/libmpc.spec"
45 +     rlPhaseEnd
46 + 
47 +     rlPhaseStartTest
48 + »       rlRun "pushd BUILD/mpc-*"
49 +         # test
50 +         rlRun "make RUNTESTFLAGS='--tool_exec=$BIN' check |& tee $TmpDir/check.log"
51 +         rlRun "popd"
52 +         # no unexpected results should appear
53 +         rlRun "grep '^# of unexpected' check.log" 1
54 +     rlPhaseEnd
55 + 
56 +     rlPhaseStartCleanup
57 +         rlRun "popd"
58 +         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
59 +     rlPhaseEnd
60 + rlJournalPrintText
61 + rlJournalEnd
 1 @@ -0,0 +1,17 @@
 2 + ---
 3 + # This first play always runs on the local staging system
 4 + - hosts: localhost
 5 +   roles:
 6 +   - role: standard-test-beakerlib
 7 +     tags:
 8 +     - classic
 9 +     tests:
10 +     - internal-testsuite
11 +     required_packages:
12 +     - libmpc
13 +     - gmp-devel
14 +     - mpfr-devel
15 +     - texinfo
16 +     - rpm-build
17 +     - gcc
18 +     - gcc-c++