]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Display pytest failures for system:gcc:tarball
authorTom Krizek <tkrizek@isc.org>
Thu, 23 Mar 2023 15:47:32 +0000 (16:47 +0100)
committerTom Krizek <tkrizek@isc.org>
Mon, 22 May 2023 12:11:40 +0000 (14:11 +0200)
Since the tarball build&tests happen in a subdirectory, ensure the
after_script switches to it, so artifacts can be found properly.

.gitlab-ci.yml

index bf0988a1aa9c7aa42846dc67b614d48df1403efb..c3d30a2d1583381110934ff34cb65d3c70041d4e 100644 (file)
@@ -315,6 +315,10 @@ stages:
         sudo sh -x bin/tests/system/ifconfig.sh up;
       fi
 
+.display_pytest_failures: &display_pytest_failures
+    - awk '/^=+ FAILURES =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
+    - awk '/^=+ ERRORS =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
+
 .system_test_common: &system_test_common
   <<: *default_triggering_rules
   stage: system
@@ -328,8 +332,7 @@ stages:
       "$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:
-    - awk '/^=+ FAILURES =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
-    - awk '/^=+ ERRORS =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
+    - *display_pytest_failures
 
 .system_test_legacy: &system_test_legacy
   script:
@@ -368,8 +371,7 @@ stages:
 .system_test_tsan: &system_test_tsan_job
   <<: *system_test_common
   after_script:
-    - awk '/^=+ FAILURES =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
-    - awk '/^=+ ERRORS =+/{flag=1;next}/^=+.*=+$/{flag=0}flag' bin/tests/system/pytest.out.txt || true
+    - *display_pytest_failures
     - find bin/tests/system -name "*dig.*" | xargs grep "error" || true
     - *find_python
     - *parse_tsan
@@ -916,6 +918,9 @@ system:gcc:tarball:
   before_script:
     - cd bind-*
     - *setup_interfaces
+  after_script:
+    - cd bind-*
+    - *display_pytest_failures
   needs:
     - job: gcc:tarball
       artifacts: true