From f3f09c4f960817a88ec58d437b8a036f5bab832b Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 5 Sep 2012 11:18:01 -0700 Subject: [PATCH] Simplify the xml test paths. Make it easier to invoke the tox environments from another project (eg, openstack-ci-puppet). Change-Id: I88305c8edb79bb6e944eb35f5e39c84827807f11 Reviewed-on: https://review.openstack.org/12451 Reviewed-by: Clark Boylan Approved: James E. Blair Tested-by: Jenkins --- tools/run-compare-xml.sh | 14 +++++++++----- tox.ini | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/run-compare-xml.sh b/tools/run-compare-xml.sh index 21109ca32..d1eee667d 100755 --- a/tools/run-compare-xml.sh +++ b/tools/run-compare-xml.sh @@ -17,10 +17,14 @@ # under the License. rm -fr .test -mkdir -p .test/old -mkdir -p .test/new +mkdir -p .test/old/config +mkdir -p .test/old/out +mkdir -p .test/new/config +mkdir -p .test/new/out cd .test git clone https://review.openstack.org/p/openstack/openstack-ci-puppet --depth 1 +cp openstack-ci-puppet/modules/openstack_project/files/jenkins_job_builder/config/* old/config +cp openstack-ci-puppet/modules/openstack_project/files/jenkins_job_builder/config/* new/config cd .. GITHEAD=`git rev-parse HEAD` @@ -33,16 +37,16 @@ git checkout $GITHEAD tox -e compare-xml-new CHANGED=0 -for x in `(cd .test/old && find -type f)` +for x in `(cd .test/old/out && find -type f)` do - if ! diff -u .test/old/$x .test/new/$x >/dev/null 2>&1 + if ! diff -u .test/old/out/$x .test/new/out/$x >/dev/null 2>&1 then CHANGED=1 echo "============================================================" echo $x echo "------------------------------------------------------------" fi - diff -u .test/old/$x .test/new/$x || /bin/true + diff -u .test/old/out/$x .test/new/out/$x || /bin/true done echo diff --git a/tox.ini b/tox.ini index 08b6a271e..ede2ac922 100644 --- a/tox.ini +++ b/tox.ini @@ -14,11 +14,11 @@ commands = pyflakes jenkins_jobs jenkins-jobs setup.py [testenv:compare-xml-old] deps = -r{toxinidir}/tools/pip-requires -commands = ./jenkins-jobs test -o .test/old/ .test/openstack-ci-puppet/modules/openstack_project/files/jenkins_job_builder/config/ +commands = ./jenkins-jobs test -o .test/old/out/ .test/old/config/ [testenv:compare-xml-new] deps = -r{toxinidir}/tools/pip-requires -commands = ./jenkins-jobs test -o .test/new/ .test/openstack-ci-puppet/modules/openstack_project/files/jenkins_job_builder/config/ +commands = ./jenkins-jobs test -o .test/new/out/ .test/new/config/ [testenv:venv] commands = {posargs}