From: Bartek Grzybowski Date: Fri, 17 Jan 2020 13:35:38 +0000 (+0100) Subject: Fix condition for checking if tests are defined X-Git-Tag: 6.0.0-ONAP~50^2~1 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=0ce90bf6eeb023aecc7d666b53855c4e7d6ff299;p=oom%2Foffline-installer.git Fix condition for checking if tests are defined Native shell conditional is used as previously the condition would give warnings on stderr in certain cases, e.g. when role was removed script reported: "find: ‘ansible/roles/’: No such file or directory" Change-Id: I63f50bda94e144a17307d927a6be70ae270f28bf Signed-off-by: Bartek Grzybowski Issue-ID: OOM-1853 --- diff --git a/offline-installer-review.sh b/offline-installer-review.sh index 3e011ea2..69f438dd 100755 --- a/offline-installer-review.sh +++ b/offline-installer-review.sh @@ -36,7 +36,7 @@ function run_molecule() { local MOLECULE_RC for role in ${roles[@]} do - if `find ${role} -name molecule.yml | grep -q '.*'`; then + if [ -f ${role}/molecule/default/molecule.yml ]; then ./ansible/test/bin/ci-molecule.sh ${role} MOLECULE_RC=$? if [ ${MOLECULE_RC} -ne "0" ]; then FAILED_ROLES+=(${role}); fi