Add sample config check to tox pep8 job
This commit takes the check_uptodate.sh script from nova and adds it
to the pep8 tox job. This will enforce that the sample config file is
up to date for each proposed commit. This also ensures that config
options are setup properly and that the style in the sample config is
consistent because it's auto-generated.
Partially Implements: blueprint config-cleanup
Change-Id: I9efaa9fc1cf09e95d7111b000895c7b49705713b
diff --git a/tools/config/check_uptodate.sh b/tools/config/check_uptodate.sh
new file mode 100755
index 0000000..9882ab6
--- /dev/null
+++ b/tools/config/check_uptodate.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+TEMPDIR=`mktemp -d`
+CFGFILE=tempest.conf.sample
+tools/config/generate_sample.sh -b ./ -p tempest -o $TEMPDIR
+if ! diff $TEMPDIR/$CFGFILE etc/$CFGFILE
+then
+ echo "E: tempest.conf.sample is not up to date, please run:"
+ echo "MODULEPATH=tempest.common.generate_sample_tempest tools/config/generate_sample.sh"
+ exit 42
+fi