From 13f8a7d21d255d8d6f28c816709a432dbf6cab82 Mon Sep 17 00:00:00 2001 From: Marcus Holl Date: Tue, 26 Feb 2019 16:47:31 +0100 Subject: [PATCH] cc: fix indents. --- consumer-test/integrationTestController.sh | 62 +++++++++++----------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/consumer-test/integrationTestController.sh b/consumer-test/integrationTestController.sh index 6b2415640..cbc151f34 100755 --- a/consumer-test/integrationTestController.sh +++ b/consumer-test/integrationTestController.sh @@ -8,31 +8,31 @@ TEST_CASES=`find . -type f -depth 2 -name '*.yml'` i=0 for f in ${TEST_CASES} do - testCase=`basename ${f%.*}` - area=`dirname ${f#*/}` - echo "[INFO] Running test case \"${testCase}\" in area \"${area}\"." - TEST_CASE_ROOT="${WORKSPACES_ROOT}/${area}/${testCase}" - [ -e "${TEST_CASE_ROOT}" ] && rm -rf "${TEST_CASE_ROOT}" - mkdir -p "${TEST_CASE_ROOT}" - source runTest.sh "${area}" "${testCase}" "${TEST_CASE_ROOT}" &> "${TEST_CASE_ROOT}/log.txt" & - pid=$! - processes[$i]="${testCase}:${pid}" - echo "[INFO] Test case \"${testCase}\" in area \"${area}\" launched. (PID: \"${pid}\")." - let i=i+1 + testCase=`basename ${f%.*}` + area=`dirname ${f#*/}` + echo "[INFO] Running test case \"${testCase}\" in area \"${area}\"." + TEST_CASE_ROOT="${WORKSPACES_ROOT}/${area}/${testCase}" + [ -e "${TEST_CASE_ROOT}" ] && rm -rf "${TEST_CASE_ROOT}" + mkdir -p "${TEST_CASE_ROOT}" + source runTest.sh "${area}" "${testCase}" "${TEST_CASE_ROOT}" &> "${TEST_CASE_ROOT}/log.txt" & + pid=$! + processes[$i]="${testCase}:${pid}" + echo "[INFO] Test case \"${testCase}\" in area \"${area}\" launched. (PID: \"${pid}\")." + let i=i+1 done # # wait for the test cases and cat the log for p in "${processes[@]}" do - testCase=${p%:*} - processId=${p#*:} - echo "[INFO] Waiting for test case \"${testCase}\" (PID: \"${processId}\")." - wait ${processId} - echo "[INFO] Test case \"${testCase}\" finished (PID: \"${processId}\")." - echo "[INFO] Logs for test case \"${testCase}\"." - cat "${TEST_CASE_ROOT}/log.txt" - echo "[INFO] Logs for test case \"${testCase}\"." + testCase=${p%:*} + processId=${p#*:} + echo "[INFO] Waiting for test case \"${testCase}\" (PID: \"${processId}\")." + wait ${processId} + echo "[INFO] Test case \"${testCase}\" finished (PID: \"${processId}\")." + echo "[INFO] Logs for test case \"${testCase}\"." + cat "${TEST_CASE_ROOT}/log.txt" + echo "[INFO] Logs for test case \"${testCase}\"." done # @@ -41,22 +41,22 @@ echo "[INFO] Build status:" failure="false" for p in "${processes[@]}" do - status="UNDEFINED" - testCase=${p%:*} - if [ -f "${TEST_CASE_ROOT}/SUCCESS" ] - then - status="SUCCESS" - else - status="FAILURE" - failure="true" - fi - printf "[INFO] %-30s: %s\n" "${testCase}" ${status} + status="UNDEFINED" + testCase=${p%:*} + if [ -f "${TEST_CASE_ROOT}/SUCCESS" ] + then + status="SUCCESS" + else + status="FAILURE" + failure="true" + fi + printf "[INFO] %-30s: %s\n" "${testCase}" ${status} done if [ "${failure}" == "true" ] then - echo "[WARNING] There are test failures. Check earlier log for details." - exit 1 + echo "[WARNING] There are test failures. Check earlier log for details." + exit 1 fi echo "[INFO] Integration tests succeeded."