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

Side by Side Diff: tests/standalone/io/skipping_dart2js_compilations_test.dart

Issue 21001003: test.py: First step towards support of caching dart2js compilations across runtimes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 * This test makes sure that the "skipping Dart2Js compilations if the output is 6 * This test makes sure that the "skipping Dart2Js compilations if the output is
7 * already up to date" feature does work as it should. 7 * already up to date" feature does work as it should.
8 * Therefore this test ensures that compilations are only skipped if the last 8 * Therefore this test ensures that compilations are only skipped if the last
9 * modified date of the output of a dart2js compilation is newer than 9 * modified date of the output of a dart2js compilation is newer than
10 * - the the dart application to compile (including it's dependencies) 10 * - the the dart application to compile (including it's dependencies)
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 class TestCompletedHandler { 124 class TestCompletedHandler {
125 FileUtils fileUtils; 125 FileUtils fileUtils;
126 DateTime _expectedTimestamp; 126 DateTime _expectedTimestamp;
127 bool _shouldHaveRun; 127 bool _shouldHaveRun;
128 128
129 TestCompletedHandler(FileUtils this.fileUtils, bool this._shouldHaveRun); 129 TestCompletedHandler(FileUtils this.fileUtils, bool this._shouldHaveRun);
130 130
131 void processCompletedTest(runner.TestCase testCase) { 131 void processCompletedTest(runner.TestCase testCase) {
132 var output = testCase.lastCommandOutput; 132 var output = testCase.lastCommandOutput;
133 133
134 Expect.isFalse(output.unexpectedOutput); 134 Expect.isFalse(testCase.unexpectedOutput);
135 Expect.isTrue(output.stderr.length == 0); 135 Expect.isTrue(output.stderr.length == 0);
136 if (_shouldHaveRun) { 136 if (_shouldHaveRun) {
137 Expect.isTrue(output.stdout.length == 0); 137 Expect.isTrue(output.stdout.length == 0);
138 Expect.isTrue(new File(fileUtils.scriptOutputPath.toNativePath()) 138 Expect.isTrue(new File(fileUtils.scriptOutputPath.toNativePath())
139 .existsSync()); 139 .existsSync());
140 } else { 140 } else {
141 Expect.isFalse(new File(fileUtils.scriptOutputPath.toNativePath()) 141 Expect.isFalse(new File(fileUtils.scriptOutputPath.toNativePath())
142 .existsSync()); 142 .existsSync());
143 } 143 }
144 } 144 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 cleanup(); 241 cleanup();
242 throw error; 242 throw error;
243 }).then((_) { 243 }).then((_) {
244 cleanup(); 244 cleanup();
245 }); 245 });
246 } 246 }
247 // We need to wait some time to make sure that the files we 'touch' get a 247 // We need to wait some time to make sure that the files we 'touch' get a
248 // bigger timestamp than the old ones 248 // bigger timestamp than the old ones
249 new Timer(new Duration(seconds: 1), touchFilesAndRunTests); 249 new Timer(new Duration(seconds: 1), touchFilesAndRunTests);
250 } 250 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/io/test_runner_test.dart » ('j') | tools/testing/dart/dependency_graph.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698