@@ -722,6 +722,12 @@ test() async {
722722 await testFutures.wait ();
723723}
724724
725+ List <File > get binFiles => new Directory ('bin' )
726+ .listSync (recursive: true )
727+ .where ((e) => e is File && e.path.endsWith ('.dart' ))
728+ .cast <File >()
729+ ..toList ();
730+
725731List <File > get testFiles => new Directory ('test' )
726732 .listSync (recursive: true )
727733 .where ((e) => e is File && e.path.endsWith ('test.dart' ))
@@ -731,31 +737,49 @@ List<File> get testFiles => new Directory('test')
731737testPreviewDart2 () async {
732738 List <String > parameters = ['--preview-dart-2' , '--enable-asserts' ];
733739
734- // sdk#32901 is really bad on Windows.
735- for (File dartFile in testFiles.where ((f) =>
736- ! f.path.endsWith ('html_generator_test.dart' ) && ! Platform .isWindows)) {
737- // absolute path to work around dart-lang/sdk#32901
740+ for (File dartFile in testFiles) {
741+ await testFutures.addFuture (
742+ new SubprocessLauncher ('dart2-${pathLib .basename (dartFile .path )}' )
743+ .runStreamed (
744+ Platform .resolvedExecutable,
745+ < String > []
746+ ..addAll (parameters)
747+ ..add (dartFile.path)));
748+ }
749+
750+ for (File dartFile in binFiles) {
738751 await testFutures.addFuture (new SubprocessLauncher (
739- 'dart2-${pathLib .basename (dartFile .absolute . path )}' )
752+ 'dart2-bin- ${pathLib .basename (dartFile .path )}-help ' )
740753 .runStreamed (
741754 Platform .resolvedExecutable,
742755 < String > []
743756 ..addAll (parameters)
744- ..add (dartFile.absolute.path)));
757+ ..add (dartFile.path)
758+ ..add ('--help' )));
745759 }
746760}
747761
748762testDart1 () async {
749763 List <String > parameters = ['--checked' ];
750764 for (File dartFile in testFiles) {
751- // absolute path to work around dart-lang/sdk#32901
765+ await testFutures.addFuture (
766+ new SubprocessLauncher ('dart1-${pathLib .basename (dartFile .path )}' )
767+ .runStreamed (
768+ Platform .resolvedExecutable,
769+ < String > []
770+ ..addAll (parameters)
771+ ..add (dartFile.path)));
772+ }
773+
774+ for (File dartFile in binFiles) {
752775 await testFutures.addFuture (new SubprocessLauncher (
753- 'dart1-${pathLib .basename (dartFile .absolute . path )}' )
776+ 'dart1-bin- ${pathLib .basename (dartFile .path )}-help ' )
754777 .runStreamed (
755778 Platform .resolvedExecutable,
756779 < String > []
757780 ..addAll (parameters)
758- ..add (dartFile.absolute.path)));
781+ ..add (dartFile.path)
782+ ..add ('--help' )));
759783 }
760784}
761785
0 commit comments