From: Robert Schuster <theBohemian@gmx.net>
To: mauve-patches@sources.redhat.com
Subject: RFC: Add -vmextra switch
Date: Thu, 19 Oct 2006 08:45:00 -0000 [thread overview]
Message-ID: <45373B2D.1090800@gmx.net> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 453 bytes --]
Hi all,
I found it usefull to be able to run the test process with a tool like strace
and modified Harness.java in order to make that possible.
Is that OK for everyone?
ChangeLog:
2006-10-19 Robert Schuster <robertschuster@fsfe.org>
* Harness.java: Added vmExtra field.
(setupHarness): Examine -vmextra argument.
(initProcess): Use vmExtra field if non-null.
* README: Added info about -vmextra switch.
cya
Robert
[-- Attachment #1.2: mauve-vmextra.diff --]
[-- Type: text/x-patch, Size: 2336 bytes --]
Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.26
diff -u -r1.26 Harness.java
--- Harness.java 13 Oct 2006 11:45:42 -0000 1.26
+++ Harness.java 19 Oct 2006 08:41:12 -0000
@@ -85,6 +85,9 @@
// The command to invoke for the VM on which we will run the tests.
private static String vmCommand = null;
+
+ // A command that is prepended to the test commandline (e.g. strace, gdb, time)
+ private static String vmExtra = null;
// Arguments to be passed to the VM
private static String vmArgs = "";
@@ -315,6 +318,14 @@
"given after '-vm'. Exit");
vmCommand = args[i];
}
+ else if (args[i].equals("-vmextra"))
+ {
+ // User wants to prepend a certain command.
+ if (++i >= args.length)
+ throw new RuntimeException ("No file" +
+ "given after '-vmextra'. Exit");
+ vmExtra = args[i] + " ";
+ }
else if (args[i].equals("-timeout"))
{
// User wants to change the timeout value.
@@ -634,7 +645,11 @@
StringBuffer sb = new StringBuffer(" RunnerProcess");
for (int i = 0; i < args.length; i++)
sb.append(" " + args[i]);
- sb.insert(0, vmCommand + vmArgs);
+
+ if (vmExtra != null)
+ sb.insert(0, vmExtra + vmCommand + vmArgs);
+ else
+ sb.insert(0, vmCommand + vmArgs);
try
{
Index: README
===================================================================
RCS file: /cvs/mauve/mauve/README,v
retrieving revision 1.26
diff -u -r1.26 README
--- README 22 Jun 2006 20:03:21 -0000 1.26
+++ README 19 Oct 2006 08:41:12 -0000
@@ -146,6 +146,17 @@
HARNESSVM Harness javax.swing.JTable -vm jamvm -vmarg -Xnocompact
+ For debugging purposes it may be helpful to run the testprocess with a
+ special program like strace, time or gdb. To prepend such a command before
+ the VM use the -vmextra argument and specify a path to the program you want
+ to run:
+
+ -vmextra [extrapath]
+
+ For example, the following command will run a Socket test with strace on
+ Cacao:
+
+ HARNESSVM Harness java.net.Socket -vm cacao -vmextra strace
2. Selecting a subset of the tests to run
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 253 bytes --]
next reply other threads:[~2006-10-19 8:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-19 8:45 Robert Schuster [this message]
2006-10-19 15:58 ` David Daney
2006-10-20 1:39 ` RFC: Add -vmprefix switch -- committed Robert Schuster
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=45373B2D.1090800@gmx.net \
--to=thebohemian@gmx.net \
--cc=mauve-patches@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).