summaryrefslogtreecommitdiff
path: root/scripts/run-tests.sh
diff options
context:
space:
mode:
authorLyude <lyude@redhat.com>2017-02-01 15:39:47 -0500
committerLyude <lyude@redhat.com>2017-02-01 15:41:59 -0500
commitecfa97e741649174de1567caad24672b5dc2c533 (patch)
tree94c1fd16025a77f9bf957262749fb94f975885c1 /scripts/run-tests.sh
parent45dbbc32f5304311b7d8e12b4ea69005fa9677f8 (diff)
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 <lyude@redhat.com>
Diffstat (limited to 'scripts/run-tests.sh')
-rwxr-xr-xscripts/run-tests.sh5
1 files changed, 3 insertions, 2 deletions
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