Quoting Brian Paul (2017-04-07 12:32:17) > If piglit is built out of source (such as in a top-level build/ directory), > the generated shader tests will be in build/generated_tests/. This patch > checks if PIGLIT_BUILD_DIR is set, and if so, looks for generated_tests/ in > that directory. > > v2: simplify code with os.environ.get(), per Dylan > --- > tests/py_modules/constants.py | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/tests/py_modules/constants.py b/tests/py_modules/constants.py > index a4e7fb3..93072f0 100644 > --- a/tests/py_modules/constants.py > +++ b/tests/py_modules/constants.py > @@ -28,8 +28,13 @@ import sys > import subprocess > > TESTS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) > -GENERATED_TESTS_DIR = os.path.abspath( > - os.path.join(TESTS_DIR, '..', 'generated_tests')) > + > +# 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.
this should be TESTS_DIR/../generated_tests
> +GENERATED_TESTS_DIR = os.path.abspath(os.path.join(
> + os.environ.get('PIGLIT_BUILD_DIR', os.path.join(TESTS_DIR, '..')),
> + 'generated_tests'))
>
> # If on cygwin convert to a dos style path
> if sys.platform == 'cygwin':
> --
> 1.9.1
>
With the comment nit fixed:
Reviewed-by: Dylan Baker <[email protected]>
signature.asc
Description: signature
_______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
