aboutsummaryrefslogtreecommitdiff
path: root/piglit-merge-results.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-10-12 12:06:00 +0200
committerPaul Berry <stereotype441@gmail.com>2011-10-13 09:46:24 -0700
commit88ecb306d3582091585f07e4c2087b4b6b51e461 (patch)
tree545ecea7f562d0710269d34bb784b09a7cfefba5 /piglit-merge-results.py
parent022cc63ccea37f8426c86f61b164289a79fa10db (diff)
downloadpiglit-88ecb306d3582091585f07e4c2087b4b6b51e461.tar.gz
Make Python scripts independent of the current working directory
The main purpose of this patch is to make piglit independent of the current working directory, so it is possible to package piglit as a RPM package (with binaries symlinked to /usr/bin, most of the files in read-only /usr/lib*/piglit directory, and results somewhere else). So it is now possible to run $ piglit-run tests/quick-driver.tests /tmp/piglit and then with this command $ piglit-summary-html --overwrite /tmp/piglit/results /tmp/piglit/main generate a report in /tmp/piglit/results/index.html & al. Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'piglit-merge-results.py')
-rwxr-xr-xpiglit-merge-results.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/piglit-merge-results.py b/piglit-merge-results.py
index eff8d5c6..26d5881c 100755
--- a/piglit-merge-results.py
+++ b/piglit-merge-results.py
@@ -23,8 +23,9 @@
from getopt import getopt, GetoptError
-import sys
+import sys, os.path
+sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
import framework.core as core