[Piglit] [Patch v2 3/4] igt: use piglit.conf instead of a symlink
Dylan Baker
baker.dylan.c at gmail.com
Mon Jul 7 16:20:37 PDT 2014
v2: - change bindir to path (chadv)
Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
piglit.conf.example | 4 ++++
tests/igt.py | 12 +++++-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/piglit.conf.example b/piglit.conf.example
index bff3cfe..8ebef8f 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -6,3 +6,7 @@
[xts]
; Set bindir equal to the root of the xts directory
;path=/home/user/src/xts
+
+[igt]
+; Set bindir equal to the absolute root of the igt directory
+;path=/home/user/src/igt
diff --git a/tests/igt.py b/tests/igt.py
index 54e0907..fd46648 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,9 @@ 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 = os.path.join(framework.core.PIGLIT_CONFIG.get('igt', 'path'),
+ 'tests')
+ 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