From 838b833b638ee13599707d8a0be899815f201927 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sun, 4 Feb 2018 17:55:54 +0100 Subject: [PATCH] Add Zuul v3 native unit-tests Add new job to replace legacy-devstack-unit-tests. Change-Id: I4fe59b1954514a7146a4412e3103a0a05a9250f2 --- .zuul.yaml | 11 +++++++++++ playbooks/unit-tests/pre.yaml | 13 +++++++++++++ playbooks/unit-tests/run.yaml | 12 ++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 playbooks/unit-tests/pre.yaml create mode 100644 playbooks/unit-tests/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index f03d30a497..802bb79802 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -187,11 +187,22 @@ - playbooks/tox/pre.yaml run: playbooks/tox/run.yaml +- job: + name: devstack-unit-tests + description: | + Runs unit tests on devstack project. + + It runs ``run_tests.sh``. + pre-run: playbooks/unit-tests/pre.yaml + run: playbooks/unit-tests/run.yaml + - project: check: jobs: - devstack - devstack-multinode + - devstack-unit-tests gate: jobs: - devstack + - devstack-unit-tests diff --git a/playbooks/unit-tests/pre.yaml b/playbooks/unit-tests/pre.yaml new file mode 100644 index 0000000000..cfa1676378 --- /dev/null +++ b/playbooks/unit-tests/pre.yaml @@ -0,0 +1,13 @@ +- hosts: all + + tasks: + + - name: Install prerequisites + shell: + chdir: '{{ zuul.project.src_dir }}' + executable: /bin/bash + cmd: | + set -e + set -x + echo "IPV4_ADDRS_SAFE_TO_USE=10.1.0.0/20" >> localrc + ./tools/install_prereqs.sh diff --git a/playbooks/unit-tests/run.yaml b/playbooks/unit-tests/run.yaml new file mode 100644 index 0000000000..181521f072 --- /dev/null +++ b/playbooks/unit-tests/run.yaml @@ -0,0 +1,12 @@ +- hosts: all + + tasks: + + - name: Run run_tests.sh + shell: + chdir: '{{ zuul.project.src_dir }}' + executable: /bin/bash + cmd: | + set -e + set -x + ./run_tests.sh