Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Unified Diff: tools/run-tests.py

Issue 529703002: Version 3.28.71.6 (merged r23552) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.28
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index 6e9f5549d811b44b488feb94c3d431ffdbac1825..059202430809fc982b692bbcd09bd822471c2f44 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+from collections import OrderedDict
import itertools
import multiprocessing
import optparse
@@ -52,6 +53,31 @@ from testrunner.objects import context
ARCH_GUESS = utils.DefaultArch()
DEFAULT_TESTS = ["mjsunit", "fuzz-natives", "base-unittests",
"cctest", "compiler-unittests", "message", "preparser"]
+
+# Map of test name synonyms to lists of test suites. Should be ordered by
+# expected runtimes (suites with slow test cases first). These groups are
+# invoked in seperate steps on the bots.
+TEST_MAP = {
+ "default": [
+ "mjsunit",
+ "fuzz-natives",
+ "cctest",
+ "message",
+ "preparser",
+ ],
+ "optimize_for_size": [
+ "mjsunit",
+ "cctest",
+ "webkit",
+ ],
+ "unittests": [
+ "compiler-unittests",
+ "heap-unittests",
+ "base-unittests",
+ "libplatform-unittests",
+ ],
+}
+
TIMEOUT_DEFAULT = 60
TIMEOUT_SCALEFACTOR = {"debug" : 4,
"release" : 1 }
@@ -377,14 +403,23 @@ def Main():
suite_paths = utils.GetSuitePaths(join(workspace, "test"))
+ # Expand arguments with grouped tests. The args should reflect the list of
+ # suites as otherwise filters would break.
+ def ExpandTestGroups(name):
+ if name in TEST_MAP:
+ return [suite for suite in TEST_MAP[arg]]
+ else:
+ return [name]
+ args = reduce(lambda x, y: x + y,
+ [ExpandTestGroups(arg) for arg in args],
+ [])
+
if len(args) == 0:
suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ]
else:
- args_suites = set()
+ args_suites = OrderedDict() # Used as set
for arg in args:
- suite = arg.split(os.path.sep)[0]
- if not suite in args_suites:
- args_suites.add(suite)
+ args_suites[arg.split(os.path.sep)[0]] = True
suite_paths = [ s for s in args_suites if s in suite_paths ]
suites = []
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698