]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove pytest invocation from legacy runner
authorTom Krizek <tkrizek@isc.org>
Tue, 15 Aug 2023 11:40:13 +0000 (13:40 +0200)
committerTom Krizek <tkrizek@isc.org>
Tue, 19 Sep 2023 13:43:31 +0000 (15:43 +0200)
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.

bin/tests/system/legacy.run.sh.in

index 50af41c41dc0848cdadcf20f1e64e5793b3faaf1..6df783a079b12c80f124c078531b3ca57b207ff1 100644 (file)
@@ -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