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

Unified Diff: tools/testing/dart/status_reporter.dart

Issue 2914893003: Revert "Replace the configuration map with a typed object." (Closed)
Patch Set: Created 3 years, 7 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 | « tools/testing/dart/status_file.dart ('k') | tools/testing/dart/test_configurations.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/status_reporter.dart
diff --git a/tools/testing/dart/status_reporter.dart b/tools/testing/dart/status_reporter.dart
index b6fd12df8dadd327aae2e6b9bfbd98614a7dde0a..69c1a0e7f7bd42252def60ac59989bb6a51620da 100644
--- a/tools/testing/dart/status_reporter.dart
+++ b/tools/testing/dart/status_reporter.dart
@@ -5,85 +5,96 @@
import 'dart:io';
import 'dart:convert';
-final _combinations = {
- 'linux': [
- {
- 'runtimes': ['none'],
- 'modes': ['release'],
- 'archs': ['x64'],
- 'compiler': 'dart2analyzer'
- },
- {
- 'runtimes': ['vm'],
- 'modes': ['debug', 'release'],
- 'archs': ['ia32', 'x64', 'simarm', 'simmips'],
- 'compiler': 'none'
- },
- {
- 'runtimes': ['d8', 'jsshell', 'chrome', 'ff'],
- 'modes': ['release'],
- 'archs': ['ia32'],
- 'compiler': 'dart2js'
- },
- {
- 'runtimes': ['dartium'],
- 'modes': ['release', 'debug'],
- 'archs': ['ia32'],
- 'compiler': 'none'
- },
- {
- 'runtimes': ['flutter_engine'],
- 'modes': ['debug', 'release'],
- 'archs': ['x64'],
- 'compiler': 'none'
- },
- ],
- 'windows': [
- {
- 'runtimes': ['vm'],
- 'modes': ['debug', 'release'],
- 'archs': ['ia32', 'x64'],
- 'compiler': 'none'
- },
- {
- 'runtimes': ['chrome', 'ff', 'ie11', 'ie10'],
- 'modes': ['release'],
- 'archs': ['ia32'],
- 'compiler': 'dart2js'
- },
- {
- 'runtimes': ['dartium'],
- 'modes': ['release', 'debug'],
- 'archs': ['ia32'],
- 'compiler': 'none'
- },
- ],
- 'macos': [
- {
- 'runtimes': ['vm'],
- 'modes': ['debug', 'release'],
- 'archs': ['ia32', 'x64'],
- 'compiler': 'none'
- },
- {
- 'runtimes': ['safari', 'safarimobilesim'],
- 'modes': ['release'],
- 'archs': ['ia32'],
- 'compiler': 'dart2js'
- },
- {
- 'runtimes': ['dartium'],
- 'modes': ['release', 'debug'],
- 'archs': ['ia32'],
- 'compiler': 'none'
- },
- ]
+final LINUX_COMBINATIONS = [
+ {
+ 'runtimes': ['none'],
+ 'modes': ['release'],
+ 'archs': ['x64'],
+ 'compiler': 'dart2analyzer'
+ },
+ {
+ 'runtimes': ['vm'],
+ 'modes': ['debug', 'release'],
+ 'archs': ['ia32', 'x64', 'simarm', 'simmips'],
+ 'compiler': 'none'
+ },
+ {
+ 'runtimes': ['d8', 'jsshell', 'chrome', 'ff'],
+ 'modes': ['release'],
+ 'archs': ['ia32'],
+ 'compiler': 'dart2js'
+ },
+ {
+ 'runtimes': ['dartium'],
+ 'modes': ['release', 'debug'],
+ 'archs': ['ia32'],
+ 'compiler': 'none'
+ },
+ {
+ 'runtimes': ['flutter_engine'],
+ 'modes': ['debug', 'release'],
+ 'archs': ['x64'],
+ 'compiler': 'none'
+ },
+];
+
+final MACOS_COMBINATIONS = [
+ {
+ 'runtimes': ['vm'],
+ 'modes': ['debug', 'release'],
+ 'archs': ['ia32', 'x64'],
+ 'compiler': 'none'
+ },
+ {
+ 'runtimes': ['safari', 'safarimobilesim'],
+ 'modes': ['release'],
+ 'archs': ['ia32'],
+ 'compiler': 'dart2js'
+ },
+ {
+ 'runtimes': ['dartium'],
+ 'modes': ['release', 'debug'],
+ 'archs': ['ia32'],
+ 'compiler': 'none'
+ },
+];
+
+final WINDOWS_COMBINATIONS = [
+ {
+ 'runtimes': ['vm'],
+ 'modes': ['debug', 'release'],
+ 'archs': ['ia32', 'x64'],
+ 'compiler': 'none'
+ },
+ {
+ 'runtimes': ['chrome', 'ff', 'ie11', 'ie10'],
+ 'modes': ['release'],
+ 'archs': ['ia32'],
+ 'compiler': 'dart2js'
+ },
+ {
+ 'runtimes': ['dartium'],
+ 'modes': ['release', 'debug'],
+ 'archs': ['ia32'],
+ 'compiler': 'none'
+ },
+];
+
+final COMBINATIONS = {
+ 'linux': LINUX_COMBINATIONS,
+ 'windows': WINDOWS_COMBINATIONS,
+ 'macos': MACOS_COMBINATIONS
};
+List<Map> getCombinations() {
+ return COMBINATIONS[Platform.operatingSystem];
+}
+
void ensureBuild(Iterable<String> modes, Iterable<String> archs) {
print('Building many platforms. Please be patient.');
var archString = '-a${archs.join(',')}';
+
var modeString = '-m${modes.join(',')}';
var args = [
@@ -91,7 +102,7 @@ void ensureBuild(Iterable<String> modes, Iterable<String> archs) {
modeString,
archString,
'create_sdk',
- // We build runtime to be able to list cc tests.
+ // We build runtime to be able to list cc tests
'runtime'
];
@@ -108,7 +119,7 @@ void ensureBuild(Iterable<String> modes, Iterable<String> archs) {
}
void sanityCheck(String output) {
- var splitter = new LineSplitter();
+ LineSplitter splitter = new LineSplitter();
var lines = splitter.convert(output);
// Looks like this:
// Total: 15556 tests
@@ -128,7 +139,7 @@ void sanityCheck(String output) {
}
void main(List<String> args) {
- var combinations = _combinations[Platform.operatingSystem];
+ var combinations = getCombinations();
var arches = new Set<String>();
var modes = new Set<String>();
@@ -137,9 +148,9 @@ void main(List<String> args) {
arches = ['ia32'].toSet();
modes = ['release'].toSet();
} else {
- for (var combination in combinations) {
- arches.addAll(combination['archs'] as List<String>);
- modes.addAll(combination['modes'] as List<String>);
+ for (var combo in combinations) {
+ arches.addAll(combo['archs'] as List<String>);
+ modes.addAll(combo['modes'] as List<String>);
}
}
« no previous file with comments | « tools/testing/dart/status_file.dart ('k') | tools/testing/dart/test_configurations.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698