]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Enable "stress" tests to be run on demand
authorMichał Kępień <michal@isc.org>
Mon, 23 Nov 2020 10:46:50 +0000 (11:46 +0100)
committerMichał Kępień <michal@isc.org>
Mon, 23 Nov 2020 10:52:20 +0000 (11:52 +0100)
The "stress" test can be run in different ways, depending on:

  - the tested scenario (authoritative, recursive),
  - the operating system used (Linux, FreeBSD),
  - the architecture used (amd64, arm64).

Currently, all supported "stress" test variants are automatically
launched for all scheduled pipelines and for pipelines started for tags;
there is no possibility of running these tests on demand, which could be
useful in certain circumstances.

Employ the "only:variables" key to enable fine-grained control over the
list of "stress" test jobs to be run for a given pipeline.  Three CI
variables are used to specify the list of "stress" test jobs to create:

  - BIND_STRESS_TEST_MODE: specifies the test mode to use; must be
    explicitly set in order for any "stress" test job to be created;
    allowed values are: "authoritative", "recursive",

  - BIND_STRESS_TEST_OS: specifies the operating system to run the test
    on; allowed values are: "linux", "freebsd"; defaults to "linux", may
    be overridden at pipeline creation time,

  - BIND_STRESS_TEST_ARCH: specifies the architecture to run the test
    on; allowed values are: "amd64", "arm64"; defaults to "amd64", may
    be overridden at pipeline creation time.

Since case-insensitive regular expressions are used for determining
which jobs to run, every variable described above may contain multiple
values.  For example, setting the BIND_STRESS_TEST_MODE variable to
"authoritative,recursive" will cause the "stress" test to be run in both
supported scenarios (either on the default OS/architecture combination,
i.e. Linux/amd64, or, if the relevant variables are explicitly
specified, the requested OS/architecture combinations).

(cherry picked from commit f23094223e61908012204cde59ee72102b0b74ae)

.gitlab-ci.yml

index 291da42c6a51d50c9ab4d8fac3edf4d7f1a4d3e7..6f597d6a74e624be2f1dbf8cb3a8afffa3804407 100644 (file)
@@ -32,6 +32,10 @@ variables:
 
   BIND_INSTALL_PATH: "${CI_PROJECT_DIR}/.local"
 
+  # Default platforms to run "stress" tests on
+  BIND_STRESS_TEST_OS: linux
+  BIND_STRESS_TEST_ARCH: amd64
+
 stages:
   - precheck
   - build
@@ -1416,9 +1420,6 @@ respdiff:
   needs:
     - job: autoreconf
       artifacts: true
-  only:
-    - schedules
-    - tags
   artifacts:
     untracked: true
     expire_in: "1 day"
@@ -1435,6 +1436,9 @@ stress:authoritative:fedora:33:amd64:
     MODE: authoritative
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /linux/i && $BIND_STRESS_TEST_MODE =~ /authoritative/i && $BIND_STRESS_TEST_ARCH =~ /amd64/i)
 
 stress:recursive:fedora:33:amd64:
   <<: *fedora_33_amd64_image
@@ -1446,6 +1450,9 @@ stress:recursive:fedora:33:amd64:
     MODE: recursive
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /linux/i && $BIND_STRESS_TEST_MODE =~ /recursive/i && $BIND_STRESS_TEST_ARCH =~ /amd64/i)
 
 stress:authoritative:fedora:33:arm64:
   <<: *fedora_33_arm64_image
@@ -1457,6 +1464,9 @@ stress:authoritative:fedora:33:arm64:
     MODE: authoritative
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /linux/i && $BIND_STRESS_TEST_MODE =~ /authoritative/i && $BIND_STRESS_TEST_ARCH =~ /arm64/i)
 
 stress:recursive:fedora:33:arm64:
   <<: *fedora_33_arm64_image
@@ -1468,8 +1478,11 @@ stress:recursive:fedora:33:arm64:
     MODE: recursive
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /linux/i && $BIND_STRESS_TEST_MODE =~ /recursive/i && $BIND_STRESS_TEST_ARCH =~ /arm64/i)
 
-stress:authoritative:freebsd12:
+stress:authoritative:freebsd12:amd64:
   <<: *freebsd_12_amd64_image
   <<: *freebsd_stress_amd64
   <<: *stress_job
@@ -1479,10 +1492,13 @@ stress:authoritative:freebsd12:
     MODE: authoritative
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /freebsd/i && $BIND_STRESS_TEST_MODE =~ /authoritative/i && $BIND_STRESS_TEST_ARCH =~ /amd64/i)
   # See: https://gitlab.isc.org/isc-projects/bind9/-/issues/1941
   allow_failure: true
 
-stress:recursive:freebsd12:
+stress:recursive:freebsd12:amd64:
   <<: *freebsd_12_amd64_image
   <<: *freebsd_stress_amd64
   <<: *stress_job
@@ -1492,6 +1508,9 @@ stress:recursive:freebsd12:
     MODE: recursive
     RATE: 10000
     RUN_TIME: 1
+  only:
+    variables:
+      - $CI_COMMIT_TAG || ($BIND_STRESS_TEST_OS =~ /freebsd/i && $BIND_STRESS_TEST_MODE =~ /recursive/i && $BIND_STRESS_TEST_ARCH =~ /amd64/i)
   # See: https://gitlab.isc.org/isc-projects/bind9/-/issues/1941
   allow_failure: true