From: Tom Krizek Date: Tue, 15 Aug 2023 11:40:13 +0000 (+0200) Subject: Remove pytest invocation from legacy runner X-Git-Tag: v9.18.20~44^2~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=98191e63716e6a15db30933d6c13f06a3e0db802;p=thirdparty%2Fbind9.git Remove pytest invocation from legacy runner In order to python system tests, pytest (runner) has to be used directly. This makes it possible to simplify the pytest runner and make its behavior simpler and easier to extend. The legacy runner can still be used to run shell system tests. (cherry picked from commit 4af9bafb4eb0a0c3785119f8a577454f5ad6e068) --- diff --git a/bin/tests/system/legacy.run.sh.in b/bin/tests/system/legacy.run.sh.in index 501e554e3d2..39be8178aa8 100644 --- a/bin/tests/system/legacy.run.sh.in +++ b/bin/tests/system/legacy.run.sh.in @@ -84,7 +84,7 @@ if [ "${srcdir}" != "${builddir}" ]; then cp -a "${srcdir}/_common" "${builddir}" fi # Some tests require additional files to work for out-of-tree test runs. - for file in ckdnsrps.sh conftest.py digcomp.pl ditch.pl fromhex.pl get_core_dumps.sh kasp.sh packet.pl pytest_custom_markers.py start.pl stop.pl testcrypto.sh; do + for file in ckdnsrps.sh conftest.py digcomp.pl ditch.pl fromhex.pl get_core_dumps.sh kasp.sh packet.pl start.pl stop.pl testcrypto.sh; do if [ ! -r "${file}" ]; then cp -a "${srcdir}/${file}" "${builddir}" fi @@ -193,37 +193,6 @@ if [ -r "$systest/tests.sh" ]; then fi fi -if [ $status -eq 0 ]; then - if [ -n "$PYTEST" ]; then - for test in $(cd "${systest}" && find . -name "tests*.py" ! -name "tests_sh_*.py"); do - rm -f "$systest/$test.status" - if start_servers; then - run=$((run+1)) - test_status=0 - (cd "$systest" && LEGACY_TEST_RUNNER=1 "$PYTEST" -rsxX -v "$test" "$@" || echo "$?" > "$test.status") | SYSTESTDIR="$systest" cat_d - if [ -f "$systest/$test.status" ]; then - if [ "$(cat "$systest/$test.status")" = "5" ]; then - echowarn "R:$systest:SKIPPED" - else - echo_i "FAILED" - test_status=$(cat "$systest/$test.status") - fi - fi - status=$((status+test_status)) - stop_servers || status=1 - else - status=1 - fi - if [ $status -ne 0 ]; then - break - fi - done - rm -f "$systest/$test.status" - else - echoinfo "I:$systest:pytest not installed, skipping python tests" - fi -fi - if [ "$run" -eq "0" ]; then echoinfo "I:$systest:No tests were found and run" status=255