| 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 * Classes and methods for enumerating and preparing tests. | 6 * Classes and methods for enumerating and preparing tests. |
| 7 * | 7 * |
| 8 * This library includes: | 8 * This library includes: |
| 9 * | 9 * |
| 10 * - Creating tests by listing all the Dart files in certain directories, | 10 * - Creating tests by listing all the Dart files in certain directories, |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 Path pngPath = dir.append('$nameNoExt.png'); | 655 Path pngPath = dir.append('$nameNoExt.png'); |
| 656 Path txtPath = dir.append('$nameNoExt.txt'); | 656 Path txtPath = dir.append('$nameNoExt.txt'); |
| 657 Path expectedOutput = null; | 657 Path expectedOutput = null; |
| 658 if (new File.fromPath(pngPath).existsSync()) { | 658 if (new File.fromPath(pngPath).existsSync()) { |
| 659 expectedOutput = pngPath; | 659 expectedOutput = pngPath; |
| 660 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); | 660 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); |
| 661 } else if (new File.fromPath(txtPath).existsSync()) { | 661 } else if (new File.fromPath(txtPath).existsSync()) { |
| 662 expectedOutput = txtPath; | 662 expectedOutput = txtPath; |
| 663 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); | 663 content = getHtmlLayoutContents(scriptType, '$filePrefix$scriptPath'); |
| 664 } else { | 664 } else { |
| 665 final htmlLocation = new Path.fromNative(htmlPath); |
| 665 content = getHtmlContents( | 666 content = getHtmlContents( |
| 666 filename, | 667 filename, |
| 667 '$filePrefix${dartDir.append("pkg/unittest/test_controller.js")}', | 668 dartDir.append('pkg/unittest/test_controller.js') |
| 668 '$filePrefix${dartDir.append("client/dart.js")}', | 669 .relativeTo(htmlLocation), |
| 670 dartDir.append('client/dart.js').relativeTo(htmlLocation), |
| 669 scriptType, | 671 scriptType, |
| 670 '$filePrefix$scriptPath'); | 672 new Path.fromNative(scriptPath).relativeTo(htmlLocation)); |
| 671 } | 673 } |
| 672 htmlTest.writeStringSync(content); | 674 htmlTest.writeStringSync(content); |
| 673 htmlTest.closeSync(); | 675 htmlTest.closeSync(); |
| 674 | 676 |
| 675 // Construct the command(s) that compile all the inputs needed by the | 677 // Construct the command(s) that compile all the inputs needed by the |
| 676 // browser test. For running Dart in DRT, this will be noop commands. | 678 // browser test. For running Dart in DRT, this will be noop commands. |
| 677 List<Command> commands = []; | 679 List<Command> commands = []; |
| 678 if (compiler != 'none') { | 680 if (compiler != 'none') { |
| 679 commands.add(_compileCommand( | 681 commands.add(_compileCommand( |
| 680 dartWrapperFilename, compiledDartWrapperFilename, | 682 dartWrapperFilename, compiledDartWrapperFilename, |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1467 * $noCrash tests are expected to be flaky but not crash | 1469 * $noCrash tests are expected to be flaky but not crash |
| 1468 * $pass tests are expected to pass | 1470 * $pass tests are expected to pass |
| 1469 * $failOk tests are expected to fail that we won't fix | 1471 * $failOk tests are expected to fail that we won't fix |
| 1470 * $fail tests are expected to fail that we should fix | 1472 * $fail tests are expected to fail that we should fix |
| 1471 * $crash tests are expected to crash that we should fix | 1473 * $crash tests are expected to crash that we should fix |
| 1472 * $timeout tests are allowed to timeout | 1474 * $timeout tests are allowed to timeout |
| 1473 """; | 1475 """; |
| 1474 print(report); | 1476 print(report); |
| 1475 } | 1477 } |
| 1476 } | 1478 } |
| OLD | NEW |