< prev index next >

jdk/test/tools/launcher/ToolsOpts.java

Print this page




 134                 }
 135             } else if (pat.compareTo("-J-XshowSettings:VM") == 0) {
 136                 if (!tr.contains("VM settings")) {
 137                     throw new RuntimeException("failed: " + pat +
 138                             " should have display VM settings.");
 139                 }
 140             }
 141         }
 142         pass("Joption check: " + jopts);
 143     }
 144 
 145     /*
 146      * Feed each option pattern in optionPatterns array to javac launcher with
 147      * checking program preempting javac. Check that option received by 'dummy'
 148      * javac is the one passed on the command line.
 149      */
 150     static void runTestOptions() throws IOException {
 151         init();
 152         TestResult tr;
 153         int jpos = -1;
 154         String xPatch = "-J-Xpatch:jdk.compiler=jdk.compiler";
 155         for (String arg[] : optionPatterns) {
 156             jpos = indexOfJoption(arg);
 157             //Build a cmd string for output in results reporting.
 158             String cmdString = javacCmd + " " + xPatch;
 159             for (String opt : arg) {
 160                 cmdString = cmdString.concat(" " + opt);
 161             }
 162             switch (arg.length) {
 163                 case 1:
 164                     tr = doExec(javacCmd, xPatch, arg[0]);
 165                     break;
 166                 case 2:
 167                     tr = doExec(javacCmd, xPatch, arg[0], arg[1]);
 168                     break;
 169                 case 3:
 170                     tr = doExec(javacCmd, xPatch, arg[0], arg[1], arg[2]);
 171                     break;
 172                 case 4:
 173                     tr = doExec(javacCmd, xPatch, arg[0], arg[1], arg[2], arg[3]);
 174                     break;




 134                 }
 135             } else if (pat.compareTo("-J-XshowSettings:VM") == 0) {
 136                 if (!tr.contains("VM settings")) {
 137                     throw new RuntimeException("failed: " + pat +
 138                             " should have display VM settings.");
 139                 }
 140             }
 141         }
 142         pass("Joption check: " + jopts);
 143     }
 144 
 145     /*
 146      * Feed each option pattern in optionPatterns array to javac launcher with
 147      * checking program preempting javac. Check that option received by 'dummy'
 148      * javac is the one passed on the command line.
 149      */
 150     static void runTestOptions() throws IOException {
 151         init();
 152         TestResult tr;
 153         int jpos = -1;
 154         String xPatch = "-J--patch-module=jdk.compiler=jdk.compiler";
 155         for (String arg[] : optionPatterns) {
 156             jpos = indexOfJoption(arg);
 157             //Build a cmd string for output in results reporting.
 158             String cmdString = javacCmd + " " + xPatch;
 159             for (String opt : arg) {
 160                 cmdString = cmdString.concat(" " + opt);
 161             }
 162             switch (arg.length) {
 163                 case 1:
 164                     tr = doExec(javacCmd, xPatch, arg[0]);
 165                     break;
 166                 case 2:
 167                     tr = doExec(javacCmd, xPatch, arg[0], arg[1]);
 168                     break;
 169                 case 3:
 170                     tr = doExec(javacCmd, xPatch, arg[0], arg[1], arg[2]);
 171                     break;
 172                 case 4:
 173                     tr = doExec(javacCmd, xPatch, arg[0], arg[1], arg[2], arg[3]);
 174                     break;


< prev index next >