Browse Source

Add test_setup_skip role variable

This allows jobs which inherit from unittests to specify that
the test-setup script should not be run.  Some "unit test" jobs
are simple enough that they do not need to perform costly setup
for a full test run.

Change-Id: I5826bed411c42f9b3e0477b351bd82bd964d2fac
changes/19/670119/1
James E. Blair 1 month ago
parent
commit
9d8e765881

+ 6
- 0
roles/test-setup/README.rst View File

@@ -20,6 +20,12 @@ automated testing system and developers.
20 20
    String of optional command line options passed to
21 21
    the test-setup script.
22 22
 
23
+.. zuul:rolevar:: test_setup_skip
24
+   :default: false
25
+
26
+   Set this to true to skip running the test-setup script even if it
27
+   exists.
28
+
23 29
 .. zuul:rolevar:: zuul_work_dir
24 30
    :default: {{ zuul.project.src_dir }}
25 31
 

+ 1
- 1
roles/test-setup/defaults/main.yaml View File

@@ -1,6 +1,6 @@
1 1
 ---
2 2
 test_setup_args: ""
3 3
 test_setup_environment: {}
4
+test_setup_skip: false
4 5
 
5 6
 zuul_work_dir: "src/{{ zuul.project.canonical_name }}"
6
-

+ 2
- 1
roles/test-setup/tasks/main.yaml View File

@@ -1,4 +1,4 @@
1
-- name: Check if project's tools/test-setup.sh exists
1
+- name: "Check if project's tools/test-setup.sh exists"
2 2
   stat:
3 3
     path: "{{ zuul_work_dir }}/tools/test-setup.sh"
4 4
   register: p
@@ -11,3 +11,4 @@
11 11
   when:
12 12
     - p.stat.exists
13 13
     - p.stat.executable
14
+    - not test_setup_skip

Loading…
Cancel
Save