Reduce number of places where sys.path is (possibly) updated for external module...
[sfrench/samba-autobuild/.git] / selftest / filter-subunit
index 2ce9584c2a5305ac41f0807d3131215ce28da338..4f95546794a64a07cf78631fe6724757e7d78c20 100755 (executable)
 # to upstream subunit's filtering tools.
 
 import optparse
-import os
 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"))
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/mimeparse"))
-sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
+sys.path.insert(0, "bin/python")
+import samba
+samba.ensure_external_module("mimeparse", "mimeparse")
+samba.ensure_external_module("extras", "extras")
+samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
 
 import subunithelper