set -eux
PLAN="$1"
cd "${SOURCE}"
git clone --depth=1 https://github.com/cockpit-project/bots
if [ -d .git ]; then
./tools/node-modules checkout
fi
TEST_ALLOW_JOURNAL_MESSAGES=""
TEST_ALLOW_JOURNAL_MESSAGES=".*Permission denied:.*/var/cache/app-info/xmls.*"
export TEST_ALLOW_JOURNAL_MESSAGES
export TEST_BROWSER=firefox
echo "TEST_ALLOW_JOURNAL_MESSAGES: ${TEST_ALLOW_JOURNAL_MESSAGES:-}"
echo "TEST_AUDIT_NO_SELINUX: ${TEST_AUDIT_NO_SELINUX:-}"
EXCLUDES=""
if [ "$PLAN" = "main" ]; then
TESTS="TestAutoUpdates
TestAccounts
TestBonding
TestBridge
TestFirewall
TestJournal
TestKdump
TestLogin
TestNetworking
TestSOS
TestServices
TestSystemInfo
TestTeam
TestTuned
TestUpdates
"
EXCLUDES="$EXCLUDES TestSystemInfo.testHardwareInfo"
if [ "$TEST_OS" = "centos-10" ]; then
EXCLUDES="$EXCLUDES TestLogin.testClientCertAuthentication"
fi
if [ "${TEST_OS%bootc}" != "$TEST_OS" ]; then
EXCLUDES="$EXCLUDES TestServices.testTimer"
fi
EXCLUDES="$EXCLUDES
TestAccounts.testAccountLogs
TestAccounts.testExpire
TestAccounts.testRootLogin
TestAccounts.testUnprivileged
TestAutoUpdates.testBasic
TestAutoUpdates.testPrivilegeChange
TestBonding.testActive
TestBonding.testAmbiguousMember
TestBonding.testNonDefaultSettings
TestFirewall.testAddCustomServices
TestFirewall.testNetworkingPage
TestLogin.testConversation
TestLogin.testExpired
TestLogin.testFailingWebsocket
TestLogin.testFailingWebsocketSafari
TestLogin.testFailingWebsocketSafariNoCA
TestLogin.testLogging
TestLogin.testNFSHomeDir
TestLogin.testSSH
TestLogin.testRaw
TestLogin.testServer
TestLogin.testSELinuxRestrictedUser
TestLogin.testUnsupportedBrowser
TestNetworkingBasic.testIpHelper
TestNetworkingBasic.testNoService
TestNetworkingCheckpoints.testCheckpoint
TestNetworkingCheckpoints.testCheckpointSlowRollback
TestNetworkingCheckpoints.testCheckpointSessionStorageEventSuccess
TestNetworkingCheckpoints.testCheckpointSessionStorageEventRollback
TestNetworkingUnmanaged.testUnmanaged
TestSOS.testWithUrlRoot
TestSOS.testCancel
TestSOS.testAppStream
TestSystemInfo.testInsightsStatus
TestSystemInfo.testMotd
TestSystemInfo.testOverview
TestSystemInfo.testShutdownStatus
TestJournal.testBinary
TestJournal.testNoMessage
TestServices.testApi
TestServices.testConditions
TestServices.testHiddenFailure
TestServices.testLogs
TestServices.testLogsUser
TestServices.testNotFound
TestServices.testNotifyFailed
TestServices.testRelationships
TestServices.testRelationshipsUser
TestServices.testResetFailed
TestServices.testTransientUnits
TestServices.testUnprivileged
TestServices.testQuadlets
TestUpdates.testUnprivileged
TestUpdates.testPackageKitCrash
TestUpdates.testNoPackageKit
TestUpdates.testInfoTruncation
"
EXCLUDES="$EXCLUDES
TestUpdates.testBasic
TestUpdates.testBasicTZFullHour
TestUpdates.testBasicTZHalfHour
TestUpdates.testDnfRestart
TestUpdates.testFailServiceRestart
TestUpdates.testKpatch
"
EXCLUDES="$EXCLUDES
TestNetworkingWifi.testHidden
TestNetworkingWifi.testWifi
"
fi
if [ "$PLAN" = "storage-basic" ]; then
TESTS="TestStorageBasic
TestStorageBtrfs
TestStorageMdRaid
TestStorageMounting
TestStorageMountingLUKS
TestStorageMsDOS
TestStorageNfs
TestStoragePartitions
TestStorageRaid
TestStorageStratis
TestStorageUnrecognized
TestStorageUsed
TestStorageswap
"
EXCLUDES="$EXCLUDES
TestStorageAnaconda.testBasic
TestStorageBtrfs.testNothingMounted
TestStorageMounting.testAtBoot
TestStorageMounting.testBadOption
TestStorageMounting.testFirstMount
TestStorageMounting.testMounting
TestStorageMounting.testMountingHelp
TestStorageMounting.testNeverAuto
TestStorageMountingLUKS.testEncryptedMountingHelp
TestStorageMountingLUKS.testDuplicateMountPoints
TestStorageMountingLUKS.testNeverAuto
TestStoragePartitions.testSizeSlider
TestStorageStratis.testAlerts
"
if [ "${TEST_OS#rhel-}" != "$TEST_OS" ]; then
EXCLUDES="$EXCLUDES
TestStorageNfs.testNfsBusy
TestStorageNfs.testNfsClient
TestStorageNfs.testNfsMountWithoutDiscovery
"
fi
if [ "$TEST_OS" = "centos-9-bootc" ]; then
EXCLUDES="$EXCLUDES
TestStorageswap.testBasic
TestStorageswap.testEncrypted
"
fi
fi
if [ "$PLAN" = "storage-extra" ]; then
TESTS="TestStorageAnaconda
TestStorageLuks
TestStorageMountingLUKS
TestStorageLvm
"
EXCLUDES="$EXCLUDES
TestStorageAnaconda.testBasic
TestStorageAnaconda.testStratis
TestStorageMountingLUKS.testEncryptedMountingHelp
TestStorageMountingLUKS.testDuplicateMountPoints
TestStorageMountingLUKS.testNeverAuto
TestStorageLuks.testClevisTPM
"
if [ "$TEST_OS" = "centos-10-bootc" ]; then
EXCLUDES="$EXCLUDES
TestStorageLvm2.testDegradation
"
fi
fi
exclude_options=""
for t in $EXCLUDES; do
exclude_options="$exclude_options --exclude $t"
done
GATEWAY="$(python3 -c 'import socket; print(socket.gethostbyname("_gateway"))')"
RC=0
./test/common/run-tests \
--test-dir test/verify \
--nondestructive \
--machine "${GATEWAY}":22 \
--browser "${GATEWAY}":9090 \
$exclude_options \
$TESTS \
|| RC=$?
echo $RC > "$LOGS/exitcode"
cp --verbose Test* "$LOGS" || true
exit $RC