From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5749 invoked by alias); 20 Oct 2006 01:39:45 -0000 Received: (qmail 5738 invoked by uid 22791); 20 Oct 2006 01:39:44 -0000 X-Spam-Check-By: sourceware.org Received: from mail.gmx.net (HELO mail.gmx.net) (213.165.64.20) by sourceware.org (qpsmtpd/0.31) with SMTP; Fri, 20 Oct 2006 01:39:42 +0000 Received: (qmail invoked by alias); 20 Oct 2006 01:39:40 -0000 Received: from e178102141.adsl.alicedsl.de (EHLO [192.168.2.130]) [85.178.102.141] by mail.gmx.net (mp040) with SMTP; 20 Oct 2006 03:39:40 +0200 X-Authenticated: #17532834 Message-ID: <453828D9.6000103@gmx.net> Date: Fri, 20 Oct 2006 01:39:00 -0000 From: Robert Schuster User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.12) Gecko/20060216 Debian/1.7.12-1.1ubuntu2 MIME-Version: 1.0 To: David Daney , mauve-patches@sources.redhat.com Subject: Re: RFC: Add -vmprefix switch -- committed References: <45373B2D.1090800@gmx.net> <4537A092.9060704@avtrex.com> In-Reply-To: <4537A092.9060704@avtrex.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE6FC658F89DAE831C4E7535C" X-Y-GMX-Trusted: 0 X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2006/txt/msg00707.txt.bz2 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE6FC658F89DAE831C4E7535C Content-Type: multipart/mixed; boundary="------------040406010407050506020301" This is a multi-part message in MIME format. --------------040406010407050506020301 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 993 Hi, I changed the naming to vmprefix and committed the patch. ChangeLog: 2006-10-20 Robert Schuster * Harness.java: Added vmExtra field. (setupHarness): Examine -vmprefix argument. (initProcess): Use vmPrefix field if non-null. * README: Added info about -vmprefix switch. cya Robert David Daney wrote: > Robert Schuster wrote: > >> 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 >> >> * Harness.java: Added vmExtra field. >> (setupHarness): Examine -vmextra argument. >> (initProcess): Use vmExtra field if non-null. >> * README: Added info about -vmextra switch. >> >> cya >> Robert > > > I like the idea, but I would call it something like 'vmprefix'. > > David Daney > > --------------040406010407050506020301 Content-Type: text/x-patch; name="mauve-vmextra.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mauve-vmextra.diff" Content-length: 2346 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 20 Oct 2006 01:37:40 -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 vmPrefix = 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("-vmprefix")) + { + // User wants to prepend a certain command. + if (++i >= args.length) + throw new RuntimeException ("No file" + + "given after '-vmprefix'. Exit"); + vmPrefix = 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 (vmPrefix != null) + sb.insert(0, vmPrefix + 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 20 Oct 2006 01:37:40 -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 -vmprefix argument and specify a path to the program you want + to run: + + -vmprefix [prefixpath] + + For example, the following command will run a Socket test with strace on + Cacao: + + HARNESSVM Harness java.net.Socket -vm cacao -vmprefix strace 2. Selecting a subset of the tests to run --------------040406010407050506020301-- --------------enigE6FC658F89DAE831C4E7535C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 253 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Debian - http://enigmail.mozdev.org iD8DBQFFOCjdG9cfwmwwEtoRAs31AKCD5uCM1qw7kQnBemhKjIFLAAPYXACfXjWm tv0RF1ZiXfzJjClX0MDzr8w= =VMq9 -----END PGP SIGNATURE----- --------------enigE6FC658F89DAE831C4E7535C--