diff --git a/.gitignore b/.gitignore index 18a9ba4fd..92b67f4a8 100644 --- a/.gitignore +++ b/.gitignore @@ -64,7 +64,6 @@ depcomp /test/testlib.pyc /test/*.rpm /test/files/cockpit_test_bridge* -/test/run /test/kdc /cockpit-askpass /cockpit-session diff --git a/test/run b/test/run new file mode 100755 index 000000000..418c57c07 --- /dev/null +++ b/test/run @@ -0,0 +1,34 @@ +#!/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 + +TEST_SCENARIO=${TEST_SCENARIO:-verify} +case $TEST_SCENARIO in + verify) + test/image-prepare --verbose $TEST_OS + test/verify/run-tests --jobs ${TEST_JOBS:-1} + ;; + avocado) + test/image-prepare --verbose $TEST_OS + test/avocado/run-tests --quick --tests + ;; + selenium-*) + test/image-prepare --verbose $TEST_OS + test/avocado/run-tests --quick --selenium-tests --browser ${TEST_SCENARIO#*-} + ;; + container-kubernetes) + test/image-prepare --containers --verbose $TEST_OS + test/image-prepare --containers --verbose --install-only openshift + test/containers/run-tests --container kubernetes + ;; + container-*) + test/image-prepare --containers --verbose $TEST_OS + test/containers/run-tests --container ${TEST_SCENARIO#*-} + ;; + *) + echo "Unknown test scenario: $TEST_SCENARIO" + exit 1 +esac diff --git a/tools/test-static-code b/tools/test-static-code index da1e6f48c..7859fe212 100755 --- a/tools/test-static-code +++ b/tools/test-static-code @@ -119,7 +119,7 @@ if [ -z "${PYTHON_STYLE_CHECKER-}" ]; then echo "ok 7 pycodestyle test # SKIP pycodestyle not installed" else # FIXME: Fix code for the warnings and re-enable them - out=$(python3 -m "$PYTHON_STYLE_CHECKER" --ignore E501,E265,E261,W504,W605 test/* --exclude=test/verify/nested-kvm,test/README.md) || true + out=$(python3 -m "$PYTHON_STYLE_CHECKER" --ignore E501,E265,E261,W504,W605 test/* --exclude=test/verify/nested-kvm,test/README.md,test/run) || true if [ -n "$out" ]; then echo "$out" >&2 echo "not ok 7 $PYTHON_STYLE_CHECKER test"