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

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

Issue 2200683002: Add --hot-reload-rollback test mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/test_options.dart ('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']) { 303 if (configuration['hot_reload'] || configuration['hot_reload_rollback']) {
304 // Handle reload special cases. 304 // Handle reload special cases.
305 if (expectations.contains(Expectation.COMPILETIME_ERROR)) { 305 if (expectations.contains(Expectation.COMPILETIME_ERROR)) {
306 // Running a test that expects a compilation error with hot reloading 306 // Running a test that expects a compilation error with hot reloading
307 // is redundant with a regular run of the test. 307 // is redundant with a regular run of the test.
308 return; 308 return;
309 } 309 }
310 } 310 }
311 311
312 // Update Summary report 312 // Update Summary report
313 if (configuration['report']) { 313 if (configuration['report']) {
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 Path filePath = new Path(filename); 843 Path filePath = new Path(filename);
844 844
845 var optionsFromFile = readOptionsFromFile(filePath); 845 var optionsFromFile = readOptionsFromFile(filePath);
846 CreateTest createTestCase = makeTestCaseCreator(optionsFromFile); 846 CreateTest createTestCase = makeTestCaseCreator(optionsFromFile);
847 847
848 if (optionsFromFile['isMultitest']) { 848 if (optionsFromFile['isMultitest']) {
849 group.add(doMultitest(filePath, 849 group.add(doMultitest(filePath,
850 buildDir, 850 buildDir,
851 suiteDir, 851 suiteDir,
852 createTestCase, 852 createTestCase,
853 configuration['hot_reload'])); 853 (configuration['hot_reload'] ||
854 configuration['hot_reload_rollback'])));
854 } else { 855 } else {
855 createTestCase(filePath, filePath, optionsFromFile['hasCompileError'], 856 createTestCase(filePath, filePath, optionsFromFile['hasCompileError'],
856 optionsFromFile['hasRuntimeError'], 857 optionsFromFile['hasRuntimeError'],
857 hasStaticWarning: optionsFromFile['hasStaticWarning']); 858 hasStaticWarning: optionsFromFile['hasStaticWarning']);
858 } 859 }
859 } 860 }
860 861
861 static Path _findPubspecYamlFile(Path filePath) { 862 static Path _findPubspecYamlFile(Path filePath) {
862 final existsCache = TestUtils.existsCache; 863 final existsCache = TestUtils.existsCache;
863 864
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 } 2484 }
2484 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) { 2485 if (path.length > WINDOWS_SHORTEN_PATH_LIMIT) {
2485 ++shortNameCounter; 2486 ++shortNameCounter;
2486 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH); 2487 var pathEnd = path.substring(path.length - WINDOWS_PATH_END_LENGTH);
2487 path = "short${shortNameCounter}_$pathEnd"; 2488 path = "short${shortNameCounter}_$pathEnd";
2488 } 2489 }
2489 } 2490 }
2490 return path; 2491 return path;
2491 } 2492 }
2492 } 2493 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698