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:
parent
a692810ef0
commit
5cdee8dd33
@ -1746,7 +1746,8 @@ function run_phase {
|
|||||||
# extras.d in an unsupported way which will let us track
|
# extras.d in an unsupported way which will let us track
|
||||||
# unsupported usage in the gate.
|
# unsupported usage in the gate.
|
||||||
local exceptions="50-ironic.sh 60-ceph.sh 80-tempest.sh"
|
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
|
if [[ ! ( $exceptions =~ "$extra" ) ]]; then
|
||||||
deprecated "extras.d support is being removed in Mitaka-1"
|
deprecated "extras.d support is being removed in Mitaka-1"
|
||||||
deprecated "jobs for project $extra will break after that point"
|
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
|
# global counter for that name. Errors if that clock had not
|
||||||
# previously been started.
|
# previously been started.
|
||||||
function time_stop {
|
function time_stop {
|
||||||
local name=$1
|
local name
|
||||||
local start_time=${START_TIME[$name]}
|
local end_time
|
||||||
|
local elpased_time
|
||||||
|
local total
|
||||||
|
local start_time
|
||||||
|
|
||||||
|
name=$1
|
||||||
|
start_time=${START_TIME[$name]}
|
||||||
|
|
||||||
if [[ -z "$start_time" ]]; then
|
if [[ -z "$start_time" ]]; then
|
||||||
die $LINENO "Trying to stop the clock on $name, but it was never started"
|
die $LINENO "Trying to stop the clock on $name, but it was never started"
|
||||||
fi
|
fi
|
||||||
local end_time=$(date +%s)
|
end_time=$(date +%s)
|
||||||
local elapsed_time=$(($end_time - $start_time))
|
elapsed_time=$(($end_time - $start_time))
|
||||||
local total=${TOTAL_TIME[$name]:-0}
|
total=${TOTAL_TIME[$name]:-0}
|
||||||
# reset the clock so we can start it in the future
|
# reset the clock so we can start it in the future
|
||||||
START_TIME[$name]=""
|
START_TIME[$name]=""
|
||||||
TOTAL_TIME[$name]=$(($total + $elapsed_time))
|
TOTAL_TIME[$name]=$(($total + $elapsed_time))
|
||||||
|
12
lib/heat
12
lib/heat
@ -239,7 +239,8 @@ function start_heat {
|
|||||||
run_process h-eng "$HEAT_BIN_DIR/heat-engine --config-file=$HEAT_CONF"
|
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
|
# 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
|
if [ -f ${enabled_site_file} ] && [ "$HEAT_USE_MOD_WSGI" == "True" ]; then
|
||||||
enable_apache_site heat-api
|
enable_apache_site heat-api
|
||||||
enable_apache_site heat-api-cfn
|
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
|
# _config_heat_apache_wsgi() - Set WSGI config files of Heat
|
||||||
function _config_heat_apache_wsgi {
|
function _config_heat_apache_wsgi {
|
||||||
|
|
||||||
local heat_apache_conf=$(apache_site_config_for heat-api)
|
local heat_apache_conf
|
||||||
local heat_cfn_apache_conf=$(apache_site_config_for heat-api-cfn)
|
heat_apache_conf=$(apache_site_config_for heat-api)
|
||||||
local heat_cloudwatch_apache_conf=$(apache_site_config_for heat-api-cloudwatch)
|
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_ssl=""
|
||||||
local heat_certfile=""
|
local heat_certfile=""
|
||||||
local heat_keyfile=""
|
local heat_keyfile=""
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# Neutron firewall plugin
|
# Neutron firewall plugin
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# Neutron loadbalancer plugin
|
# Neutron loadbalancer plugin
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# Neutron metering plugin
|
# Neutron metering plugin
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# Neutron VPN plugin
|
# Neutron VPN plugin
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
|
2
lib/neutron_thirdparty/vmware_nsx
vendored
2
lib/neutron_thirdparty/vmware_nsx
vendored
@ -1,2 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
# REVISIT(roeyc): this file left empty so that 'enable_service vmware_nsx'
|
# REVISIT(roeyc): this file left empty so that 'enable_service vmware_nsx'
|
||||||
# continues to work.
|
# continues to work.
|
||||||
|
7
tox.ini
7
tox.ini
@ -9,7 +9,7 @@ install_command = pip install {opts} {packages}
|
|||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
deps =
|
deps =
|
||||||
{env:BASHATE_INSTALL_PATH:bashate==0.3.1}
|
{env:BASHATE_INSTALL_PATH:bashate==0.3.2}
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
commands = bash -c "find {toxinidir} \
|
commands = bash -c "find {toxinidir} \
|
||||||
-not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs
|
-not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs
|
||||||
@ -20,12 +20,13 @@ commands = bash -c "find {toxinidir} \
|
|||||||
-not -name \*.md \
|
-not -name \*.md \
|
||||||
\( \
|
\( \
|
||||||
-name \*.sh -or \
|
-name \*.sh -or \
|
||||||
-name \*rc -or \
|
-name \*.orig -or \
|
||||||
|
-name \*rc -or \ # openrc files, etc
|
||||||
-name functions\* -or \
|
-name functions\* -or \
|
||||||
-wholename \*/inc/\* -or \ # /inc files and
|
-wholename \*/inc/\* -or \ # /inc files and
|
||||||
-wholename \*/lib/\* \ # /lib files are shell, but
|
-wholename \*/lib/\* \ # /lib files are shell, but
|
||||||
\) \ # have no extension
|
\) \ # have no extension
|
||||||
-print0 | xargs -0 bashate -v -iE006"
|
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps =
|
deps =
|
||||||
|
Loading…
Reference in New Issue
Block a user