summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-03-31 04:52:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-03-31 04:52:13 +0200
commit74f36df4b30601417dc69031bf6f1af4c652e440 (patch)
tree6a30376252a1a039023e0c89c31942d490a9bb72
parentc6b1553a2b83c5e70fcb1a3a76e49ed496553a4e (diff)
downloadsamba-74f36df4b30601417dc69031bf6f1af4c652e440.tar.gz
samba-74f36df4b30601417dc69031bf6f1af4c652e440.tar.bz2
samba-74f36df4b30601417dc69031bf6f1af4c652e440.zip
selftest: Update sys.path before attempting to import external modules.
-rwxr-xr-xselftest/filter-subunit3
-rwxr-xr-xselftest/format-subunit5
2 files changed, 5 insertions, 3 deletions
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 41d92c97e8..605a89840a 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -5,13 +5,14 @@
import optparse
import os
-import subunithelper
import sys
import signal
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
+import subunithelper
+
parser = optparse.OptionParser("filter-subunit [options] < instream > outstream")
parser.add_option("--expected-failures", type="string",
help="File containing list of regexes matching tests to consider known "
diff --git a/selftest/format-subunit b/selftest/format-subunit
index e590652cd1..54949df97a 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -8,12 +8,13 @@ import optparse
import os
import signal
import sys
-import subunithelper
-import subunit
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
+import subunithelper
+import subunit
+
class PlainFormatter(object):
def __init__(self, summaryfile, verbose, immediate, statistics,