Make gen_pki.sh & debug_helper.sh bash8 compliant

Now that bash8 is available on PyPI we can use it to clean up the bash
scripts in Keystone. This also uses bash8 in tox. For now we can add
files to the tox check manually as we make them compliant.

Change-Id: I87a7478949114163f0614b1a6d8b249e14afe0df
This commit is contained in:
Lance Bragstad 2014-05-13 14:02:29 +00:00 committed by Lance Bragstad
parent 1ca41569b3
commit 491b29bed8
4 changed files with 63 additions and 59 deletions

View File

@ -203,8 +203,7 @@ function check_openssl {
}
function gen_sample_cms {
for json_file in "${CMS_DIR}/auth_token_revoked.json" "${CMS_DIR}/auth_token_unscoped.json" "${CMS_DIR}/auth_token_scoped.json" "${CMS_DIR}/revocation_list.json"
do
for json_file in "${CMS_DIR}/auth_token_revoked.json" "${CMS_DIR}/auth_token_unscoped.json" "${CMS_DIR}/auth_token_scoped.json" "${CMS_DIR}/revocation_list.json"; do
openssl cms -sign -in $json_file -nosmimecap -signer $CERTS_DIR/signing_cert.pem -inkey $PRIVATE_DIR/signing_key.pem -outform PEM -nodetach -nocerts -noattr -out ${json_file/.json/.pem}
done
}

View File

@ -1,4 +1,5 @@
hacking>=0.8.0,<0.9
bash8
# Optional backend: SQL
pysqlite

View File

@ -8,8 +8,7 @@ TESTS_TO_RUN=$TMP_DIR/ks_to_run
python -m testtools.run discover -t ./ ./keystone/tests --list > $ALL_TESTS
if [ "$1" ]
then
if [ "$1" ]; then
grep "$1" < $ALL_TESTS > $TESTS_TO_RUN
else
mv $ALL_TESTS $TESTS_TO_RUN

View File

@ -40,6 +40,11 @@ commands =
bash -c "find keystone -type f -regex '.*\.pot*' -print0| \
xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:bash8]
envdir = {toxworkdir}/venv
commands =
bash8 examples/pki/gen_pki.sh tools/debug_helper.sh
[tox:jenkins]
downloadcache = ~/cache/pip