X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fengine%2Fscripts%2Fengine-verify-tox.sh;h=be8b84623612569a2081cd1489369cc9b7360cbb;hb=9714e3e22c64aff876cfa1f04e42c046edb89a1d;hp=b3a64c6edd41fbbaf90bd80e02d5ea56d4bec1d2;hpb=44122b30dd9968ba5e708618ef982c8fb09923f0;p=infra%2Fcicd.git diff --git a/jjb/engine/scripts/engine-verify-tox.sh b/jjb/engine/scripts/engine-verify-tox.sh index b3a64c6e..be8b8462 100755 --- a/jjb/engine/scripts/engine-verify-tox.sh +++ b/jjb/engine/scripts/engine-verify-tox.sh @@ -32,10 +32,11 @@ run_tox() { echo "Info : Preparing to run tox for the repo $GERRIT_PROJECT" - # set defaults - VERBOSITY=${VERBOSITY:-false} + # set and export defaults LINT_TYPE="${LINT_TYPE:-ansible-lint}" - export VERBOSITY LINT_TYPE + REPOS_TO_IGNORE="${REPOS_TO_IGNORE:-none}" + VERBOSITY=${VERBOSITY:-false} + export LINT_TYPE REPOS_TO_IGNORE VERBOSITY # check if the change is for a repo we should ignore if [[ "$REPOS_TO_IGNORE" =~ "$GERRIT_PROJECT" ]]; then @@ -63,9 +64,10 @@ run_tox() { redirect_cmd source .venv/bin/activate set -u - # install test-requirements - echo "Info : Install python packages listed in test-requirements.txt using pip" - redirect_cmd pip install --force-reinstall -r test-requirements.txt + # install only tox since the rest of the requirements are installed by tox itself + TOX_PACKAGE=$(grep "^tox==" test-requirements.txt) + echo "Info : Install $TOX_PACKAGE" + redirect_cmd pip install --force-reinstall "$TOX_PACKAGE" # run tox echo "Info : Run $LINT_TYPE using tox"