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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 2128923003: Small tweaks to hot reload testing (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rmacnak review Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 int shards = configuration['shards']; 293 int shards = configuration['shards'];
294 if (shards > 1 && testCase.hash % shards != configuration['shard'] - 1) { 294 if (shards > 1 && testCase.hash % shards != configuration['shard'] - 1) {
295 return; 295 return;
296 } 296 }
297 // Test if the selector includes this test. 297 // Test if the selector includes this test.
298 RegExp pattern = configuration['selectors'][suiteName]; 298 RegExp pattern = configuration['selectors'][suiteName];
299 if (!pattern.hasMatch(testCase.displayName)) { 299 if (!pattern.hasMatch(testCase.displayName)) {
300 return; 300 return;
301 } 301 }
302 302
303 if (configuration['hot_reload']) {
304 // Handle reload special cases.
305 if (expectations.contains(Expectation.COMPILETIME_ERROR)) {
306 // Skip reloading tests with expected compilation errors.
307 return;
308 }
309 }
310
303 // Update Summary report 311 // Update Summary report
304 if (configuration['report']) { 312 if (configuration['report']) {
305 if (testCase.expectCompileError && 313 if (testCase.expectCompileError &&
306 TestUtils.isBrowserRuntime(configuration['runtime']) && 314 TestUtils.isBrowserRuntime(configuration['runtime']) &&
307 new CompilerConfiguration(configuration).hasCompiler) { 315 new CompilerConfiguration(configuration).hasCompiler) {
308 summaryReport.addCompileErrorSkipTest(); 316 summaryReport.addCompileErrorSkipTest();
309 return; 317 return;
310 } else { 318 } else {
311 summaryReport.add(testCase); 319 summaryReport.add(testCase);
312 } 320 }
(...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2470 } 2478 }
2471 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { 2479 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) {
2472 ++shortNameCounter; 2480 ++shortNameCounter;
2473 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); 2481 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH);
2474 path = "short${shortNameCounter}_$pathEnd"; 2482 path = "short${shortNameCounter}_$pathEnd";
2475 } 2483 }
2476 } 2484 }
2477 return path; 2485 return path;
2478 } 2486 }
2479 } 2487 }
OLDNEW
« no previous file with comments | « tests/lib/lib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698