ROOT = os.path.dirname(os.path.dirname(__file__))
-def run_for_python(version, result):
+def run_for_python(version, result, tests):
+ if not tests:
+ tests = ['testtools.tests.test_suite']
# XXX: This could probably be broken up and put into subunit.
python = 'python%s' % (version,)
# XXX: Correct API, but subunit doesn't support it. :(
cmd = [
python,
'-W', 'ignore:Module testtools was already imported',
- subunit_path, 'testtools.tests.test_suite']
+ subunit_path]
+ cmd.extend(tests)
process = subprocess.Popen(
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, env=env)
_make_stream_binary(process.stdout)
sys.path.append(ROOT)
result = TestProtocolClient(sys.stdout)
for version in '2.4 2.5 2.6 2.7 3.0 3.1 3.2'.split():
- run_for_python(version, result)
+ run_for_python(version, result, sys.argv[1:])