diff --git a/tests/README b/tests/README deleted file mode 100644 index 088f40c..0000000 --- a/tests/README +++ /dev/null @@ -1 +0,0 @@ -WORKING ON: Please don't migrate to dist-git diff --git a/tests/inventory b/tests/inventory deleted file mode 100644 index 6238138..0000000 --- a/tests/inventory +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -export TEST_DOCKER_EXTRA_ARGS="--security-opt seccomp:unconfined" -exec merge-standard-inventory "$@" diff --git a/tests/selftest/PURPOSE b/tests/selftest/PURPOSE deleted file mode 100644 index 9d47bfd..0000000 --- a/tests/selftest/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/patch/Sanity/selftest -Description: Executes upstream test suite -Author: Miroslav Vadkerti diff --git a/tests/tests.yml b/tests/tests.yml index 204700a..14e25c9 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -1,14 +1,14 @@ --- -# This first play always runs on the local staging system +# Run tests in all contexts - hosts: localhost + tags: + - classic roles: - role: standard-test-beakerlib - tags: - - classic tests: - Cannot-handle-file-names-with-integrated-spaces - Regression-wrong-name-used-when-adding-new-file - - selftest + - upstream-test-suite required_packages: - patch - expect diff --git a/tests/selftest/Makefile b/tests/upstream-test-suite/Makefile similarity index 86% rename from tests/selftest/Makefile rename to tests/upstream-test-suite/Makefile index 6968848..b986459 100644 --- a/tests/selftest/Makefile +++ b/tests/upstream-test-suite/Makefile @@ -1,12 +1,13 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Makefile of /CoreOS/patch/Sanity/selftest -# Description: Executes upstream test suite +# Makefile of /CoreOS/patch/Sanity/upstream-test-suite +# Description: tests upstream test suite # Author: Miroslav Vadkerti +# Author: Than Ngo # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # -# Copyright (c) 2010 Red Hat, Inc. All rights reserved. +# Copyright (c) 2019 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing # to use, modify, copy, or redistribute it subject to the terms @@ -24,7 +25,7 @@ # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -export TEST=/CoreOS/patch/Sanity/selftest +export TEST=/CoreOS/patch/Sanity/upstream-test-suite export TESTVERSION=1.0 BUILT_FILES= @@ -59,6 +60,6 @@ $(METADATA): Makefile @echo "License: GPLv2" >> $(METADATA) @echo "Confidential: no" >> $(METADATA) @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) rhts-lint $(METADATA) diff --git a/tests/upstream-test-suite/PURPOSE b/tests/upstream-test-suite/PURPOSE new file mode 100644 index 0000000..c32af1d --- /dev/null +++ b/tests/upstream-test-suite/PURPOSE @@ -0,0 +1,7 @@ +PURPOSE of /CoreOS/patch/Sanity/upstream-test-suite +Description: Tests upstream test suite +Author: Miroslav Vadkerti + +tests following scenarios: + * download source rpm and build + * use the system patch to run the upstream test suite diff --git a/tests/selftest/runtest.sh b/tests/upstream-test-suite/runtest.sh similarity index 87% rename from tests/selftest/runtest.sh rename to tests/upstream-test-suite/runtest.sh index 1e8bb6d..fcec6c8 100755 --- a/tests/selftest/runtest.sh +++ b/tests/upstream-test-suite/runtest.sh @@ -40,15 +40,17 @@ if [[ $TARGET != "" ]]; then TARGET="--target `uname -m`"; fi TOPDIR=`mktemp -d` SPEC="$TOPDIR/SPECS/$PACKAGE*.spec" TESTDIR="$TOPDIR/BUILD/$UPSTREAMPKG/" +PATCH=/usr/bin/patch rlJournalStart - rlPhaseStartSetup - for PKG in $PACKAGES; do - rlAssertRpm $PKG - done - rlPhaseEnd + rlPhaseStartSetup + for PKG in $PACKAGES; do + rlAssertRpm $PKG + done + rlPhaseEnd - rlPhaseStartTest + rlPhaseStartTest + rlAssertExists $PATCH rlFetchSrcForInstalled $PACKAGE rlRun "rpm -ivh --define '_topdir $TOPDIR' $PACKAGE*.src.rpm" 0 "Installing $PACKAGE src rpm" echo "+ Building $PACKAGE (Log: $BUILDLOG)" @@ -60,16 +62,16 @@ rlJournalStart rlRun "cd $TESTDIR" rlRun "make check &> $TESTLOG" cat $TESTLOG - if rlIsRHEL 6; then - rlAssertGrep 'All tests succeeded!' $TESTLOG - else - rlAssertNotGrep "FAILED" $TESTLOG - fi - rlPhaseEnd + if rlIsRHEL 6; then + rlAssertGrep 'All tests succeeded!' $TESTLOG + else + rlAssertNotGrep "^FAIL:" $TESTLOG + fi + rlPhaseEnd - rlPhaseStartCleanup - rlRun "popd" + rlPhaseStartCleanup + rlRun "popd" rlRun "rm -rf $PACKAGE*.src.rpm" 0 "Removing source rpm" - rlPhaseEnd + rlPhaseEnd rlJournalPrintText rlJournalEnd