Commit ccfc4279 authored by Diego Sueiro's avatar Diego Sueiro
Browse files

ewaol-tests: Fix direct execution of run-*-integration-tests



We need to ensure that we don't run bats from the current user ${HOME} to
avoid permission denied error, since at some point it will `cd "$OLDPWD"`
when we already switched to ${EWAOL_TEST_ACCOUNT} via the sudo command.

Issue-Id: SCM-4394
Signed-off-by: Diego Sueiro's avatarDiego Sueiro <diego.sueiro@arm.com>
Change-Id: Ibf13cb577b6dbbef6c2e6242063265fff94c8a08
parent 24118c5f
......@@ -4,6 +4,15 @@
#
# SPDX-License-Identifier: MIT
# We need to ensure that we don't run bats from the current user ${HOME} to
# avoid permission denied error, since at some point it will `cd "$OLDPWD"`
# when we already switched to ${EWAOL_TEST_ACCOUNT} via the following sudo
# command.
if ! cd /home ; then
echo "FAIL:${TEST_SUITE_NAME}"
exit 1
fi
if sudo -HEnu "${EWAOL_TEST_ACCOUNT}" bats "${TEST_DIR}/${TEST_SUITE_NAME}.bats"; then
echo "PASS:${TEST_SUITE_NAME}"
exit 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment