Index: Harness.java =================================================================== RCS file: /cvs/mauve/mauve/Harness.java,v retrieving revision 1.32 diff -u -r1.32 Harness.java --- Harness.java 13 Feb 2009 15:51:59 -0000 1.32 +++ Harness.java 13 Jan 2012 11:42:49 -0000 @@ -65,6 +65,9 @@ // bootclasspath, which should be the classpath installation directory private static String compileStringBase = "-proceedOnError -nowarn -1.5 -d " + config.builddir; + // Options specified in a test which is passed to a compiler + private static String compileOptions = ""; + // The writers for ecj's out and err streams. private static PrintWriter ecjWriterOut = null; private static PrintWriter ecjWriterErr = null; @@ -991,6 +994,10 @@ { processFilesTag(line, base, filesToCopy); } + else if (line.contains("CompileOptions:")) + { + processCompileOptions(line); + } else if (line.contains("not-a-test")) { // Don't run this one but parse it's tags. @@ -1074,6 +1081,17 @@ } /** + * Processes the // CompileOptions: tag in a testlet's source. + * + * @param line string of the current source line + */ + private static void processCompileOptions(String line) + { + compileOptions = line.substring(line.indexOf("CompileOptions:") + "CompileOptions:".length()); + compileOptions += " "; // add separator to a command line + } + + /** * Processes the // Files: tag in a testlet's source. * * @param base base directory of the current test @@ -1352,7 +1370,7 @@ return true; int result = - 1; - compileString = compileStringBase; + compileString = compileStringBase + compileOptions; for (Iterator it = filesToCompile.iterator(); it.hasNext(); ) compileString += " " + (String) it.next(); try