aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordengyh <dengyuanhong@chinamobile.com>2022-04-07 15:11:57 +0800
committerdengyh <dengyuanhong@chinamobile.com>2022-04-07 15:12:34 +0800
commit723f796c013bb85e5024a413ccda82341ed980f6 (patch)
tree3a4cd9a3ba595aefb1bd9b83235e88c970a84288
parenta61ff26e3cdef211595eb88f691e6b46e48f1254 (diff)
Fix tox test loop in mvn-phase-script.sh
Refer to: https://gerrit.onap.org/r/c/modeling/etsicatalog/+/128327 Change-Id: I7a62cd53e790d41d90d168fda3cfe9a2c1f285c8 Issue-ID: VFC-1951 Signed-off-by: dengyh <dengyuanhong@chinamobile.com>
-rwxr-xr-xmvn-phase-script.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/mvn-phase-script.sh b/mvn-phase-script.sh
index 13b755e8..ab8155e0 100755
--- a/mvn-phase-script.sh
+++ b/mvn-phase-script.sh
@@ -50,9 +50,9 @@ run_tox_test()
if [[ ${CURDIR} =~ "-sonar" ]]
then
echo "====Sonar job, need execute tox."
- TOXINIS=$(find . -name "tox.ini")
+ TOXINIS=($(find . -name "tox.ini"))
for TOXINI in "${TOXINIS[@]}"; do
- DIR=$(echo "$TOXINI" | rev | cut -f3- -d'/' | rev)
+ DIR=$(dirname "$TOXINI")
cd "${CURDIR}/${DIR}"
rm -rf ./venv-tox ./.tox
virtualenv ./venv-tox