From 30ddef53cb8e2b780d6d828b0dc507a4b9415347 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Mon, 7 Aug 2023 14:37:40 +0200 Subject: [PATCH 1/3] ci: use pytest system test runner on OpenBSD A supported pytest version finally made it to OpenBSD repositories, allowing us to run system tests with the pytest runner. (cherry picked from commit 8846877dfec6b353e2939cbf4c9c963a82c2731c) --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2a2e3a68d..afdfe4d74e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1296,7 +1296,6 @@ clang:openbsd:amd64: system:clang:openbsd:amd64: <<: *openbsd_amd64_image <<: *system_test_job - <<: *system_test_legacy <<: *api_schedules_triggers_web_triggering_rules variables: USER: gitlab-runner From 8a4386f90c37fae6b9c4b0935ba69ba304e5388d Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Tue, 8 Aug 2023 13:23:20 +0200 Subject: [PATCH 2/3] ci: run out-of-tree system tests with pytest runner Out-of-tree builds are built in a directory that is different from source directory. The build directory doesn't contain the non-compiled test files from bin/tests/system which are the test cases required by the pytest runner. In order to run the system tests for out-of-tree build, copy over the contents (tests) of bin/tests/system/ from the source directory into the build directory. Then, it is possible to invoke the pytest runner inside the build directory. (cherry picked from commit d49d9ec80e0f3a771c1af3d8db68b0bf2739bff3) --- .gitlab-ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index afdfe4d74e..960883423e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -395,7 +395,7 @@ cross-version-config-tests: <<: *default_triggering_rules stage: system before_script: - - test -n "${OUT_OF_TREE_WORKSPACE}" && cd "${OUT_OF_TREE_WORKSPACE}" + - test -n "${OUT_OF_TREE_WORKSPACE}" && cp -r bin/tests/system/* "${OUT_OF_TREE_WORKSPACE}/bin/tests/system/" && cd "${OUT_OF_TREE_WORKSPACE}" - *setup_interfaces script: - *find_pytest @@ -931,7 +931,6 @@ system:gcc:out-of-tree: artifacts: true <<: *base_image <<: *system_test_job - <<: *system_test_legacy <<: *api_schedules_tags_triggers_web_triggering_rules unit:gcc:out-of-tree: From 57b2966d0bbb195a20745fa35d14b19af2253531 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Wed, 9 Aug 2023 17:49:27 +0200 Subject: [PATCH 3/3] Improve pytest message when sanitizer report is found (cherry picked from commit b1a9d1fe251e09cc359966cdc90b25db2a46669b) --- bin/tests/system/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index 31ad1174e9..088f0d87b8 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -588,7 +588,7 @@ else: try: shell("get_core_dumps.sh", [system_test_dir.name]) except subprocess.CalledProcessError as exc: - mlogger.error("Found core dumps") + mlogger.error("Found core dumps or sanitizer reports") pytest.fail(f"get_core_dumps.sh exited with {exc.returncode}") os.environ.update(env) # Ensure pytests have the same env vars as shell tests.