public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
* RFC: make Harness more Eclipse friendly
@ 2006-07-27  2:15 Raif S. Naffah
  2006-07-27 18:29 ` Anthony Balkissoon
  0 siblings, 1 reply; 3+ messages in thread
From: Raif S. Naffah @ 2006-07-27  2:15 UTC (permalink / raw)
  To: mauve-discuss

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

hello all,

the attached patch adds a new Eclipse Launcher, and some minor amendments to 
the Harness class to make it easy to select a test, or a folder, and run the 
test harness.

OK to commit?


cheers;
rsn

[-- Attachment #2: mauve-20060727.patch --]
[-- Type: text/x-diff, Size: 3603 bytes --]

Index: Mauve Harness.launch
===================================================================
RCS file: Mauve Harness.launch
diff -N Mauve Harness.launch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Mauve Harness.launch	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="Harness"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_TYPE_ID" value="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-showpasses -verbose -debug -timeout 300000 ${resource_path}"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="mauve"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_INSTALL_NAME" value="classpath"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.util.logging.config.file=${project_loc:mauve}/logging.properties"/>
+<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
+<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
+<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/classpath"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/mauve"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="MAUVE_PROJECT_NAME" value="${project_name}"/>
+</mapAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+</launchConfiguration>
Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.22
diff -u -r1.22 Harness.java
--- Harness.java	26 Jul 2006 20:22:18 -0000	1.22
+++ Harness.java	27 Jul 2006 02:09:59 -0000
@@ -151,7 +151,16 @@
   // A convenience String for ensuring tests all have the same name format
   private static final String gnuTestletHeader2 = gnuTestletHeader1
                                                   + File.separatorChar;
-
+
+  // The usual name of the CVS project containing this resource surrounded
+  // with file-separator strings
+  private static final String MAUVE = File.separator
+                                      + System.getenv("MAUVE_PROJECT_NAME")
+                                      + File.separator;
+  // When a folder is selected from Eclipse this is what usually gets
+  // prepended to the folder name
+  private static final String MAUVE_GNU_TESTLET = MAUVE + gnuTestletHeader2;
+
   /**
    * The main method for the Harness.  Parses through the compile line
    * options and sets up the internals, sets up the compiler options,
@@ -526,12 +535,14 @@
         val = val.replace('.', File.separatorChar);
         if (val.endsWith("" + File.separatorChar))
           val = val.substring(0, val.length() - 1);
-        if (! val.startsWith(gnuTestletHeader1))
+        if (val.startsWith(MAUVE_GNU_TESTLET))
+          val = val.substring(MAUVE.length());
+        else if (! val.startsWith(gnuTestletHeader1))
           val = gnuTestletHeader2 + val;
       }
     return val;
   }
-
+
   /**
    * This method prints a help screen to the console and then exits.
    */

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-28  5:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27  2:15 RFC: make Harness more Eclipse friendly Raif S. Naffah
2006-07-27 18:29 ` Anthony Balkissoon
2006-07-28  5:35   ` Raif S. Naffah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).