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

Side by Side Diff: tests/stub-generator/test_config.dart

Issue 8872064: Cache the tests across configurations in the test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/testing/dart/multitest.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("stub_generator_test_config"); 5 #library("stub_generator_test_config");
6 6
7 #import("../../tools/testing/dart/test_suite.dart"); 7 #import("../../tools/testing/dart/test_suite.dart");
8 8
9 class StubGeneratorTestSuite extends StandardTestSuite { 9 class StubGeneratorTestSuite extends StandardTestSuite {
10 String dartcPath; 10 String dartcPath;
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 combineFiles(filename, stubsPath, onGenerated); 94 combineFiles(filename, stubsPath, onGenerated);
95 }; 95 };
96 dartcProcess.start(); 96 dartcProcess.start();
97 } 97 }
98 98
99 void processFile(String filename) { 99 void processFile(String filename) {
100 // Only run the tests that match the pattern. 100 // Only run the tests that match the pattern.
101 RegExp pattern = configuration['selectors'][suiteName]; 101 RegExp pattern = configuration['selectors'][suiteName];
102 if (!pattern.hasMatch(filename)) return; 102 if (!pattern.hasMatch(filename)) return;
103 var optionsFromFile = optionsFromFile(filename); 103 var optionsFromFile = optionsFromFile(filename);
104 Function createTestCase = 104 Function createTestCase = makeTestCaseCreator(optionsFromFile);
105 makeTestCaseCreator(optionsFromFile, configuration);
106 105
107 if (filename.endsWith("-generatedTest.dart")) { 106 if (filename.endsWith("-generatedTest.dart")) {
108 if (dartcPath == null) { 107 if (dartcPath == null) {
109 createTestCase(filename, optionsFromFile['isNegative']); 108 createTestCase(filename, optionsFromFile['isNegative']);
110 } 109 }
111 } else if (filename.endsWith("Test.dart")) { 110 } else if (filename.endsWith("Test.dart")) {
112 if (dartcPath != null) { 111 if (dartcPath != null) {
113 String isolateStubsOptions = optionsFromFile['isolateStubs']; 112 String isolateStubsOptions = optionsFromFile['isolateStubs'];
114 List<String> splitIsolateStubsOptions = isolateStubsOptions.split(':'); 113 List<String> splitIsolateStubsOptions = isolateStubsOptions.split(':');
115 Expect.equals(2, splitIsolateStubsOptions.length); 114 Expect.equals(2, splitIsolateStubsOptions.length);
116 String interfaceFile = splitIsolateStubsOptions[0]; 115 String interfaceFile = splitIsolateStubsOptions[0];
117 String classes = splitIsolateStubsOptions[1]; 116 String classes = splitIsolateStubsOptions[1];
118 generateTestCase(filename, interfaceFile, classes, (String filename) { 117 generateTestCase(filename, interfaceFile, classes, (String filename) {
119 createTestCase(filename, optionsFromFile['isNegative']); 118 createTestCase(filename, optionsFromFile['isNegative']);
120 testGeneratorDone(); 119 testGeneratorDone();
121 }); 120 });
122 } 121 }
123 } 122 }
124 } 123 }
125 } 124 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/multitest.dart » ('j') | tools/testing/dart/test_suite.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698