2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

[9.20] chg: test: Generate TSAN unit stress tests

This is a complement to the already present system test "stress" test.

Backport of MR !9474

Merge branch 'backport-mnowak/generate-tsan-unit-stress-tests-9.20' into 'bind-9.20'

See merge request isc-projects/bind9!10094
This commit is contained in:
Michal Nowak
2025-02-13 17:42:26 +00:00

View File

@@ -19,18 +19,21 @@ with open(".gitlab-ci.yml", encoding="utf-8") as gitlab_ci_yml:
anchors = yaml.load(gitlab_ci_yml, Loader=yaml.Loader)
for tsan_job in "gcc:tsan", "clang:tsan":
tsan_stress_test_job = anchors[f"system:{tsan_job}"]
tsan_stress_test_job["stage"] = "test"
tsan_stress_test_job["rules"] = [{"if": '$CI_PIPELINE_SOURCE == "parent_pipeline"'}]
tsan_stress_test_job["parallel"] = NUMBER_OF_TESTS_PER_TSAN_JOB
tsan_stress_test_job["needs"] = [
{"pipeline": "$PARENT_PIPELINE_ID", "job": tsan_job}
]
del tsan_stress_test_job["only"]
for test_type in "unit", "system":
tsan_stress_test_job = anchors[f"{test_type}:{tsan_job}"]
tsan_stress_test_job["stage"] = "test"
tsan_stress_test_job["rules"] = [
{"if": '$CI_PIPELINE_SOURCE == "parent_pipeline"'}
]
tsan_stress_test_job["parallel"] = NUMBER_OF_TESTS_PER_TSAN_JOB
tsan_stress_test_job["needs"] = [
{"pipeline": "$PARENT_PIPELINE_ID", "job": tsan_job}
]
del tsan_stress_test_job["only"]
print(
yaml.dump(
{f"system:{tsan_job}:stress": tsan_stress_test_job},
Dumper=yaml.Dumper,
print(
yaml.dump(
{f"{test_type}:{tsan_job}:stress": tsan_stress_test_job},
Dumper=yaml.Dumper,
)
)
)