From ecfa97e741649174de1567caad24672b5dc2c533 Mon Sep 17 00:00:00 2001 From: Lyude Date: Wed, 1 Feb 2017 15:39:47 -0500 Subject: scripts: Set IGT_CONFIG_PATH in run-tests.sh Since we run igt under sudo, the home directory changes to that of the root account. This causes the chamelium tests to incorrectly search the root's home directory for the .igtrc file instead of the current user's home directory. So set IGT_CONFIG_PATH to default to $HOME/.igtrc. Signed-off-by: Lyude --- scripts/run-tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/run-tests.sh') diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 97ba9e55..bc2528c8 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -25,6 +25,7 @@ ROOT="`dirname $0`" ROOT="`readlink -f $ROOT/..`" IGT_TEST_ROOT="$ROOT/tests" +IGT_CONFIG_PATH="${IGT_CONFIG_PATH:-$HOME/.igtrc}" RESULTS="$ROOT/results" PIGLIT=`which piglit 2> /dev/null` @@ -122,10 +123,10 @@ if [ ! -x "$PIGLIT" ]; then fi if [ "x$RESUME" != "x" ]; then - sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" resume "$RESULTS" $NORETRY + sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" IGT_CONFIG_PATH="$IGT_CONFIG_PATH" "$PIGLIT" resume "$RESULTS" $NORETRY else mkdir -p "$RESULTS" - sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" "$PIGLIT" run igt -o "$RESULTS" -s $VERBOSE $EXCLUDE $FILTER + sudo IGT_TEST_ROOT="$IGT_TEST_ROOT" IGT_CONFIG_PATH="$IGT_CONFIG_PATH" "$PIGLIT" run igt -o "$RESULTS" -s $VERBOSE $EXCLUDE $FILTER fi if [ "$SUMMARY" == "html" ]; then -- cgit v1.2.3