[Piglit] [PATCH 15/20] framework: Add script path, rather than realpath(argv[0]) path, to module search path.

Jon Severinsson jon at severinsson.net
Wed Apr 17 09:14:54 PDT 2013


---
 piglit-merge-results.py  |    2 +-
 piglit-print-commands.py |    2 +-
 piglit-run.py            |    2 +-
 piglit-summary-html.py   |    2 +-
 piglit-summary-junit.py  |    2 +-
 5 filer ändrade, 5 tillägg(+), 5 borttagningar(-)

diff --git a/piglit-merge-results.py b/piglit-merge-results.py
index 2f389c8..c8091ec 100755
--- a/piglit-merge-results.py
+++ b/piglit-merge-results.py
@@ -27,7 +27,7 @@ from __future__ import print_function
 from getopt import getopt, GetoptError
 import sys, os.path
 
-sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
+sys.path.append(os.path.dirname(__file__))
 import framework.core as core
 
 
diff --git a/piglit-print-commands.py b/piglit-print-commands.py
index 228ac84..c1eddbb 100755
--- a/piglit-print-commands.py
+++ b/piglit-print-commands.py
@@ -29,7 +29,7 @@ import time
 import traceback
 import json
 
-sys.path.append(path.dirname(path.realpath(sys.argv[0])))
+sys.path.append(os.path.dirname(__file__))
 import framework.core as core
 from framework.exectest import ExecTest
 from framework.gleantest import GleanTest
diff --git a/piglit-run.py b/piglit-run.py
index 32c0c16..e882e41 100755
--- a/piglit-run.py
+++ b/piglit-run.py
@@ -30,7 +30,7 @@ import time
 import traceback
 import json
 
-sys.path.append(path.dirname(path.realpath(sys.argv[0])))
+sys.path.append(os.path.dirname(__file__))
 import framework.core as core
 from framework.threads import synchronized_self
 
diff --git a/piglit-summary-html.py b/piglit-summary-html.py
index e8ae339..cabf84a 100755
--- a/piglit-summary-html.py
+++ b/piglit-summary-html.py
@@ -28,7 +28,7 @@ import cgi
 import os, os.path
 import sys
 
-sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
+sys.path.append(os.path.dirname(__file__))
 import framework.core as core
 import framework.summary
 
diff --git a/piglit-summary-junit.py b/piglit-summary-junit.py
index 6520888..d071f09 100755
--- a/piglit-summary-junit.py
+++ b/piglit-summary-junit.py
@@ -28,7 +28,7 @@ import optparse
 import os
 import sys
 
-sys.path.append(os.path.dirname(os.path.realpath(sys.argv[0])))
+sys.path.append(os.path.dirname(__file__))
 import framework.core
 import framework.summary
 from framework import junit
-- 
1.7.10.4



More information about the Piglit mailing list