Fix condition for checking if tests are defined 10/100410/1
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Fri, 17 Jan 2020 13:35:38 +0000 (14:35 +0100)
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>
Fri, 17 Jan 2020 13:35:38 +0000 (14:35 +0100)
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/<rolename>’: No such file or directory"

Change-Id: I63f50bda94e144a17307d927a6be70ae270f28bf
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
Issue-ID: OOM-1853

offline-installer-review.sh

index 3e011ea..69f438d 100755 (executable)
@@ -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