This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: update in batch_run


Hi,
  for those who are using mauve in an IDE which keeps .class up to date
with .java (like Eclipse), a batch_run launch cleans everything and
recompile everything, which is quite long. So I added the ability to set
the environnement variable COMPILER to "none", which assumes that all
.class are already present.
  If accepted, the batch_run wrapper in eclipse could be changed to
benefit of this optimisation.
  Thx for the feedback
Olivier
Index: batch_run
===================================================================
RCS file: /cvs/mauve/mauve/batch_run,v
retrieving revision 1.18
diff -u -r1.18 batch_run
--- batch_run	21 Dec 2005 15:07:19 -0000	1.18
+++ batch_run	14 Feb 2006 19:45:28 -0000
@@ -22,7 +22,8 @@
 
 # Tries to compile and run all possible tests.
 # Produces a FAIL output if compilation fails.
-# COMPILER command can be set in the script
+# COMPILER command can be set in the script or to "none" to avoid
+# cleaning .class files and recompiling them
 # For testing (gcj) native code compilation set NATIVE to 'true', otherwise
 # don't set it.
 # Uses runner script to run each individual test.
@@ -57,8 +58,11 @@
 NATIVE=
 fi
 
-# Cleanup
-find gnu/testlet -name "*.class" | xargs rm -f
+# Cleanup if COMPILER != none
+if test "x$COMPILER" != "xnone"; then
+	find gnu/testlet -name "*.class" | xargs rm -f
+fi
+
 if test ! -z "$NATIVE"; then
     rm -f SimpleTestHarness
 fi
@@ -66,7 +70,7 @@
 # Create Mauve Framwork
 framework_sources="gnu/testlet/SimpleTestHarness.java gnu/testlet/TestHarness.java gnu/testlet/Testlet.java gnu/testlet/ResourceNotFoundException.java gnu/testlet/TestSecurityManager.java gnu/testlet/config.java gnu/testlet/TestResult.java gnu/testlet/TestReport.java"
 
-if test -z "$NATIVE"; then
+if test -z "$NATIVE" -a "x$COMPILER" != "xnone"; then
     $COMPILER $COMPILER_FLAGS $framework_sources
 fi
 
@@ -110,7 +114,9 @@
 
     # Try to compile sources
     if test -z "$NATIVE"; then
-        $COMPILER $COMPILER_FLAGS @uses_files
+	if test "x$COMPILER" != "xnone"; then
+	       	$COMPILER $COMPILER_FLAGS @uses_files
+	fi
     else
         $COMPILER $COMPILER_FLAGS -o SimpleTestHarness --main=gnu.testlet.SimpleTestHarness \
 	          $framework_sources `cat uses_files`

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]