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

Unified Diff: tools/testing/dart/test_runner.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: Address review comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 0237dbb6ae584a747f65a1ba6ff9fc01a6712894..8998e9510e9c0bfdaaa6eab36a1e975621292f40 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -327,6 +327,10 @@ class ProcessQueue {
ProgressIndicator _progress;
// For dartc batch processing we keep a list of batch processes.
List<DartcBatchRunnerProcess> _batchProcesses;
+ // Cache information about test cases per test suite. For multiple
+ // configurations there is no need to repeatedly search the file
+ // system, generate tests, and search test files for options.
+ Map<String, List<TestInformation>> _testCache;
ProcessQueue(int this._maxProcesses,
String progress,
@@ -338,13 +342,14 @@ class ProcessQueue {
_progress = new ProgressIndicator.fromName(progress,
startTime,
printTiming),
- _batchProcesses = new List<DartcBatchRunnerProcess>() {
+ _batchProcesses = new List<DartcBatchRunnerProcess>(),
+ _testCache = new Map<String, List<TestInformation>>() {
if (!_enqueueMoreWork(this)) _progress.allDone();
}
void addTestSuite(TestSuite testSuite) {
_activeTestListers++;
- testSuite.forEachTest(_runTest, _testListerDone);
+ testSuite.forEachTest(_runTest, _testCache, _testListerDone);
}
void _testListerDone() {
« no previous file with comments | « tools/testing/dart/multitest.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698