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 2 years ago
parent
commit
9d8e765881
  1. 6
      roles/test-setup/README.rst
  2. 2
      roles/test-setup/defaults/main.yaml
  3. 3
      roles/test-setup/tasks/main.yaml

6
roles/test-setup/README.rst

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

2
roles/test-setup/defaults/main.yaml

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

3
roles/test-setup/tasks/main.yaml

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