diff options
author | 2020-03-16 11:13:30 +0100 | |
---|---|---|
committer | 2020-03-16 11:16:41 +0100 | |
commit | 0f663f5ce102f2d91c2aa6a8bfb6c2ef13d8ba7d (patch) | |
tree | f6c51fb129fd5434609a0b0b53c651cf38b71535 | |
parent | 0097342b46d1ec890c6133adf252a0e55661ade2 (diff) |
Verify ci/build-cirv.sh via bashate
It also fixes the current errors highlighted by bashate.
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Change-Id: I5614b539efd7a8863ecd354aef3cb94e876ff536
-rwxr-xr-x | ci/build-cirv.sh | 10 | ||||
-rw-r--r-- | test-requirements.txt | 1 | ||||
-rw-r--r-- | tox.ini | 8 |
3 files changed, 13 insertions, 6 deletions
diff --git a/ci/build-cirv.sh b/ci/build-cirv.sh index a303633..66495ba 100755 --- a/ci/build-cirv.sh +++ b/ci/build-cirv.sh @@ -67,21 +67,21 @@ echo # execute pylint to check code quality -function execute_cirv_pylint_check() { +function execute_cirv_pylint_check { if ! ./check -b ; then EXIT=$EXIT_PYLINT_FAILED fi } # verify basic cirv functionality -function execute_cirv_sanity() { +function execute_cirv_sanity { DATE_SUFFIX=$(date -u +"%Y-%m-%d_%H-%M-%S") LOG_FILE="${LOG_FILE_PREFIX}_sanity_${DATE_SUFFIX}.log" echo "Execution of CIRV sanity checks:" for PARAM in '--version' '--help'; do - echo -e "-------------------------------------------------------------------" >> $LOG_FILE + echo -e "------------------------------------------------" >> $LOG_FILE echo "$SWV_BIN $PARAM " >> $LOG_FILE - echo -e "-------------------------------------------------------------------" >> $LOG_FILE + echo -e "------------------------------------------------" >> $LOG_FILE $SWV_BIN $PARAM &>> $LOG_FILE if $SWV_BIN $PARAM &>> $LOG_FILE ; then printf " %-70s %-6s\n" "$SWV_BIN $PARAM" "OK" @@ -116,7 +116,7 @@ case $1 in echo "================" echo "CIRV daily job" echo "================" - + exit $EXIT ;; esac diff --git a/test-requirements.txt b/test-requirements.txt index 4c273f6..f083866 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ flake8 # MIT yamllint +bashate # Apache-2.0 @@ -1,5 +1,5 @@ [tox] -envlist = pep8,yamllint +envlist = pep8,yamllint,bashate skipsdist = true [testenv] @@ -18,3 +18,9 @@ files = tools commands = yamllint -s {[testenv:yamllint]files} + +[testenv:bashate] +basepython = python3 +files = + ci/build-cirv.sh +commands = bashate -e E005,E006,E042,E043 {[testenv:bashate]files} |