2020-04-06 18:32:16 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -eux
|
|
|
|
|
2020-06-15 05:43:19 +00:00
|
|
|
cd "$SOURCE"
|
|
|
|
|
2020-05-15 11:37:09 +00:00
|
|
|
. /etc/os-release
|
2020-05-30 10:41:30 +00:00
|
|
|
test_optional=
|
|
|
|
test_basic=
|
2020-05-15 11:37:09 +00:00
|
|
|
|
2020-06-15 05:43:19 +00:00
|
|
|
if ls ../cockpit-appstream* 1> /dev/null 2>&1; then
|
2020-05-15 11:37:09 +00:00
|
|
|
test_optional=1
|
|
|
|
else
|
|
|
|
test_basic=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$ID" = "fedora" ]; then
|
|
|
|
test_basic=1
|
|
|
|
test_optional=1
|
|
|
|
fi
|
|
|
|
|
2020-04-06 18:32:16 +00:00
|
|
|
# tests need cockpit's bots/ libraries
|
|
|
|
git clone --depth=1 https://github.com/cockpit-project/bots
|
2020-05-15 11:37:09 +00:00
|
|
|
|
2020-04-27 16:09:06 +00:00
|
|
|
export TEST_OS="${ID}-${VERSION_ID/./-}"
|
2020-09-02 14:47:28 +00:00
|
|
|
# HACK: upstream does not yet know about rawhide
|
|
|
|
if [ "$TEST_OS" = "fedora-34" ]; then
|
|
|
|
export TEST_OS=fedora-33
|
2020-04-27 16:09:06 +00:00
|
|
|
fi
|
2020-04-06 18:32:16 +00:00
|
|
|
|
2020-06-14 20:48:42 +00:00
|
|
|
# HACK: CI hits this selinux denial. Unrelated to our tests.
|
2020-06-15 11:39:42 +00:00
|
|
|
export TEST_ALLOW_JOURNAL_MESSAGES=".*Permission denied:.*/var/cache/app-info/xmls.*"
|
2020-04-06 18:32:16 +00:00
|
|
|
|
2020-05-28 16:34:54 +00:00
|
|
|
# select tests
|
|
|
|
TESTS=""
|
2020-06-15 08:33:34 +00:00
|
|
|
EXCLUDES=""
|
2020-05-28 16:34:54 +00:00
|
|
|
RC=0
|
2020-05-15 11:37:09 +00:00
|
|
|
if [ -n "$test_optional" ]; then
|
2020-06-14 14:13:00 +00:00
|
|
|
# pre-download cirros image for Machines tests
|
|
|
|
bots/image-download cirros
|
|
|
|
|
2021-01-22 15:35:56 +00:00
|
|
|
# triggers SELinux violation
|
|
|
|
# See journal: SELinux is preventing /usr/libexec/qemu-kvm from open access on the file /var/lib/cockpittest/nfs_pool/nfs-volume-0.
|
|
|
|
EXCLUDES="$EXCLUDES TestMachinesDisks.testAddDiskNFS"
|
2020-06-16 07:44:40 +00:00
|
|
|
# not investigated yet
|
|
|
|
EXCLUDES="$EXCLUDES
|
2021-01-22 15:35:56 +00:00
|
|
|
TestAutoUpdates.testPrivilegeChange"
|
2020-06-15 13:06:29 +00:00
|
|
|
|
2020-06-15 08:33:34 +00:00
|
|
|
# TestUpdates: we can't run rebooting tests
|
2020-05-28 16:34:54 +00:00
|
|
|
TESTS="$TESTS
|
2020-06-14 14:13:00 +00:00
|
|
|
TestAutoUpdates
|
2020-06-15 08:33:34 +00:00
|
|
|
TestMachines
|
|
|
|
TestStorage
|
|
|
|
TestUpdates.testBasic
|
|
|
|
TestUpdates.testSecurityOnly"
|
2020-05-15 11:37:09 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "$test_basic" ]; then
|
2020-06-15 08:33:34 +00:00
|
|
|
# still too unstable
|
|
|
|
EXCLUDES="$EXCLUDES TestFirewall.testNetworkingPage"
|
2020-05-28 16:34:54 +00:00
|
|
|
|
2020-06-15 11:48:52 +00:00
|
|
|
# TODO: fix for CI environment
|
|
|
|
EXCLUDES="$EXCLUDES TestLogin.testTally"
|
2020-06-15 12:45:52 +00:00
|
|
|
EXCLUDES="$EXCLUDES TestAccounts.testBasic"
|
2020-06-15 11:48:52 +00:00
|
|
|
|
2020-06-25 06:32:07 +00:00
|
|
|
# PCI devices list is not predictable
|
|
|
|
EXCLUDES="$EXCLUDES TestSystemInfo.testHardwareInfo"
|
|
|
|
|
|
|
|
# Known issue #1008
|
|
|
|
EXCLUDES="$EXCLUDES TestTuned.testBasic"
|
|
|
|
|
2020-05-28 16:34:54 +00:00
|
|
|
TESTS="$TESTS
|
|
|
|
TestAccounts
|
2020-06-16 05:50:34 +00:00
|
|
|
TestBonding
|
|
|
|
TestBridge
|
2020-06-15 08:33:34 +00:00
|
|
|
TestFirewall
|
2020-06-25 06:32:07 +00:00
|
|
|
TestKdump
|
2020-06-15 08:33:34 +00:00
|
|
|
TestLogin
|
2020-05-28 16:34:54 +00:00
|
|
|
TestNetworking
|
2020-06-16 05:50:34 +00:00
|
|
|
TestServices
|
|
|
|
TestSOS
|
|
|
|
TestSystemInfo
|
|
|
|
TestTeam
|
|
|
|
TestTerminal
|
|
|
|
TestTuned
|
|
|
|
"
|
2020-05-28 16:34:54 +00:00
|
|
|
fi
|
|
|
|
|
2020-06-15 08:33:34 +00:00
|
|
|
exclude_options=""
|
|
|
|
for t in $EXCLUDES; do
|
|
|
|
exclude_options="$exclude_options --exclude $t"
|
|
|
|
done
|
|
|
|
|
2020-05-28 16:34:54 +00:00
|
|
|
# execute run-tests
|
2020-06-15 08:33:34 +00:00
|
|
|
test/common/run-tests --test-dir test/verify --trace --verbose --nondestructive $exclude_options \
|
2020-05-28 16:34:54 +00:00
|
|
|
--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=$?
|
2020-05-15 11:37:09 +00:00
|
|
|
fi
|
2020-04-06 18:32:16 +00:00
|
|
|
|
2020-04-27 16:09:06 +00:00
|
|
|
echo $RC > "$LOGS/exitcode"
|
|
|
|
cp --verbose Test* "$LOGS" || true
|
|
|
|
# deliver test result via exitcode file
|
|
|
|
exit 0
|