Otherwise, if the user forgets to set PIGLIT_SOURCE_DIR himself, then
tests that use piglit_source_dir() will fail.

Signed-off-by: Chad Versace <[email protected]>
---
 framework/core.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/core.py b/framework/core.py
index 4c255ca..b20fd89 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -206,6 +206,9 @@ if 'PIGLIT_BUILD_DIR' in os.environ:
 else:
     testBinDir = os.path.dirname(__file__) + '/../bin/'
 
+if 'PIGLIT_SOURCE_DIR' not in os.environ:
+    p = os.path
+    os.environ['PIGLIT_SOURCE_DIR'] = p.abspath(p.join(p.dirname(__file__), 
'..'))
 
 #############################################################################
 ##### Result classes
-- 
1.7.11.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to