Changeset 3898
- Timestamp:
- 06/26/09 23:19:55 (4 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 modified
-
ProjectFortress/compiler_tests/Compiled5.as.fss (added)
-
ProjectFortress/compiler_tests/api.test (added)
-
ProjectFortress/not_working_static_tests/DXXGeneralizedIf.fss (modified) (1 diff)
-
ProjectFortress/not_working_static_tests/DXXVoidTest.fss (modified) (1 diff)
-
ProjectFortress/src/com/sun/fortress/tests/unit_tests/FileTests.java (modified) (16 diffs)
-
bin/copyrightCheck.pl (modified) (1 diff)
-
bin/fortick (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ProjectFortress/not_working_static_tests/DXXGeneralizedIf.fss
r3258 r3898 1 1 (******************************************************************************* 2 Copyright 200 8Sun Microsystems, Inc.,2 Copyright 2009 Sun Microsystems, Inc., 3 3 4150 Network Circle, Santa Clara, California 95054, U.S.A. 4 4 All rights reserved. -
trunk/ProjectFortress/not_working_static_tests/DXXVoidTest.fss
r2111 r3898 1 1 (******************************************************************************* 2 Copyright 200 8Sun Microsystems, Inc.,2 Copyright 2009 Sun Microsystems, Inc., 3 3 4150 Network Circle, Santa Clara, California 95054, U.S.A. 4 4 All rights reserved. -
trunk/ProjectFortress/src/com/sun/fortress/tests/unit_tests/FileTests.java
r3886 r3898 61 61 else return dir + "/" + file; 62 62 } 63 63 64 64 public static class BaseTest extends TestCase { 65 65 /** … … 457 457 458 458 static boolean whinedAboutTimingIssues = false; 459 459 460 460 public void testFile() throws Throwable { 461 461 String scriptName = ProjectProperties.FORTRESS_AUTOHOME … … 485 485 env.put("FORTRESS_HOME", ProjectProperties.FORTRESS_AUTOHOME); 486 486 } 487 487 488 488 long start_time = System.currentTimeMillis(); 489 489 490 490 Process p = pb.start(); 491 491 InputStream err = p.getErrorStream(); … … 503 503 f_err.join(); 504 504 int exitValue = p.waitFor(); 505 505 506 506 long stop_time = System.currentTimeMillis(); 507 507 508 508 String s_out = cached_out.toString(); 509 509 String s_err = cached_err.toString(); … … 543 543 // do nothing 544 544 } else { 545 545 546 546 547 547 int timeLimit = tprops.getInt(whoami, -1); … … 567 567 } 568 568 } 569 569 570 570 // OY, pass/fail dsylexia here. 571 571 … … 662 662 } 663 663 664 public static class Com pileTest extends SourceFileTest {665 664 public static class CommandTest extends SourceFileTest { 665 private final String command; 666 666 private final StringMap props; 667 // public CompileTest(StringMap props, String path, String d, String s, 668 // boolean unexpected_only, boolean knownFailure) { 669 // super(path, d, s, unexpected_only, knownFailure, s.startsWith("XXX") ); 670 // this.props = props; 671 // } 672 public CompileTest(StringMap props, String path, String d, String s, 667 public CommandTest(String command, StringMap props, String path, String d, String s, 673 668 boolean unexpected_only, boolean knownFailure, boolean shouldFail) { 674 669 super(path, d, s, unexpected_only, knownFailure, shouldFail ); 670 this.command = command; 675 671 this.props = props; 676 672 } … … 679 675 protected int justTheTest() 680 676 throws FileNotFoundException, IOException, Throwable { 681 String[] tokens = new String [] { "compile", join(dir, makeTestFileName(name))};677 String[] tokens = new String [] {command, join(dir, makeTestFileName(name))}; 682 678 int rc = com.sun.fortress.Shell.subMain(tokens); 683 679 return rc; … … 688 684 public String tag() { 689 685 // TODO Auto-generated method stub 690 return "compile";686 return command; 691 687 } 692 688 693 689 public String testFailed(String out, String err, String exc) { 694 return generalTestFailed("compile_", props, out, err, exc); 695 } 696 697 } 698 699 public static class DesugarTest extends SourceFileTest { 700 701 private final StringMap props; 702 public DesugarTest(StringMap props, String path, String d, String s, 703 boolean unexpected_only, boolean knownFailure, boolean shouldFail) { 704 super(path, d, s, unexpected_only, knownFailure, shouldFail ); 705 this.props = props; 706 707 } 708 709 @Override 710 protected int justTheTest() 711 throws FileNotFoundException, IOException, Throwable { 712 // might need to strip the .fss off f "f". 713 String[] tokens = new String [] {"desugar", join(dir, makeTestFileName(name))}; 714 int rc = com.sun.fortress.Shell.subMain(tokens); 715 return rc; 716 } 717 718 @Override 719 public String tag() { 720 // TODO Auto-generated method stub 721 return "desugar"; 722 } 723 724 public String testFailed(String out, String err, String exc) { 725 return generalTestFailed("desugar_", props, out, err, exc); 726 } 727 728 } 729 730 public static class LinkTest extends SourceFileTest { 731 732 private final StringMap props; 733 public LinkTest(StringMap props, String path, String d, String s, 734 boolean unexpected_only, boolean knownFailure, boolean shouldFail) { 735 super(path, d, s, unexpected_only, knownFailure, shouldFail ); 736 this.props = props; 737 738 } 739 740 @Override 741 protected int justTheTest() 742 throws FileNotFoundException, IOException, Throwable { 743 // might need to strip the .fss off f "f". 744 String[] tokens = new String [] {"link", join(dir, makeTestFileName(name))}; 745 int rc = com.sun.fortress.Shell.subMain(tokens); 746 return rc; 747 } 748 749 @Override 750 public String tag() { 751 // TODO Auto-generated method stub 752 return "link"; 753 } 754 755 public String testFailed(String out, String err, String exc) { 756 return generalTestFailed("link_", props, out, err, exc); 757 690 return generalTestFailed(command + "_", props, out, err, exc); 758 691 } 759 692 … … 940 873 }; 941 874 942 List<Test> compileTests = new ArrayList<Test>(); 943 List<Test> desugarTests = new ArrayList<Test>(); 944 List<Test> linkTests = new ArrayList<Test>(); 875 List<Test> commandTests = new ArrayList<Test>(); 945 876 List<Test> runTests = new ArrayList<Test>(); 946 877 … … 955 886 directoryAsFile(dir_name_slashes_normalized).getCanonicalPath(); 956 887 } 957 958 888 889 959 890 if (i <= 0) { 960 891 System.out.println("Early testing exit after " + testCount + " tests"); … … 992 923 standardCompilerTests(props, dir_name_canonical, dir_name_slashes_normalized, token, 993 924 expect_failure, shouldFail, failsOnly, 994 compileTests, desugarTests, 995 linkTests, runTests); 925 commandTests, runTests); 996 926 } 997 927 } … … 999 929 standardCompilerTests(props, dir_name_canonical, dir_name_slashes_normalized, testname, 1000 930 expect_failure, shouldFail, failsOnly, 1001 compileTests, desugarTests, 1002 linkTests, runTests); 931 commandTests, runTests); 1003 932 } 1004 933 } else { … … 1015 944 // Do all the larger tests 1016 945 if (i > 0) { 1017 for (Test test: compileTests) 1018 suite.addTest(test); 1019 1020 for (Test test: desugarTests) 1021 suite.addTest(test); 1022 1023 for (Test test: linkTests) 946 for (Test test: commandTests) 1024 947 suite.addTest(test); 1025 948 … … 1038 961 * @param shouldFail Test passes, if it fails (e.g., is an error printed?) 1039 962 * @param failsOnly 1040 * @param compileTests 1041 * @param desugarTests 1042 * @param linkTests 963 * @param commandTests 1043 964 * @param runTests 1044 965 * @throws IOException … … 1049 970 boolean shouldFail, 1050 971 boolean failsOnly, 1051 List<Test> compileTests, 1052 List<Test> desugarTests, 1053 List<Test> linkTests, 972 List<Test> commandTests, 1054 973 List<Test> runTests) throws IOException { 974 String[] commands = new String [] {"compile", "desugar", "link", "run", "api", 975 "parse", "disambiguate", "grammar", "typecheck", 976 "unparse", "compare", "build", 977 "fss", "fsi"}; 978 1055 979 if (props.get("compile") != null) 1056 com pileTests.add(new CompileTest(props, canonicalDirName,980 commandTests.add(new CommandTest("compile", props, canonicalDirName, 1057 981 dirname, testname, failsOnly, 1058 982 expect_not_passing, shouldFail)); 1059 983 if (props.get("desugar") != null) 1060 desugarTests.add(new DesugarTest(props, canonicalDirName,984 commandTests.add(new CommandTest("desugar", props, canonicalDirName, 1061 985 dirname, testname, failsOnly, 1062 986 expect_not_passing, shouldFail)); 1063 987 if (props.get("link") != null) 1064 linkTests.add(new LinkTest(props, canonicalDirName, 1065 dirname, testname, failsOnly, 1066 expect_not_passing, shouldFail)); 988 commandTests.add(new CommandTest("link", props, canonicalDirName, 989 dirname, testname, failsOnly, 990 expect_not_passing, shouldFail)); 991 992 if (props.get("api") != null) 993 runTests.add(new CommandTest("api", props, canonicalDirName, 994 dirname, testname, failsOnly, 995 expect_not_passing, shouldFail)); 996 1067 997 if (props.get("run") != null) 1068 998 runTests.add(new TestTest(props, canonicalDirName, 1069 999 dirname, testname, failsOnly, 1070 1000 expect_not_passing, shouldFail)); 1001 1002 boolean found = false; 1003 for ( String c : new ArrayList<String>(java.util.Arrays.asList(commands)) ) { 1004 if (props.get(c) != null) found = true; 1005 } 1006 1007 if (! found) 1008 System.out.println("Not supported " + dirname + "/" + testname); 1071 1009 } 1072 1010 -
trunk/bin/copyrightCheck.pl
r3887 r3898 39 39 my $copyright = "Copyright $checkDate "; # The message to look for. 40 40 my $maxlines = 10; # The message must appear within this many lines of the top of the file. 41 my $ignoreThese = 'ant|fortress-keywords|UserDictionary|README.txt|README$|\.fsg$|\.NW$|fortress.vim|\.ods|\.jar$|\.ti ming$|\.war$|\.zip$|\.tgz$|\/\.|^\.|^Sandbox';41 my $ignoreThese = 'ant|fortress-keywords|UserDictionary|README.txt|README$|\.fsg$|\.NW$|fortress.vim|\.ods|\.jar$|\.tic$|\.timing$|\.war$|\.zip$|\.tgz$|\/\.|^\.|^Sandbox'; 42 42 my $tempFile = '/tmp/svnInfo.xml'; 43 43 -
trunk/bin/fortick
r3897 r3898 2 2 3 3 ################################################################################ 4 # Copyright 200 8Sun Microsystems, Inc.,4 # Copyright 2009 Sun Microsystems, Inc., 5 5 # 4150 Network Circle, Santa Clara, California 95054, U.S.A. 6 6 # All rights reserved.

