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 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 } | 609 } |
610 | 610 |
611 // Construct the command that executes the browser test | 611 // Construct the command that executes the browser test |
612 List<String> args; | 612 List<String> args; |
613 if (runtime == 'ie' || runtime == 'ff' || runtime == 'chrome' || | 613 if (runtime == 'ie' || runtime == 'ff' || runtime == 'chrome' || |
614 runtime == 'safari' || runtime == 'opera' || runtime == 'dartium') { | 614 runtime == 'safari' || runtime == 'opera' || runtime == 'dartium') { |
615 args = ['$dartDir/tools/testing/run_selenium.py', | 615 args = ['$dartDir/tools/testing/run_selenium.py', |
616 '--browser=$runtime', | 616 '--browser=$runtime', |
617 '--timeout=${configuration["timeout"] - 2}', | 617 '--timeout=${configuration["timeout"] - 2}', |
618 '--out=$htmlPath']; | 618 '--out=$htmlPath']; |
| 619 if (runtime == 'dartium') { |
| 620 args.add('--executable=$dartiumFilename'); |
| 621 } |
619 } else { | 622 } else { |
620 args = [ | 623 args = [ |
621 '$dartDir/tools/testing/drt-trampoline.py', | 624 '$dartDir/tools/testing/drt-trampoline.py', |
622 dumpRenderTreeFilename, | 625 dumpRenderTreeFilename, |
623 '--no-timeout' | 626 '--no-timeout' |
624 ]; | 627 ]; |
625 if (runtime == 'drt' && compiler == 'none') { | 628 if (runtime == 'drt' && compiler == 'none') { |
626 var dartFlags = ['--ignore-unrecognized-flags']; | 629 var dartFlags = ['--ignore-unrecognized-flags']; |
627 if (configuration["checked"]) { | 630 if (configuration["checked"]) { |
628 dartFlags.add('--enable_asserts'); | 631 dartFlags.add('--enable_asserts'); |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 return filename.replaceAll('/', '_').replaceAll(':', '_') | 771 return filename.replaceAll('/', '_').replaceAll(':', '_') |
769 .replaceAll('\\', '_') + configuration['compiler'] + '-' + | 772 .replaceAll('\\', '_') + configuration['compiler'] + '-' + |
770 configuration['runtime'] + '.html'; | 773 configuration['runtime'] + '.html'; |
771 } | 774 } |
772 | 775 |
773 String get dumpRenderTreeFilename() { | 776 String get dumpRenderTreeFilename() { |
774 if (configuration['drt'] != '') { | 777 if (configuration['drt'] != '') { |
775 return configuration['drt']; | 778 return configuration['drt']; |
776 } | 779 } |
777 if (new Platform().operatingSystem() == 'macos') { | 780 if (new Platform().operatingSystem() == 'macos') { |
778 return '$dartDir/client/tests/drt/DumpRenderTree.app/Contents/' + | 781 return '$dartDir/client/tests/drt/DumpRenderTree.app/Contents/' |
779 'MacOS/DumpRenderTree'; | 782 'MacOS/DumpRenderTree'; |
780 } | 783 } |
781 return '$dartDir/client/tests/drt/DumpRenderTree'; | 784 return '$dartDir/client/tests/drt/DumpRenderTree'; |
782 } | 785 } |
783 | 786 |
| 787 String get dartiumFilename() { |
| 788 if (configuration['dartium'] != '') { |
| 789 return configuration['dartium']; |
| 790 } |
| 791 if (new Platform().operatingSystem() == 'macos') { |
| 792 return '$dartDir/client/tests/dartium/Chromium.app/Contents/' |
| 793 'MacOS/Chromium'; |
| 794 } |
| 795 return '$dartDir/client/tests/dartium/chrome'; |
| 796 } |
| 797 |
784 void testGeneratorStarted() { | 798 void testGeneratorStarted() { |
785 ++activeTestGenerators; | 799 ++activeTestGenerators; |
786 } | 800 } |
787 | 801 |
788 void testGeneratorDone() { | 802 void testGeneratorDone() { |
789 --activeTestGenerators; | 803 --activeTestGenerators; |
790 if (activeTestGenerators == 0 && listingDone) { | 804 if (activeTestGenerators == 0 && listingDone) { |
791 doDone(); | 805 doDone(); |
792 } | 806 } |
793 } | 807 } |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 * $noCrash tests are expected to be flaky but not crash | 1380 * $noCrash tests are expected to be flaky but not crash |
1367 * $pass tests are expected to pass | 1381 * $pass tests are expected to pass |
1368 * $failOk tests are expected to fail that we won't fix | 1382 * $failOk tests are expected to fail that we won't fix |
1369 * $fail tests are expected to fail that we should fix | 1383 * $fail tests are expected to fail that we should fix |
1370 * $crash tests are expected to crash that we should fix | 1384 * $crash tests are expected to crash that we should fix |
1371 * $timeout tests are allowed to timeout | 1385 * $timeout tests are allowed to timeout |
1372 """; | 1386 """; |
1373 print(report); | 1387 print(report); |
1374 } | 1388 } |
1375 } | 1389 } |
OLD | NEW |