Enable bashate during pep8 run
bashate checks shell script syntax (similar to pep8 for python). Fix currently available scripts and enable the check for the scripts. Change-Id: I33dc8c44a58f40e8bca9e29cd717caf46e5cd586
This commit is contained in:
parent
7b00db5f37
commit
6785cad994
@ -99,7 +99,8 @@ DEPRECATED_TEXT="$DEPRECATED_TEXT\n'MANILA_MULTI_BACKEND' is deprecated,
|
|||||||
Use 'MANILA_ENABLED_BACKENDS' instead if you want to use custom setting.
|
Use 'MANILA_ENABLED_BACKENDS' instead if you want to use custom setting.
|
||||||
Set there a list of back end names to be enabled.\n
|
Set there a list of back end names to be enabled.\n
|
||||||
To configure custom back ends use (any opt in any group can be set in this way) following:
|
To configure custom back ends use (any opt in any group can be set in this way) following:
|
||||||
MANILA_OPTGROUP_foo_bar=value, where 'foo' is name of config group and 'bar' is name of option.\n"
|
MANILA_OPTGROUP_foo_bar=value
|
||||||
|
where 'foo' is name of config group and 'bar' is name of option.\n"
|
||||||
|
|
||||||
# First share backend data, that will be used in any installation
|
# First share backend data, that will be used in any installation
|
||||||
MANILA_BACKEND1_CONFIG_GROUP_NAME=${MANILA_BACKEND1_CONFIG_GROUP_NAME:-generic1} # deprecated
|
MANILA_BACKEND1_CONFIG_GROUP_NAME=${MANILA_BACKEND1_CONFIG_GROUP_NAME:-generic1} # deprecated
|
||||||
|
@ -140,13 +140,11 @@ function run_tests {
|
|||||||
set +e
|
set +e
|
||||||
testrargs=`echo "$testrargs" | sed -e's/^\s*\(.*\)\s*$/\1/'`
|
testrargs=`echo "$testrargs" | sed -e's/^\s*\(.*\)\s*$/\1/'`
|
||||||
TESTRTESTS="$TESTRTESTS --testr-args='--subunit --concurrency $concurrency $testropts $testrargs'"
|
TESTRTESTS="$TESTRTESTS --testr-args='--subunit --concurrency $concurrency $testropts $testrargs'"
|
||||||
if [ setup.cfg -nt manila.egg-info/entry_points.txt ]
|
if [ setup.cfg -nt manila.egg-info/entry_points.txt ]; then
|
||||||
then
|
|
||||||
${wrapper} python setup.py egg_info
|
${wrapper} python setup.py egg_info
|
||||||
fi
|
fi
|
||||||
echo "Running \`${wrapper} $TESTRTESTS\`"
|
echo "Running \`${wrapper} $TESTRTESTS\`"
|
||||||
if ${wrapper} which subunit-2to1 2>&1 > /dev/null
|
if ${wrapper} which subunit-2to1 2>&1 > /dev/null; then
|
||||||
then
|
|
||||||
# subunit-2to1 is present, testr subunit stream should be in version 2
|
# subunit-2to1 is present, testr subunit stream should be in version 2
|
||||||
# format. Convert to version one before colorizing.
|
# format. Convert to version one before colorizing.
|
||||||
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py"
|
bash -c "${wrapper} $TESTRTESTS | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py"
|
||||||
@ -182,8 +180,7 @@ function run_pep8 {
|
|||||||
|
|
||||||
TESTRTESTS="python setup.py testr"
|
TESTRTESTS="python setup.py testr"
|
||||||
|
|
||||||
if [ $never_venv -eq 0 ]
|
if [ $never_venv -eq 0 ]; then
|
||||||
then
|
|
||||||
# Remove the virtual environment if --force used
|
# Remove the virtual environment if --force used
|
||||||
if [ $force -eq 1 ]; then
|
if [ $force -eq 1 ]; then
|
||||||
echo "Cleaning virtualenv..."
|
echo "Cleaning virtualenv..."
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# hacking should be first
|
# hacking should be first
|
||||||
hacking>=0.9.2,<0.10
|
hacking>=0.9.2,<0.10
|
||||||
|
|
||||||
|
bashate>=0.2 # Apache-2.0
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
ddt>=0.4.0
|
ddt>=0.4.0
|
||||||
discover
|
discover
|
||||||
|
9
tox.ini
9
tox.ini
@ -18,6 +18,15 @@ downloadcache = ~/cache/pip
|
|||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
flake8 --filename=manila* bin
|
flake8 --filename=manila* bin
|
||||||
|
# Run bashate during pep8 runs to ensure violations are caught by
|
||||||
|
# the check and gate queues.
|
||||||
|
bashate tools/enable-pre-commit-hook.sh \
|
||||||
|
contrib/ci/pre_test_hook.sh \
|
||||||
|
contrib/ci/post_test_hook.sh \
|
||||||
|
contrib/ci/multi_backend/pre_test_hook.sh \
|
||||||
|
contrib/ci/multi_backend/post_test_hook.sh \
|
||||||
|
devstack/plugin.sh \
|
||||||
|
run_tests.sh
|
||||||
|
|
||||||
[testenv:genconfig]
|
[testenv:genconfig]
|
||||||
whitelist_externals = bash
|
whitelist_externals = bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user