[Piglit] [PATCH 1/2] piglit-print-commands: Print relative paths for binaries.
jfonseca at vmware.com
jfonseca at vmware.com
Wed Jun 26 07:23:55 PDT 2013
From: José Fonseca <jfonseca at vmware.com>
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.
---
piglit-print-commands.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/piglit-print-commands.py b/piglit-print-commands.py
index 74cc70c..fb5510c 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)
--
1.8.1.2
More information about the Piglit
mailing list