[Piglit] [PATCH 3/4] igt: use piglit.conf instead of a symlink
Dylan Baker
baker.dylan.c at gmail.com
Mon Jun 30 16:53:21 PDT 2014
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
piglit.conf.example | 4 ++++
tests/igt.py | 11 ++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/piglit.conf.example b/piglit.conf.example
index 3c1fe63..68dbc20 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -6,3 +6,7 @@
[xts]
; Set bindir equal to the root of the xts directory
;bindir=/home/user/src/xts
+
+[igt]
+; Set bindir equal to the absolute root of the igt directory
+;bindir=/home/user/src/igt
diff --git a/tests/igt.py b/tests/igt.py
index 54e0907..3cb293a 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -33,8 +33,9 @@ import errno
from datetime import datetime
from os import path
+import framework.core
from framework.profile import TestProfile
-from framework.exectest import Test, TEST_BIN_DIR
+from framework.exectest import Test
__all__ = ['profile']
@@ -67,12 +68,8 @@ def checkEnvironment():
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 = ''
+ igtTestRoot = framework.core.PIGLIT_CONFIG.get('igt', 'bindir')
+ assert os.path.exists(igtTestRoot)
# check for the test lists
if not (os.path.exists(os.path.join(igtTestRoot, 'single-tests.txt'))
--
2.0.0
More information about the Piglit
mailing list