From ed2f1e26103f0d07c7ba815aea8eb1784ca5d458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=ADaz?= Date: Fri, 17 Feb 2017 11:24:00 -0600 Subject: cleanup: fix a few shellcheck errors in automated/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If34415c681906aefc6b5b42401ed995e5cdeda11 Signed-off-by: Daniel Díaz --- automated/linux/ui-browser-test/ui-browser-test.sh | 30 ++++++++++++---------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'automated/linux/ui-browser-test') diff --git a/automated/linux/ui-browser-test/ui-browser-test.sh b/automated/linux/ui-browser-test/ui-browser-test.sh index 44e886b..f40cbf9 100755 --- a/automated/linux/ui-browser-test/ui-browser-test.sh +++ b/automated/linux/ui-browser-test/ui-browser-test.sh @@ -59,23 +59,25 @@ install_deps "${pkgs}" "${SKIP_INSTALL}" mkdir -p "${OUTPUT}" dist_name +# shellcheck disable=SC2154 if [ "${dist}" = "debian" ] || [ "${dist}" = "ubuntu" ]; then "${WD}"/install-on-debian.sh else echo "Not a debian machine" fi -# Copy robot test scripts to /tmp -cp -a robot-test-scripts /tmp/ -# Tests should runs by linaro users because X owned by linaro user. -# linaro user can not create output files in /root -# so change directory to /tmp -cd /tmp -# Run as TESTUSER -su "${TESTUSER}" -c "${WD}"/run-robot-tests.sh -# "${UI_BROWSER_TEST_OUTPUT}" directory created by TESTUSER from run-robot-tests.sh -mv "${UI_BROWSER_TEST_OUTPUT}" "${OUTPUT}" -mv robot-test-scripts "${OUTPUT}" -# Parse test results -python "${WD}"/robot-results-parser.py "${OUTPUT}"/"${UI_BROWSER_TEST_OUTPUT}"/output.xml >> "${RESULT_FILE}" -cd - +( + # Copy robot test scripts to /tmp + cp -a robot-test-scripts /tmp/ || error_msg "Could not copy scripts to /tmp" + # Tests should runs by linaro users because X owned by linaro user. + # linaro user can not create output files in /root + # so change directory to /tmp + cd /tmp || error_msg "Could not cd into /tmp" + # Run as TESTUSER + su "${TESTUSER}" -c "${WD}"/run-robot-tests.sh + # "${UI_BROWSER_TEST_OUTPUT}" directory created by TESTUSER from run-robot-tests.sh + mv "${UI_BROWSER_TEST_OUTPUT}" "${OUTPUT}" + mv robot-test-scripts "${OUTPUT}" + # Parse test results + python "${WD}"/robot-results-parser.py "${OUTPUT}"/"${UI_BROWSER_TEST_OUTPUT}"/output.xml >> "${RESULT_FILE}" +) -- cgit v1.2.3