OLD | NEW |
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 dart application to compile (including it's dependencies) | 10 * - the dart application to compile (including it's dependencies) |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 return runner.CommandBuilder.instance.getCompilationCommand( | 158 return runner.CommandBuilder.instance.getCompilationCommand( |
159 'dart2js', | 159 'dart2js', |
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 } | 165 } |
166 | 166 |
167 void main() { | 167 void main() { |
| 168 // This script is in [sdk]/tests/standalone/io. |
| 169 suite.TestUtils.setDartDirUri(Platform.script.resolve('../../..')); |
| 170 |
168 var fs_noTestJs = new FileUtils(createJs: false, | 171 var fs_noTestJs = new FileUtils(createJs: false, |
169 createJsDeps: true, | 172 createJsDeps: true, |
170 createDart: true, | 173 createDart: true, |
171 createSnapshot: true); | 174 createSnapshot: true); |
172 var fs_noTestJsDeps = new FileUtils(createJs: true, | 175 var fs_noTestJsDeps = new FileUtils(createJs: true, |
173 createJsDeps: false, | 176 createJsDeps: false, |
174 createDart: true, | 177 createDart: true, |
175 createSnapshot: true); | 178 createSnapshot: true); |
176 var fs_noTestDart = new FileUtils(createJs: true, | 179 var fs_noTestDart = new FileUtils(createJs: true, |
177 createJsDeps: true, | 180 createJsDeps: true, |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 cleanup(); | 240 cleanup(); |
238 throw error; | 241 throw error; |
239 }).then((_) { | 242 }).then((_) { |
240 cleanup(); | 243 cleanup(); |
241 }); | 244 }); |
242 } | 245 } |
243 // We need to wait some time to make sure that the files we 'touch' get a | 246 // We need to wait some time to make sure that the files we 'touch' get a |
244 // bigger timestamp than the old ones | 247 // bigger timestamp than the old ones |
245 new Timer(new Duration(seconds: 1), touchFilesAndRunTests); | 248 new Timer(new Duration(seconds: 1), touchFilesAndRunTests); |
246 } | 249 } |
OLD | NEW |