Update to bashate 0.3.2

Bashate 0.3.2 has a few new checks -- firstly make sure some of the
plugins have #!/bin/bash, and fix up a couple of "local" changes that
were missed by I9c8912a8fd596535589b207d7fc553b9d951d3fe

Change-Id: I9e4b1c0dc9e0f709d8e76f9c9bf1c9478b2605ed
This commit is contained in:
Ian Wienand 2015-10-19 14:17:18 +11:00
parent a692810ef0
commit 5cdee8dd33
8 changed files with 36 additions and 13 deletions

View File

@ -1746,7 +1746,8 @@ function run_phase {
# extras.d in an unsupported way which will let us track
# unsupported usage in the gate.
local exceptions="50-ironic.sh 60-ceph.sh 80-tempest.sh"
local extra=$(basename $extra_plugin_file_name)
local extra
extra=$(basename $extra_plugin_file_name)
if [[ ! ( $exceptions =~ "$extra" ) ]]; then
deprecated "extras.d support is being removed in Mitaka-1"
deprecated "jobs for project $extra will break after that point"
@ -2184,14 +2185,21 @@ function time_start {
# global counter for that name. Errors if that clock had not
# previously been started.
function time_stop {
local name=$1
local start_time=${START_TIME[$name]}
local name
local end_time
local elpased_time
local total
local start_time
name=$1
start_time=${START_TIME[$name]}
if [[ -z "$start_time" ]]; then
die $LINENO "Trying to stop the clock on $name, but it was never started"
fi
local end_time=$(date +%s)
local elapsed_time=$(($end_time - $start_time))
local total=${TOTAL_TIME[$name]:-0}
end_time=$(date +%s)
elapsed_time=$(($end_time - $start_time))
total=${TOTAL_TIME[$name]:-0}
# reset the clock so we can start it in the future
START_TIME[$name]=""
TOTAL_TIME[$name]=$(($total + $elapsed_time))

View File

@ -239,7 +239,8 @@ function start_heat {
run_process h-eng "$HEAT_BIN_DIR/heat-engine --config-file=$HEAT_CONF"
# If the site is not enabled then we are in a grenade scenario
local enabled_site_file=$(apache_site_config_for heat-api)
local enabled_site_file
enabled_site_file=$(apache_site_config_for heat-api)
if [ -f ${enabled_site_file} ] && [ "$HEAT_USE_MOD_WSGI" == "True" ]; then
enable_apache_site heat-api
enable_apache_site heat-api-cfn
@ -284,9 +285,12 @@ function _cleanup_heat_apache_wsgi {
# _config_heat_apache_wsgi() - Set WSGI config files of Heat
function _config_heat_apache_wsgi {
local heat_apache_conf=$(apache_site_config_for heat-api)
local heat_cfn_apache_conf=$(apache_site_config_for heat-api-cfn)
local heat_cloudwatch_apache_conf=$(apache_site_config_for heat-api-cloudwatch)
local heat_apache_conf
heat_apache_conf=$(apache_site_config_for heat-api)
local heat_cfn_apache_conf
heat_cfn_apache_conf=$(apache_site_config_for heat-api-cfn)
local heat_cloudwatch_apache_conf
heat_cloudwatch_apache_conf=$(apache_site_config_for heat-api-cloudwatch)
local heat_ssl=""
local heat_certfile=""
local heat_keyfile=""

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Neutron firewall plugin
# ---------------------------

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Neutron loadbalancer plugin
# ---------------------------

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Neutron metering plugin
# ---------------------------

View File

@ -1,3 +1,5 @@
#!/bin/bash
# Neutron VPN plugin
# ---------------------------

View File

@ -1,2 +1,4 @@
#!/bin/bash
# REVISIT(roeyc): this file left empty so that 'enable_service vmware_nsx'
# continues to work.

View File

@ -9,7 +9,7 @@ install_command = pip install {opts} {packages}
[testenv:bashate]
deps =
{env:BASHATE_INSTALL_PATH:bashate==0.3.1}
{env:BASHATE_INSTALL_PATH:bashate==0.3.2}
whitelist_externals = bash
commands = bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs
@ -20,12 +20,13 @@ commands = bash -c "find {toxinidir} \
-not -name \*.md \
\( \
-name \*.sh -or \
-name \*rc -or \
-name \*.orig -or \
-name \*rc -or \ # openrc files, etc
-name functions\* -or \
-wholename \*/inc/\* -or \ # /inc files and
-wholename \*/lib/\* \ # /lib files are shell, but
\) \ # have no extension
-print0 | xargs -0 bashate -v -iE006"
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
[testenv:docs]
deps =