From 9bd9d9bd3b60656855975c287c9c173878f2d57c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mar 14 2019 13:17:21 +0000 Subject: tar-testsuite: sync with RHEL --- diff --git a/Regression/tar-testsuite/Makefile b/Regression/tar-testsuite/Makefile index f4fe8b5..4bac91a 100644 --- a/Regression/tar-testsuite/Makefile +++ b/Regression/tar-testsuite/Makefile @@ -54,7 +54,8 @@ $(METADATA): Makefile @echo "Type: Regression" >> $(METADATA) @echo "TestTime: 120m" >> $(METADATA) @echo "RunFor: tar" >> $(METADATA) - @echo "Requires: tar rpm-build gcc dnf-plugins-core yum-utils" >> $(METADATA) + @echo "Requires: tar attr rpm-build gcc dnf-plugins-core yum-utils rsh" >> $(METADATA) + @echo "Requires: autoconf automake gettext texinfo libacl-devel policycoreutils" >> $(METADATA) # temporary: https://bugzilla.redhat.com/show_bug.cgi?id=1643588 @echo "Requires: wget" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) diff --git a/Regression/tar-testsuite/runtest.sh b/Regression/tar-testsuite/runtest.sh index 835a9cb..c2acfee 100755 --- a/Regression/tar-testsuite/runtest.sh +++ b/Regression/tar-testsuite/runtest.sh @@ -33,21 +33,40 @@ PACKAGE="tar" TESTUSER="tar-testsuite" +if rlIsRHEL '>7'; then + DISABLE_TESTS="filerem01" +fi + +testsuite_flags= +if test -n "$DISABLE_TESTS"; then + testsuite_flags="-k " + for the_test in $DISABLE_TESTS; do + testsuite_flags="$testsuite_flags!$the_test," + done +fi + install_build_deps() { - if rlIsFedora || rlIsRHEL '>7'; then + if rlIsFedora; then rlRun "dnf -y builddep $*" - else - # WARNING: yum-builddep doesn't work on RHEL5 as we would expect from - # modern RHEL/Fedora distributions. Only "package names" are accepted, - # not SRPMs or SPEC files. On RHEL6 this seems to work fine with SRPMs - # only. - rlRun "yum-builddep -y $*" + elif rlIsRHEL; then + packages="libacl-devel libselinux-devel" + if rlIsRHEL '>7'; then + # TODO: remove once 'texinfo' is in AppStream + packages+=" texinfo" + # TODO: rmove once we have CRB available + enable_repo="--enablerepo rhel-CRB" + if grep -rq beaker-CRB /etc/yum.repos.d/; then + enable_repo="--enablerepo beaker-CRB" + fi + fi + yum $enable_repo -y install $packages fi } rlJournalStart rlPhaseStartSetup + test -n "$testsuite_flags" && rlLog "using special testsuite flags: $testsuite_flags" rlAssertRpm $PACKAGE rlRun "useradd $TESTUSER" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" @@ -97,7 +116,7 @@ rlJournalStart # Starting testsuite (as regular user) rlLog "Starting testsuite!" # we need 'make check' to build tools like 'genfile', etc. - rlRun -s "su $TESTUSER -c \"cd $BUILDDIR && make check\"" + rlRun -s "su $TESTUSER -c \"cd $BUILDDIR && make check TESTSUITEFLAGS='$testsuite_flags'\"" rlRun "mv $rlRun_LOG $TmpDir/testsuite.log" print_stats () @@ -119,7 +138,7 @@ rlJournalStart rlLog "Starting ROOT testsuite!" # make check is not needed anymore - rlRun -s "cd $BUILDDIR/tests && ./testsuite" + rlRun -s "cd $BUILDDIR/tests && ./testsuite $testsuite_flags" rlRun "mv $rlRun_LOG $TmpDir/testsuite_root.log" print_stats "$TmpDir/testsuite_root.log"