diff --git a/roles/test-setup/README.rst b/roles/test-setup/README.rst index 8e8fc58f3..adcda6964 100644 --- a/roles/test-setup/README.rst +++ b/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 }} diff --git a/roles/test-setup/defaults/main.yaml b/roles/test-setup/defaults/main.yaml index 71630b024..b66f78731 100644 --- a/roles/test-setup/defaults/main.yaml +++ b/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 }}" - diff --git a/roles/test-setup/tasks/main.yaml b/roles/test-setup/tasks/main.yaml index 4977dfe60..85fc0e92e 100644 --- a/roles/test-setup/tasks/main.yaml +++ b/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