[Python-checkins] devinabox: Add a Python script which will run the test suite in the most rigorous way
brett.cannon
python-checkins at python.org
Mon Feb 28 23:03:50 CET 2011
brett.cannon pushed 3e5a61adb41d to devinabox:
http://hg.python.org/devinabox/rev/3e5a61adb41d
changeset: 8:3e5a61adb41d
user: Brett Cannon <brett at python.org>
date: Fri Feb 25 17:35:37 2011 -0800
summary:
Add a Python script which will run the test suite in the most rigorous way possible.
files:
run_tests.py
diff --git a/run_tests.py b/run_tests.py
new file mode 100644
--- /dev/null
+++ b/run_tests.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+"""Run CPython's test suite in the most rigorous way possible."""
+import multiprocessing
+import os
+import subprocess
+import sys
+
+
+directory = 'cpython'
+cmd = os.path.join(directory, 'python')
+# UNIX
+if not os.path.isfile(cmd):
+ # OS X
+ cmd += '.exe'
+ if not os.path.isfile(cmd):
+ # 32-bit Windows
+ cmd = os.path.join(directory, 'PCBuild', 'python_d.exe')
+ if not os.path.isfile(cmd):
+ # 64-bit Windows
+ cmd = os.path.join(directory, 'PCBuild', 'AMD64', 'python_d.exe')
+ if not os.path.isfile(cmd):
+ print('CPython is not built')
+ sys.exit(1)
+
+subprocess.call([cmd, '-W', 'default', '-bb', '-E', '-m', 'test', '-r', '-w',
+ '-u', 'all', '-j', str(multiprocessing.cpu_count())])
--
Repository URL: http://hg.python.org/devinabox
More information about the Python-checkins
mailing list