cockpit/tests/run-test.sh
2020-04-28 16:29:07 +02:00

50 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
set -eux
# tests need cockpit's bots/ libraries
cd "$SOURCE"
git clone --depth=1 https://github.com/cockpit-project/bots
# pre-download cirros image for Machines tests
bots/image-download cirros
# only install a subset to save time/space
npm install axe-core chrome-remote-interface sizzle
. /etc/os-release
export TEST_OS="${ID}-${VERSION_ID/./-}"
# HACK: upstream does not yet know about fedora rawhide
if [ "$TEST_OS" = "fedora-33" ]; then
export TEST_OS=fedora-32
fi
RC=0
# some tests are still too unstable: testCreate,testAddDisk,testDetachDisk,testNICAdd,testLibvirt,NetworkSettings
test/verify/check-machines-dbus -tv --machine localhost:22 --browser localhost:9090 \
TestMachinesDBus.test{Basic,VCPU,MultipleSettings,BootOrder} \
TestMachinesDBus.test{InlineConsole,ExternalConsole,SerialConsole} \
TestMachinesDBus.test{StoragePools,StoragePoolsCreate,VmNICs} || RC=$?
# TestFirewall.testNetworkingPage is still too unstable
test/verify/check-networking-firewall -tv --machine localhost:22 --browser localhost:9090 \
TestFirewall.test{AddCustomServices,AddServices,FirewallPage,MultipleZones} || RC=$?
# 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=$?
# check-menu is not @nondestructive yet, keep it last
for t in accounts \
login \
networking-basic \
sosreport storage-basic \
storage-ignored \
storage-partitions \
storage-used storage-lvm2 \
menu; do
test/verify/check-$t -tv --machine localhost:22 --browser localhost:9090 || RC=$?
done
echo $RC > "$LOGS/exitcode"
cp --verbose Test* "$LOGS" || true
# deliver test result via exitcode file
exit 0