[Piglit] [PATCH] piglit-run: support storing results outside of piglit_dir

Scott Tsai scottt.tw at gmail.com
Thu Jan 12 17:53:24 PST 2012

piglit-run.py takes the directory to store the results in as a command
line argument, yet always chdir's to piglit_dir first before accessing it.
When running piglit from outside of piglit_dir, this is surprising to the
user and will fail when piglit is packaged in a distribution and the user
can't write to piglit_dir.

This came up while packaging piglit for Fedora:
where all piglit code is placed under /usr/lib64/piglit/ and symbolic
links to the piglit-* scripts are created in /usr/bin/.

Signed-off-by: Scott Tsai <scottt.tw at gmail.com>
 piglit-run.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/piglit-run.py b/piglit-run.py
index 92b554d..f67984f 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -105,7 +105,7 @@ def main():
 	profileFilename = args[0]
-	resultsDir = args[1]
+	resultsDir = path.realpath(args[1])
 	# Change to the piglit's path
 	piglit_dir = path.dirname(path.realpath(sys.argv[0]))

More information about the Piglit mailing list