diff options
author | José Fonseca <jfonseca@vmware.com> | 2013-06-26 13:41:15 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-06-27 10:08:37 +0100 |
commit | b45df048036262c2cd1c2ab39cccb67e74c91bf4 (patch) | |
tree | e59b3d391aee6ea176486342ab90cfe2e1eae541 /piglit-print-commands.py | |
parent | 3ff99af358d607211489054e063ba16ed22a3f69 (diff) |
piglit-print-commands: Print relative paths for binaries.
Relative executable paths introduce no new requirements. The tests'
arguments are already relative, so they already imply that the commands
must be run from the top of the piglit directory for printed commands to
work properly.
The benefit of relative executable paths is that it makes it easier to
run the tests on a different directory later on.
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'piglit-print-commands.py')
-rwxr-xr-x | piglit-print-commands.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/piglit-print-commands.py b/piglit-print-commands.py index 74cc70cd1..fb5510c5c 100755 --- a/piglit-print-commands.py +++ b/piglit-print-commands.py @@ -88,7 +88,12 @@ def main(): if isinstance(test, GleanTest): for var, val in test.env.items(): command += var + "='" + val + "' " - command += ' '.join(test.command) + + # Make the test command relative to the piglit_dir + testCommand = test.command[:] + testCommand[0] = os.path.relpath(testCommand[0], piglit_dir) + + command += ' '.join(testCommand) return command profile.prepare_test_list(env) |