Allow the IGT_TEST_ROOT environment variable to specify the location of the intel-gpu-tools tests. Check for the presence of the test lists to determine whether the location is correct.
Signed-off-by: Thomas Wood <thomas.w...@intel.com> --- tests/igt.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/igt.py b/tests/igt.py index aeb875e..2b812a7 100644 --- a/tests/igt.py +++ b/tests/igt.py @@ -64,13 +64,22 @@ def checkEnvironment(): print "Test Environment check: Succeeded." return True -if not os.path.exists(os.path.join(TEST_BIN_DIR, 'igt')): - print "igt symlink not found!" +if 'IGT_TEST_ROOT' in os.environ: + igtTestRoot = os.environ['IGT_TEST_ROOT'] +else: + # Chase the piglit/bin/igt symlink to find where the tests really live. + if os.path.exists(path.join(TEST_BIN_DIR, 'igt')): + igtTestRoot = path.join(path.realpath(path.join(TEST_BIN_DIR, 'igt')), + 'tests') + else: + igtTestRoot='' + +# check for the test lists +if not (os.path.exists(os.path.join(igtTestRoot, 'single-tests.txt')) + and os.path.exists(os.path.join(igtTestRoot, 'multi-tests.txt'))): + print "intel-gpu-tools test lists not found." sys.exit(0) -# Chase the piglit/bin/igt symlink to find where the tests really live. -igtTestRoot = path.join(path.realpath(path.join(TEST_BIN_DIR, 'igt')), 'tests') - igtEnvironmentOk = checkEnvironment() profile = TestProfile() -- 1.9.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit