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 <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
James E. Blair 2012-09-05 11:18:01 -07:00 committed by Jenkins
parent 5d47ef868f
commit f3f09c4f96
2 changed files with 11 additions and 7 deletions

View File

@ -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

View File

@ -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}