tests: Use run-tests

This provides retries on flakes, integrates tests-policy for known
issues, and outputs proper TAP format.

Once we work out the remaining kinks (unstable tests and proper test
class names), it will also be much shorter.
This commit is contained in:
Martin Pitt 2020-05-28 18:34:54 +02:00
parent b6bc45dfef
commit ecd7b62189

View File

@ -32,41 +32,52 @@ if [ "$TEST_OS" = "fedora-33" ]; then
export TEST_OS=fedora-32 export TEST_OS=fedora-32
fi fi
RC=0
# select tests
TESTS=""
RC=0
if [ -n "$test_optional" ]; then if [ -n "$test_optional" ]; then
# some tests are still too unstable: testCreate,testNetworkSettings,testVmNICs # some tests are still too unstable: testCreate,testNetworkSettings,testVmNICs
# testAddDisk triggers SELinux violation # testAddDisk triggers SELinux violation
test/verify/check-machines -tv --machine localhost:22 --browser localhost:9090 \ TESTS="$TESTS
TestMachines.test{Basic,VCPU,MultipleSettings,BootOrder,Libvirt} \ TestMachines.test{Basic,VCPU,MultipleSettings,BootOrder,Libvirt}
TestMachines.testDetachDisk \ TestMachines.testDetachDisk
TestMachines.test{InlineConsole,ExternalConsole,SerialConsole} \ TestMachines.test{InlineConsole,ExternalConsole,SerialConsole}
TestMachines.test{StoragePools,StoragePoolsCreate,NICAdd} || RC=$? TestMachines.test{StoragePools,StoragePoolsCreate,NICAdd}"
# not all classes are nondestructive, and we can't run rebooting tests # not all classes are nondestructive, and we can't run rebooting tests
test/verify/check-packagekit -tv --machine localhost:22 --browser localhost:9090 TestUpdates.test{Basic,SecurityOnly} TestAutoUpdates || RC=$? TESTS="$TESTS
TestUpdates.test{Basic,SecurityOnly}
TestAutoUpdates"
# FIXME: storage test classes are all called TestStorage, doesn't work with run-tests selection
for t in storage-basic \ for t in storage-basic \
storage-ignored \ storage-ignored \
storage-partitions \ storage-partitions \
storage-used storage-lvm2; do storage-used \
storage-lvm2; do
test/verify/check-$t -tv --machine localhost:22 --browser localhost:9090 || RC=$? test/verify/check-$t -tv --machine localhost:22 --browser localhost:9090 || RC=$?
done done
fi fi
if [ -n "$test_basic" ]; then if [ -n "$test_basic" ]; then
# TestFirewall.testNetworkingPage is still too unstable # TestFirewall.testNetworkingPage is still too unstable
test/verify/check-networking-firewall -tv --machine localhost:22 --browser localhost:9090 \ TESTS="$TESTS TestFirewall.test{AddCustomServices,AddServices,FirewallPage,MultipleZones}"
TestFirewall.test{AddCustomServices,AddServices,FirewallPage,MultipleZones} || RC=$?
# check-menu is not @nondestructive yet, keep it last TESTS="$TESTS
for t in accounts \ TestAccounts
login \ TestLogin
networking-basic \ TestNetworking
sosreport \ TestSOS"
menu; do fi
test/verify/check-$t -tv --machine localhost:22 --browser localhost:9090 || RC=$?
done # execute run-tests
test/common/run-tests --test-dir test/verify --trace --verbose --nondestructive \
--machine localhost:22 --browser localhost:9090 $TESTS || RC=$?
# check-menu is not @nondestructive yet, keep it last
if [ -n "$test_basic" ]; then
test/verify/check-menu -tv --machine localhost:22 --browser localhost:9090 || RC=$?
fi fi
echo $RC > "$LOGS/exitcode" echo $RC > "$LOGS/exitcode"