Commit 31ea649a authored by Dylan Baker's avatar Dylan Baker

py_modules: Add support for out of tree builds

For out of tree builds we need to point at a TESTS_DIR that is in tree,
and a GENERATED_TESTS dir that is out of tree. At no other time do we
need to do this.
Tested-by: Rafael Antognolli's avatarRafael Antognolli <>
parent b01e868a
......@@ -32,9 +32,11 @@ TESTS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
# If the PIGLIT_BUILD_DIR env var is set, we want to look for the
# generated tests in $PIGLIT_BUILD_DIR/generated_tests/. Otherwise,
# look in TESTS_DIR/../generated_tests.
GENERATED_TESTS_DIR = os.path.abspath(os.path.join(
os.environ.get('PIGLIT_BUILD_DIR', os.path.join(TESTS_DIR, '..')),
build_dir = os.environ.get('PIGLIT_BUILD_TREE')
if not build_dir:
build_dir = os.environ.get('PIGLIT_BUILD_DIR', os.path.join(TESTS_DIR, '..'))
GENERATED_TESTS_DIR = os.path.abspath(os.path.join(build_dir, 'generated_tests'))
# If on cygwin convert to a dos style path
if sys.platform == 'cygwin':
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment