tar-testsuite: sync with RHEL
This commit is contained in:
parent
36025b31b5
commit
9bd9d9bd3b
2 changed files with 30 additions and 10 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue