[igt-dev] [PATCH i-g-t v2 2/4] run-tests.sh: allow relative IGT_TEST_ROOT and IGT_CONFIG_PATH

Lucas De Marchi lucas.demarchi at intel.com
Thu Mar 15 00:59:08 UTC 2018


When piglit runs it chdir() to its own directory, so passing a relative
path doesn't work. E.g.:

	Fatal Error: IGT directory does not exist. Missing: build/tests

Make sure path is absolute throughout the script.

Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
 scripts/run-tests.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index 1c3f2805..230250dd 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -24,8 +24,8 @@
 
 ROOT="`dirname $0`"
 ROOT="`readlink -f $ROOT/..`"
-IGT_TEST_ROOT="${IGT_TEST_ROOT:-$ROOT/tests}"
-IGT_CONFIG_PATH="${IGT_CONFIG_PATH:-$HOME/.igtrc}"
+IGT_TEST_ROOT="`readlink -f ${IGT_TEST_ROOT:-$ROOT/tests}`"
+IGT_CONFIG_PATH="`readlink -f ${IGT_CONFIG_PATH:-$HOME/.igtrc}`"
 RESULTS="$ROOT/results"
 PIGLIT=`which piglit 2> /dev/null`
 
-- 
2.14.3



More information about the igt-dev mailing list