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:
parent
5d47ef868f
commit
f3f09c4f96
@ -17,10 +17,14 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
rm -fr .test
|
rm -fr .test
|
||||||
mkdir -p .test/old
|
mkdir -p .test/old/config
|
||||||
mkdir -p .test/new
|
mkdir -p .test/old/out
|
||||||
|
mkdir -p .test/new/config
|
||||||
|
mkdir -p .test/new/out
|
||||||
cd .test
|
cd .test
|
||||||
git clone https://review.openstack.org/p/openstack/openstack-ci-puppet --depth 1
|
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 ..
|
cd ..
|
||||||
GITHEAD=`git rev-parse HEAD`
|
GITHEAD=`git rev-parse HEAD`
|
||||||
|
|
||||||
@ -33,16 +37,16 @@ git checkout $GITHEAD
|
|||||||
tox -e compare-xml-new
|
tox -e compare-xml-new
|
||||||
|
|
||||||
CHANGED=0
|
CHANGED=0
|
||||||
for x in `(cd .test/old && find -type f)`
|
for x in `(cd .test/old/out && find -type f)`
|
||||||
do
|
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
|
then
|
||||||
CHANGED=1
|
CHANGED=1
|
||||||
echo "============================================================"
|
echo "============================================================"
|
||||||
echo $x
|
echo $x
|
||||||
echo "------------------------------------------------------------"
|
echo "------------------------------------------------------------"
|
||||||
fi
|
fi
|
||||||
diff -u .test/old/$x .test/new/$x || /bin/true
|
diff -u .test/old/out/$x .test/new/out/$x || /bin/true
|
||||||
done
|
done
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
4
tox.ini
4
tox.ini
@ -14,11 +14,11 @@ commands = pyflakes jenkins_jobs jenkins-jobs setup.py
|
|||||||
|
|
||||||
[testenv:compare-xml-old]
|
[testenv:compare-xml-old]
|
||||||
deps = -r{toxinidir}/tools/pip-requires
|
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]
|
[testenv:compare-xml-new]
|
||||||
deps = -r{toxinidir}/tools/pip-requires
|
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]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user