]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
ci: utilize test reports
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 15 Apr 2021 14:44:39 +0000 (16:44 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 30 Apr 2021 14:24:40 +0000 (16:24 +0200)
https://docs.gitlab.com/ce/ci/unit_test_reports.html
https://mesonbuild.com/Unit-tests.html#testlogjunitxml

Implemented fully: build, build-asan; partially: pytests, deckard.

.gitlab-ci.yml
tests/integration/deckard
tests/integration/meson.build
tests/pytests/meson.build

index 6cab5043ab974dc6fed6f39c88bfb0cc9e7a9079..29d349177e86f4ca38b038646d2115d6ca1b96a2 100644 (file)
@@ -49,9 +49,13 @@ stages:
     - rm build_ci*/meson-logs/testlog*.txt  # start with clean testlog
   artifacts:
     when: always
+    # The deckard-specific parts are a little messy, but they're hard to separate in YAML.
     paths:
       - build_ci*/meson-logs/testlog*.txt
       - tmpdeckard*
+      - build_ci*/meson-logs/integration.deckard.junit.xml
+    reports:
+      junit: build_ci*/meson-logs/integration.deckard.junit.xml
 
 .nodep: &nodep
   <<: *common
@@ -67,6 +71,8 @@ stages:
       - .local
       - build_ci*
       - build_dist/meson-dist/*.tar.xz
+    reports:
+      junit: build_ci*/meson-logs/testlog.junit.xml
 
 archive:
   <<: *build
@@ -296,6 +302,9 @@ pytests:
     paths:
       - build_ci*/meson-logs/testlog*.txt
       - tests/pytests/*.html
+      - tests/pytests/*.junit.xml
+    reports: # Can't have multiple junit XMLs?
+      junit: tests/pytests/pytests.parallel.junit.xml
   script:
     - ${MESON_TEST} --suite pytests
 # }}}
index ff1e8471785cedada669bf2304442ac0e86b7988..01eabd23dc3315ef9d27ae7f5fe19c142dcbdfdb 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ff1e8471785cedada669bf2304442ac0e86b7988
+Subproject commit 01eabd23dc3315ef9d27ae7f5fe19c142dcbdfdb
index e86eb0ac8f95792391a0af104df2d75f6d486893..1d67d716759e9a40daeba6899e2c1051fe605def 100644 (file)
@@ -22,6 +22,8 @@ prepare_deckard = find_program('../../scripts/test-integration-prepare.sh')
 deckard_env = environment()
 deckard_env.prepend('PATH', sbin_dir)
 
+junitxml_prefix = '--junitxml=' + meson.build_root() + '/meson-logs'
+
 deckard_kresd_run = find_program('deckard/kresd_run.sh')
 test(
   'integration.deckard',
@@ -30,6 +32,7 @@ test(
   args: [
     '-n', 'auto',
     '-Wignore::DeprecationWarning',
+    junitxml_prefix + '/integration.deckard.junit.xml',
   ],
   suite: [
     'postinstall',
@@ -51,6 +54,7 @@ foreach integr_test : integr_tests
       '-Wignore::DeprecationWarning',
       '--config=@0@'.format(deckard_config_path),
       '--scenarios=@0@'.format(integr_test[1]),
+      junitxml_prefix + '/integration.' + integr_test[0] + '.junit.xml',
     ],
     suite: [
       'postinstall',
index 217fc027911dab8e43657a22d885f5824d235ba4..d717dc2033680f178867497370ce19bfb79c700c 100644 (file)
@@ -41,6 +41,7 @@ test(
     '-d',
     '--html', 'pytests.parallel.html',
     '--self-contained-html',
+    '--junitxml=pytests.parallel.junit.xml',
     '-n', '24',
     '-v',
   ],
@@ -60,6 +61,7 @@ test(
   python3,
   args: [
     '-m', 'pytest',
+    '--junitxml=pytests.single.junit.xml',
     '-ra',
     '--capture=no',
     'conn_flood.py',