diff options
author | Daniel Manrique <roadmr@ubuntu.com> | 2014-12-09 11:18:58 -0500 |
---|---|---|
committer | Daniel Manrique <roadmr@ubuntu.com> | 2014-12-09 11:18:58 -0500 |
commit | 324e2c5af18d0d2b13af74778686a1aa27235bd9 (patch) | |
tree | b124f04d4738dd2f3ee4e48300741ef9341ff089 | |
parent | c3615d9d6ae10c471b646e95b8f4389dcd5c29a0 (diff) |
providers:checkbox: Set PYTHONPATH when invoking piglit tests (LP: #1400769)
This is a kludgy workaround for the linked bug, while a proper solution is implemented by piglit upstream.
-rwxr-xr-x | bin/piglit_test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/piglit_test b/bin/piglit_test index f03e628..2fadfe1 100755 --- a/bin/piglit_test +++ b/bin/piglit_test @@ -27,9 +27,15 @@ class PiglitTests: run_command.extend(['/usr/share/piglit/tests/all.tests', log_path]) + piglit_env = dict(os.environ) + if os.path.isdir("/usr/share/piglit"): + piglit_env['PYTHONPATH'] = "/usr/share/piglit" + piglit_output = check_output(run_command, universal_newlines=True, - stderr=STDOUT) + stderr=STDOUT, + env=piglit_env) + # TODO: Capture stderr instead? for line in piglit_output.split('\n'): if ' :: ' in line: |