diff --git a/integration_tests/0096_system_extra_dependencies/test.sh b/integration_tests/0096_system_extra_dependencies/test.sh index e3b4d43..5239574 100755 --- a/integration_tests/0096_system_extra_dependencies/test.sh +++ b/integration_tests/0096_system_extra_dependencies/test.sh @@ -15,26 +15,27 @@ RET=0 cd "${MFEXT_HOME}" || exit 1 -cd opt -for layer in `ls`; do - cd "${layer}" +cd opt || exit 1 +for layer in *; do + [[ -e $layer ]] || break + cd "${layer}" || exit 1 if test -f .mfextaddon; then - addon="mfextaddon_"`cat .mfextaddon` + addon="mfextaddon_"$(cat .mfextaddon) if test "mfextaddon_php" = "${addon}"; then echo echo "=== System extra dependencies layer ${layer} ===" echo - current_layer=`cat .layerapi2_label` - DEPS1=$(layer_wrapper --layers=${current_layer} -- external_dependencies.sh |awk -F '/' '{print $NF}' |xargs) + current_layer=$(cat .layerapi2_label) + DEPS1=$(layer_wrapper --layers="${current_layer}" -- external_dependencies.sh |awk -F '/' '{print $NF}' |xargs) # We don t consider libraries available in the layer (they should not be here, probably a LD_LIBRARY_PATH issue) DEPS2="" for lib in ${DEPS1}; do - found=$(find . -name ${lib} -print) + found=$(find . -name "${lib}" -print) if test "${found}" == ""; then DEPS2="${DEPS2} ${lib}" fi done - echo "--- external dependencies ---" ${DEPS2} + echo "--- external dependencies ---" "${DEPS2}" for DEP in ${DEPS2}; do FOUND=0 for OK_DEP in ${OK_DEPS}; do @@ -53,11 +54,11 @@ for layer in `ls`; do echo RET=1 done - DEPS3=$(layer_wrapper --layers=${current_layer} -- external_dependencies_not_found.sh |xargs) + DEPS3=$(layer_wrapper --layers="${current_layer}" -- external_dependencies_not_found.sh |xargs) # We don t consider libraries available in the layer (they should not be here, probably a LD_LIBRARY_PATH issue) DEPS4="" for lib in ${DEPS3}; do - found=$(find . -name ${lib} -print) + found=$(find . -name "${lib}" -print) if test "${found}" == ""; then DEPS4="${DEPS4} ${lib}" fi