| OLD | NEW |
| 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 * 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 TestCompletedHandler completedHandler) { | 149 TestCompletedHandler completedHandler) { |
| 150 var fileUtils = completedHandler.fileUtils; | 150 var fileUtils = completedHandler.fileUtils; |
| 151 var config = new options.TestOptionsParser().parse(['--timeout', '2'])[0]; | 151 var config = new options.TestOptionsParser().parse(['--timeout', '2'])[0]; |
| 152 var scriptDirPath = new Path.fromNative(new Options().script).directoryPath; | 152 var scriptDirPath = new Path.fromNative(new Options().script).directoryPath; |
| 153 var createFileScript = scriptDirPath. | 153 var createFileScript = scriptDirPath. |
| 154 append('skipping_dart2js_compilations_helper.dart').toNativePath(); | 154 append('skipping_dart2js_compilations_helper.dart').toNativePath(); |
| 155 var executable = new Options().executable; | 155 var executable = new Options().executable; |
| 156 var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()]; | 156 var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()]; |
| 157 var bootstrapDeps = [ | 157 var bootstrapDeps = [ |
| 158 new Uri("file://${fileUtils.testSnapshotFilePath}")]; | 158 new Uri("file://${fileUtils.testSnapshotFilePath}")]; |
| 159 var commands = [new runner.Dart2JsCommand( | 159 var commands = [new runner.CompilationCommand( |
| 160 fileUtils.testJsFilePath.toNativePath(), | 160 fileUtils.testJsFilePath.toNativePath(), |
| 161 false, | 161 false, |
| 162 bootstrapDeps, | 162 bootstrapDeps, |
| 163 executable, | 163 executable, |
| 164 arguments)]; | 164 arguments)]; |
| 165 return new runner.TestCase( | 165 return new runner.TestCase( |
| 166 testName, | 166 testName, |
| 167 commands, | 167 commands, |
| 168 config, | 168 config, |
| 169 completedHandler.processCompletedTest, | 169 completedHandler.processCompletedTest, |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true); | 216 runTest("fs_notUpToDate_snapshot", fs_notUpToDate_snapshot, true); |
| 217 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true); | 217 runTest("fs_notUpToDate_dart", fs_notUpToDate_dart, true); |
| 218 // This is the only test where all dependencies are present and the test.js | 218 // This is the only test where all dependencies are present and the test.js |
| 219 // file is newer than all the others. So we pass 'false' for shouldRun. | 219 // file is newer than all the others. So we pass 'false' for shouldRun. |
| 220 runTest("fs_upToDate", fs_upToDate, false); | 220 runTest("fs_upToDate", fs_upToDate, false); |
| 221 } | 221 } |
| 222 // We need to wait some time to make sure that the files we 'touch' get a | 222 // We need to wait some time to make sure that the files we 'touch' get a |
| 223 // bigger timestamp than the old ones | 223 // bigger timestamp than the old ones |
| 224 new Timer(1000, touchFilesAndRunTests); | 224 new Timer(1000, touchFilesAndRunTests); |
| 225 } | 225 } |
| OLD | NEW |