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

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

Issue 1859973002: Autoformat tools/testing/dart (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Format whole directory Created 4 years, 8 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/summary_report.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_configurations.dart
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index c7d4a09c28a75381a72ea95af3c06a5b93a99705..ff482734681a67899028ad8e21647f1e3916090e 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -26,27 +26,27 @@ import "vm_test_config.dart";
* moved to here, if possible.
*/
final TEST_SUITE_DIRECTORIES = [
- new Path('pkg'),
- new Path('third_party/pkg_tested'),
- new Path('runtime/tests/vm'),
- new Path('runtime/observatory/tests/service'),
- new Path('samples'),
- new Path('samples-dev'),
- new Path('tests/benchmark_smoke'),
- new Path('tests/chrome'),
- new Path('tests/compiler/dart2js'),
- new Path('tests/compiler/dart2js_extra'),
- new Path('tests/compiler/dart2js_native'),
- new Path('tests/corelib'),
- new Path('tests/html'),
- new Path('tests/isolate'),
- new Path('tests/language'),
- new Path('tests/lib'),
- new Path('tests/standalone'),
- new Path('tests/try'),
- new Path('tests/utils'),
- new Path('utils/tests/css'),
- new Path('utils/tests/peg'),
+ new Path('pkg'),
+ new Path('third_party/pkg_tested'),
+ new Path('runtime/tests/vm'),
+ new Path('runtime/observatory/tests/service'),
+ new Path('samples'),
+ new Path('samples-dev'),
+ new Path('tests/benchmark_smoke'),
+ new Path('tests/chrome'),
+ new Path('tests/compiler/dart2js'),
+ new Path('tests/compiler/dart2js_extra'),
+ new Path('tests/compiler/dart2js_native'),
+ new Path('tests/corelib'),
+ new Path('tests/html'),
+ new Path('tests/isolate'),
+ new Path('tests/language'),
+ new Path('tests/lib'),
+ new Path('tests/standalone'),
+ new Path('tests/try'),
+ new Path('tests/utils'),
+ new Path('utils/tests/css'),
+ new Path('utils/tests/peg'),
];
void testConfigurations(List<Map> configurations) {
@@ -72,13 +72,15 @@ void testConfigurations(List<Map> configurations) {
if (recordingPath != null && recordingOutputPath != null) {
print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'"
- "at the same time. Exiting ...");
+ "at the same time. Exiting ...");
exit(1);
}
- if (!firstConf['append_logs']) {
- var files = [new File(TestUtils.flakyFileName()),
- new File(TestUtils.testOutcomeFileName())];
+ if (!firstConf['append_logs']) {
+ var files = [
+ new File(TestUtils.flakyFileName()),
+ new File(TestUtils.testOutcomeFileName())
+ ];
for (var file in files) {
if (file.existsSync()) {
file.deleteSync();
@@ -86,18 +88,21 @@ void testConfigurations(List<Map> configurations) {
}
}
- DebugLogger.init(firstConf['write_debug_log'] ?
- TestUtils.debugLogfile() : null, append: firstConf['append_logs']);
+ DebugLogger.init(
+ firstConf['write_debug_log'] ? TestUtils.debugLogfile() : null,
+ append: firstConf['append_logs']);
// Print the configurations being run by this execution of
// test.dart. However, don't do it if the silent progress indicator
// is used. This is only needed because of the junit tests.
if (progressIndicator != 'silent') {
- List output_words = configurations.length > 1 ?
- ['Test configurations:'] : ['Test configuration:'];
+ List output_words = configurations.length > 1
+ ? ['Test configurations:']
+ : ['Test configuration:'];
for (Map conf in configurations) {
List settings = ['compiler', 'runtime', 'mode', 'arch']
- .map((name) => conf[name]).toList();
+ .map((name) => conf[name])
+ .toList();
if (conf['checked']) settings.add('checked');
if (conf['noopt']) settings.add('noopt');
output_words.add(settings.join('_'));
@@ -114,9 +119,9 @@ void testConfigurations(List<Map> configurations) {
var maxBrowserProcesses = maxProcesses;
if (configurations.length > 1 &&
(configurations[0]['test_server_port'] != 0 ||
- configurations[0]['test_server_cross_origin_port'] != 0)) {
+ configurations[0]['test_server_cross_origin_port'] != 0)) {
print("If the http server ports are specified, only one configuration"
- " may be run at a time");
+ " may be run at a time");
exit(1);
}
for (var conf in configurations) {
@@ -127,11 +132,12 @@ void testConfigurations(List<Map> configurations) {
// The http server is available on window.location.port, and a second
// server for cross-domain tests can be found by calling
// getCrossOriginPortNumber().
- var servers = new TestingServers(new Path(TestUtils.buildDir(conf)),
- useContentSecurityPolicy,
- conf['runtime'],
- null,
- conf['package_root']);
+ var servers = new TestingServers(
+ new Path(TestUtils.buildDir(conf)),
+ useContentSecurityPolicy,
+ conf['runtime'],
+ null,
+ conf['package_root']);
serverFutures.add(servers.startServers(conf['local_ip'],
port: conf['test_server_port'],
crossOriginPort: conf['test_server_cross_origin_port']));
@@ -158,7 +164,7 @@ void testConfigurations(List<Map> configurations) {
// for mobile safari simultainiously.
maxBrowserProcesses = 1;
} else if (conf['runtime'] == 'chrome' &&
- Platform.operatingSystem == 'macos') {
+ Platform.operatingSystem == 'macos') {
// Chrome on mac results in random timeouts.
// Issue: https://github.com/dart-lang/sdk/issues/23891
// This change does not fix the problem.
@@ -180,8 +186,8 @@ void testConfigurations(List<Map> configurations) {
if (key == 'co19') {
testSuites.add(new Co19TestSuite(conf));
} else if (conf['compiler'] == 'none' &&
- conf['runtime'] == 'vm' &&
- key == 'vm') {
+ conf['runtime'] == 'vm' &&
+ key == 'vm') {
// vm tests contain both cc tests (added here) and dart tests (added
// in [TEST_SUITE_DIRECTORIES]).
testSuites.add(new VMTestSuite(conf));
@@ -190,17 +196,17 @@ void testConfigurations(List<Map> configurations) {
testSuites.add(new AnalyzeLibraryTestSuite(conf));
}
} else if (conf['compiler'] == 'none' &&
- conf['runtime'] == 'vm' &&
- key == 'pkgbuild') {
+ conf['runtime'] == 'vm' &&
+ key == 'pkgbuild') {
if (!conf['use_repository_packages'] &&
!conf['use_public_packages']) {
print("You need to use either --use-repository-packages or "
- "--use-public-packages with the pkgbuild test suite!");
+ "--use-public-packages with the pkgbuild test suite!");
exit(1);
}
if (!conf['use_sdk']) {
print("Running the 'pkgbuild' test suite requires "
- "passing the '--use-sdk' to test.py");
+ "passing the '--use-sdk' to test.py");
exit(1);
}
testSuites.add(
@@ -211,8 +217,8 @@ void testConfigurations(List<Map> configurations) {
for (final testSuiteDir in TEST_SUITE_DIRECTORIES) {
final name = testSuiteDir.filename;
if (selectors.containsKey(name)) {
- testSuites.add(
- new StandardTestSuite.forDirectory(conf, testSuiteDir));
+ testSuites
+ .add(new StandardTestSuite.forDirectory(conf, testSuiteDir));
}
}
}
@@ -252,9 +258,8 @@ void testConfigurations(List<Map> configurations) {
var printFailureSummary = progressIndicator != 'buildbot';
eventListener.add(new TestFailurePrinter(printFailureSummary, formatter));
}
- eventListener.add(progressIndicatorFromName(progressIndicator,
- startTime,
- formatter));
+ eventListener.add(
+ progressIndicatorFromName(progressIndicator, startTime, formatter));
if (printTiming) {
eventListener.add(new TimingPrinter(startTime));
}
@@ -279,16 +284,17 @@ void testConfigurations(List<Map> configurations) {
void startProcessQueue() {
// [firstConf] is needed here, since the ProcessQueue needs to know the
// settings of 'noBatch' and 'local_ip'
- new ProcessQueue(firstConf,
- maxProcesses,
- maxBrowserProcesses,
- startTime,
- testSuites,
- eventListener,
- allTestsFinished,
- verbose,
- recordingPath,
- recordingOutputPath);
+ new ProcessQueue(
+ firstConf,
+ maxProcesses,
+ maxBrowserProcesses,
+ startTime,
+ testSuites,
+ eventListener,
+ allTestsFinished,
+ verbose,
+ recordingPath,
+ recordingOutputPath);
}
// Start all the HTTP servers required before starting the process queue.
« no previous file with comments | « tools/testing/dart/summary_report.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698