diff options
Diffstat (limited to 'lib/testtools/scripts/all-pythons')
-rwxr-xr-x | lib/testtools/scripts/all-pythons | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/testtools/scripts/all-pythons b/lib/testtools/scripts/all-pythons index aecc9495a6..5a0c415708 100755 --- a/lib/testtools/scripts/all-pythons +++ b/lib/testtools/scripts/all-pythons @@ -29,7 +29,9 @@ from testtools.content import text_content 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. :( @@ -58,7 +60,8 @@ def run_for_python(version, result): 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) @@ -87,4 +90,4 @@ if __name__ == '__main__': 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:]) |