1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#!/bin/sh
# This is the expected entry point for Cockpit CI; will be called without
# arguments but with an appropriate $TEST_OS, and optionally $TEST_SCENARIO
set -eu
tools/make-bots
TEST_SCENARIO=${TEST_SCENARIO:-verify}
TEST_OS_DEFAULT=$(PYTHONPATH=bots python3 -c 'from machine.machine_core.constants import TEST_OS_DEFAULT; print(TEST_OS_DEFAULT)')
case $TEST_SCENARIO in
verify)
# do a development build on the latest Fedora image so that we can spot React and other dev-only warnings
if [ "$TEST_OS" = "$TEST_OS_DEFAULT" ]; then
export NODE_ENV=development
fi
test/image-prepare --verbose $TEST_OS
test/common/run-tests --jobs ${TEST_JOBS:-1} --test-dir test/verify
;;
firefox)
test/image-prepare --quick --verbose $TEST_OS
TEST_BROWSER=firefox test/common/run-tests --jobs ${TEST_JOBS:-1} --test-dir test/verify
;;
selenium-*)
test/image-prepare --quick --verbose $TEST_OS
test/selenium/run-tests --browser ${TEST_SCENARIO#*-}
;;
container-*)
test/image-prepare --quick --containers --verbose $TEST_OS
test/containers/run-tests --container ${TEST_SCENARIO#*-}
;;
dnf-copr*)
bots/image-customize -v --run-command 'dnf -y copr enable rpmsoftwaremanagement/dnf-nightly && dnf -y update' $TEST_OS
test/image-prepare --verbose --overlay $TEST_OS
test/common/run-tests --jobs ${TEST_JOBS:-1} --test-dir test/verify
;;
*)
echo "Unknown test scenario: $TEST_SCENARIO"
exit 1
esac
|