]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
ci: fix after_script for out-of-tree tests
authorTom Krizek <tkrizek@isc.org>
Tue, 22 Aug 2023 15:26:14 +0000 (17:26 +0200)
committerTom Krizek <tkrizek@isc.org>
Wed, 23 Aug 2023 12:06:20 +0000 (14:06 +0200)
The commands in after_script run in a new shell, separate from
before_script and script commands. Since the pytest.log.txt is for out
of tree tests is present in the build directory, switch to it (if set)
before running any postprocessing commands.

.gitlab-ci.yml

index 1dd538519ee8bbb2d4e1057739a4a99a522a8d51..9c7f41da0b1602c1563a2118317682fb77c308b3 100644 (file)
@@ -406,6 +406,7 @@ cross-version-config-tests:
       "$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt
     - '( ! grep -F "grep: warning:" pytest.out.txt )'
   after_script:
+    - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}"
     - *display_pytest_failures
 
 .system_test: &system_test_job