public inbox for mauve-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Raif S. Naffah" <raif@swiftdsl.com.au>
To: mauve-discuss@sources.redhat.com
Subject: RFC: make Harness more Eclipse friendly
Date: Thu, 27 Jul 2006 02:15:00 -0000	[thread overview]
Message-ID: <200607271214.57434.raif@swiftdsl.com.au> (raw)

[-- 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.
    */

             reply	other threads:[~2006-07-27  2:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27  2:15 Raif S. Naffah [this message]
2006-07-27 18:29 ` Anthony Balkissoon
2006-07-28  5:35   ` Raif S. Naffah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200607271214.57434.raif@swiftdsl.com.au \
    --to=raif@swiftdsl.com.au \
    --cc=mauve-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).