Chromium Code Reviews| OLD | NEW |
|---|---|
| 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("test_suite"); | 5 #library("test_suite"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
| 9 #import("multitest.dart"); | 9 #import("multitest.dart"); |
| 10 | 10 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 bool isWebTest = optionsFromFile['containsDomImport']; | 344 bool isWebTest = optionsFromFile['containsDomImport']; |
| 345 bool isLibraryDefinition = optionsFromFile['isLibraryDefinition']; | 345 bool isLibraryDefinition = optionsFromFile['isLibraryDefinition']; |
| 346 if (!isLibraryDefinition && optionsFromFile['containsSourceOrImport']) { | 346 if (!isLibraryDefinition && optionsFromFile['containsSourceOrImport']) { |
| 347 print('Warning for $filename: Browser tests require #library ' + | 347 print('Warning for $filename: Browser tests require #library ' + |
| 348 'in any file that uses #import or #source'); | 348 'in any file that uses #import or #source'); |
| 349 } | 349 } |
| 350 | 350 |
| 351 final String component = configuration['component']; | 351 final String component = configuration['component']; |
| 352 final String testPath = new File(filename).fullPathSync(); | 352 final String testPath = new File(filename).fullPathSync(); |
| 353 String dartDir = new File('.').fullPathSync(); | 353 String dartDir = new File('.').fullPathSync(); |
| 354 if (!testPath.startsWith(dartDir)) { | 354 if (!testPath.startsWith(dartDir) || |
| 355 dartDir.endsWith('/frog')) { | |
|
ahe
2012/01/06 15:23:06
This looks like a hack, but I guess you know what
| |
| 355 dartDir = new File('..').fullPathSync(); | 356 dartDir = new File('..').fullPathSync(); |
| 356 if (!testPath.startsWith(dartDir)) { | 357 if (!testPath.startsWith(dartDir)) { |
| 357 print('Run test.dart from the dart directory or' + | 358 print('Run test.dart from the dart directory or' + |
| 358 ' an immediate subdirectory only.'); | 359 ' an immediate subdirectory only.'); |
| 359 Expect.fail('Could not find top level dart directory.'); | 360 Expect.fail('Could not find top level dart directory.'); |
| 360 } | 361 } |
| 361 } | 362 } |
| 362 | 363 |
| 363 Directory tempDir = createTemporaryDirectory(testPath, dartDir); | 364 Directory tempDir = createTemporaryDirectory(testPath, dartDir); |
| 364 | 365 |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 965 * $noCrash tests are expected to be flaky but not crash | 966 * $noCrash tests are expected to be flaky but not crash |
| 966 * $pass tests are expected to pass | 967 * $pass tests are expected to pass |
| 967 * $failOk tests are expected to fail that we won't fix | 968 * $failOk tests are expected to fail that we won't fix |
| 968 * $fail tests are expected to fail that we should fix | 969 * $fail tests are expected to fail that we should fix |
| 969 * $crash tests are expected to crash that we should fix | 970 * $crash tests are expected to crash that we should fix |
| 970 * $timeout tests are allowed to timeout\ | 971 * $timeout tests are allowed to timeout\ |
| 971 """; | 972 """; |
| 972 print(report); | 973 print(report); |
| 973 } | 974 } |
| 974 } | 975 } |
| OLD | NEW |