f894e9dea6
These seem work fine now, especially with run-tests flake retrying. testCreatePXE() and some others will be fixed in the next upstream release. testCreate() still seems to give trouble, though.
118 lines
3.1 KiB
Bash
Executable File
118 lines
3.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eux
|
|
|
|
cd "$SOURCE"
|
|
|
|
. /etc/os-release
|
|
test_optional=
|
|
test_basic=
|
|
|
|
if ls ../cockpit-appstream* 1> /dev/null 2>&1; then
|
|
test_optional=1
|
|
else
|
|
test_basic=1
|
|
fi
|
|
|
|
if [ "$ID" = "fedora" ]; then
|
|
test_basic=1
|
|
test_optional=1
|
|
fi
|
|
|
|
# tests need cockpit's bots/ libraries
|
|
git clone --depth=1 https://github.com/cockpit-project/bots
|
|
|
|
# only install a subset to save time/space
|
|
npm install axe-core chrome-remote-interface sizzle
|
|
|
|
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
|
|
|
|
# HACK: CI hits this selinux denial. Unrelated to our tests.
|
|
export TEST_ALLOW_JOURNAL_MESSAGES=".*Permission denied:.*/var/cache/app-info/xmls.*"
|
|
|
|
# select tests
|
|
TESTS=""
|
|
EXCLUDES=""
|
|
RC=0
|
|
if [ -n "$test_optional" ]; then
|
|
# pre-download cirros image for Machines tests
|
|
bots/image-download cirros
|
|
|
|
# takes too long, somehow breaks Ansible
|
|
EXCLUDES="$EXCLUDES TestMachines.testCreate"
|
|
# triggers SELinux violation
|
|
EXCLUDES="$EXCLUDES TestMachines.testAddDisk"
|
|
# fixed in https://github.com/cockpit-project/cockpit/pull/14236
|
|
EXCLUDES="$EXCLUDES
|
|
TestMachines.testCreatePXE
|
|
TestMachines.testCreateBasicValidation
|
|
TestMachines.testCreateImportDisk
|
|
TestMachines.testCreateUrlSource"
|
|
# not investigated yet
|
|
EXCLUDES="$EXCLUDES
|
|
TestMachines.testCreateThenInstall
|
|
TestMachines.testVmNICs"
|
|
|
|
# TestUpdates: we can't run rebooting tests
|
|
TESTS="$TESTS
|
|
TestAutoUpdates
|
|
TestMachines
|
|
TestStorage
|
|
TestUpdates.testBasic
|
|
TestUpdates.testSecurityOnly"
|
|
fi
|
|
|
|
if [ -n "$test_basic" ]; then
|
|
# fixed in https://github.com/cockpit-project/cockpit/pull/14236
|
|
EXCLUDES="$EXCLUDES TestSystemInfo.testHardwareInfo"
|
|
|
|
# still too unstable
|
|
EXCLUDES="$EXCLUDES TestFirewall.testNetworkingPage"
|
|
|
|
# TODO: fix for CI environment
|
|
EXCLUDES="$EXCLUDES TestLogin.testTally"
|
|
EXCLUDES="$EXCLUDES TestAccounts.testBasic"
|
|
|
|
# PAM bug in RHEL 8: it shouldn't pwquality the old password when having to set a new one, that's completely counter-productive and wrong
|
|
if [ "${TEST_OS#rhel}" != "$TEST_OS" ]; then
|
|
EXCLUDES="$EXCLUDES TestLogin.testExpired"
|
|
fi
|
|
|
|
TESTS="$TESTS
|
|
TestAccounts
|
|
TestBonding
|
|
TestBridge
|
|
TestFirewall
|
|
TestLogin
|
|
TestNetworking
|
|
TestServices
|
|
TestSOS
|
|
TestSystemInfo
|
|
TestTeam
|
|
TestTerminal
|
|
TestTuned
|
|
"
|
|
fi
|
|
|
|
exclude_options=""
|
|
for t in $EXCLUDES; do
|
|
exclude_options="$exclude_options --exclude $t"
|
|
done
|
|
|
|
# execute run-tests
|
|
test/common/run-tests --test-dir test/verify --trace --verbose --nondestructive $exclude_options \
|
|
--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
|
|
|
|
echo $RC > "$LOGS/exitcode"
|
|
cp --verbose Test* "$LOGS" || true
|
|
# deliver test result via exitcode file
|
|
exit 0
|