summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-07-09 09:35:22 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-07-15 21:16:35 -0700
commitd91a4cfeee52b6ab7962ea7bbee371663e85a282 (patch)
tree31ebea2e73b6d236ba23f94f375a3bbe11796d34 /framework
parente2a761a27b9f91644fc8a5fc27537fd788542be8 (diff)
framework: Set env var PIGLIT_SOURCE_DIR if unset
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 <chad.versace@linux.intel.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/core.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/core.py b/framework/core.py
index 4c255ca7..b20fd898 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