From 08de5694b623cb36d46e018f6d0f2d285abe1c5b Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 27 May 2014 07:37:08 -0700 Subject: [PATCH] Make it possible to run zuul layout test locally Add a tox environment to run the zuul layout tests locally. Modify run-layout.sh to ignore a missing mirror selection script and assume that it is running with a valid mirror configuration. This allows the script to be run locally without breaking a dev environment. Change-Id: I5b0c94ae51e7f41b8b26b3ef4f78b830031d263e --- tools/run-layout.sh | 8 +++++++- tox.ini | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/run-layout.sh b/tools/run-layout.sh index 7657b7dc3d..eb8f10797d 100755 --- a/tools/run-layout.sh +++ b/tools/run-layout.sh @@ -25,7 +25,13 @@ then echo "PROJECT: The project name (eg 'nova')" exit 1 else - /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project + if [ -f /usr/local/jenkins/slave_scripts/select-mirror.sh ] + then + /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project + else + echo "No mirror script /usr/local/jenkins/slave_scripts/select-mirror.sh," + echo "assuming local environment is configured properly." + fi fi mkdir -p .test diff --git a/tox.ini b/tox.ini index da3a6128f6..4c97994bf6 100644 --- a/tox.ini +++ b/tox.ini @@ -39,3 +39,11 @@ commands = rm -rf {envdir}/tmp mkdir -p {envdir}/tmp jenkins-jobs -l debug test -o {envdir}/tmp modules/openstack_project/files/jenkins_job_builder/config + +[testenv:zuul] +basepython = python2.7 +deps = +commands = + {toxinidir}/tools/check_projects_yaml_alphabetized.sh + {toxinidir}/tools/run-layout.sh openstack-infra config +