This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
RFC: remove old harness
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Wed, 07 Jun 2006 10:37:22 -0400
- Subject: RFC: remove old harness
Hi,
This patch removes the old harness and makes the new one the default. It also
makes:
./configure --with-vm=/path/to/vm
make
make check
work. I wanted some comments before making this change. It reports test
results differently -- each test is a pass/fail rather than each check -- so
we'll also need to update our nightly scripts.
The new harness is better than the old one in every way, in my opinion, so I see
no reason in keeping the old one around.
What do people think?
Tom
Index: .cvsignore
===================================================================
RCS file: /cvs/mauve/mauve/.cvsignore,v
retrieving revision 1.8
diff -u -r1.8 .cvsignore
--- .cvsignore 24 Apr 2006 19:42:02 -0000 1.8
+++ .cvsignore 7 Jun 2006 14:30:34 -0000
@@ -21,5 +21,3 @@
SimpleTestHarness
mauve-classpath
mauve.out
-.ecjOut
-.ecjErr
Index: Harness.java
===================================================================
RCS file: /cvs/mauve/mauve/Harness.java,v
retrieving revision 1.8
diff -u -r1.8 Harness.java
--- Harness.java 31 May 2006 17:21:42 -0000 1.8
+++ Harness.java 7 Jun 2006 14:30:35 -0000
@@ -60,10 +60,6 @@
// bootclasspath, which should be the classpath installation directory
private static String compileStringBase = "-proceedOnError -nowarn";
- // The writers for ecj's out and err streams.
- private static PrintWriter ecjWriterOut = null;
- private static PrintWriter ecjWriterErr = null;
-
// The constructor for the embedded ecj
private static Constructor ecjConstructor = null;
@@ -95,9 +91,6 @@
// Whether we should compile tests before running them
private static boolean compileTests = true;
- // Whether we should display information for failing compilations
- private static boolean showCompilationErrors = true;
-
// The total number of tests run
private static int total_tests = 0;
@@ -247,8 +240,6 @@
else if (args[i].equals("no") || args[i].equals("false"))
compileTests = false;
}
- else if (args[i].equals("-hidecompilefails"))
- showCompilationErrors = false;
else if (args[i].equals("-help") || args[i].equals("--help")
|| args[i].equals("-h"))
printHelpMessage();
@@ -388,25 +379,10 @@
klass.getMethod
("compile", new Class[]
{ String.class, PrintWriter.class, PrintWriter.class });
- ecjWriterOut = new PrintWriter(new FileOutputStream(".ecjOut"));
- ecjWriterErr = new PrintWriter(new FileOutputStream(".ecjErr"));
// Set up the compiler options now that we know whether or not we are
// compiling, and print a header to the compiler error file.
compileStringBase += getClasspathInstallString();
- ecjWriterErr.println("This file lists the compiler errors.\n" +
- "Weird things will happen if the compiler's " +
- "bootclasspath isn't properly set.\nIf the errors" +
- " listed here seem odd, like:\n\n" +
- " 'The type java.lang.Object cannot be resolved." +
- " It is indirectly\n referenced from required " +
- ".class files,'\n\nthen try setting the " +
- "bootclasspath by using the\n" +
- "--with-bootclasspath=CPINSTALLDIR option " +
- "in configure.");
- ecjWriterErr.println("\nThe compiler command used was: \n " +
- compileStringBase + "\n");
-
}
/**
@@ -1002,107 +978,6 @@
result = - 1;
}
- if (result != 0)
- {
- // The compilation was not successful. Since the -nowarn option was
- // used to compile the tests and output was sent to the ".ecjErr"
- // file, we can parse that file, exclude the tests that did not
- // compile properly, and print out the errors to the user if they
- // asked to see them.
- try
- {
- BufferedReader errReader =
- new BufferedReader(new FileReader(".ecjErr"));
- String lastFailingTest = null;
- String temp;
- String prev = null;
- int loc;
-
- // Go to the part in the file that relates to this folder
- // specifically.
- temp = errReader.readLine();
- int len = folderName.length();
- int index;
- while (temp != null)
- {
- index = temp.indexOf(folderName);
- if (index != -1 &&
- (temp.lastIndexOf((int)File.separatorChar) == len + index))
- break;
- temp = errReader.readLine();
- }
-
- // If temp is null, we didn't find it. Otherwise, look for each
- // individual failing compilation, count it as a fail, exclude it
- // from the test run, and print out the info.
- while (temp != null)
- {
- // If we've reached a part of the file that pertains to another
- // folder then break out of the loop.
- if (temp.indexOf("gnu" + File.separatorChar + "testlet") != - 1
- && temp.indexOf(folderName) == - 1)
- break;
-
- // Look for test names for failing tests, so we can exclude
- // them from the run.
- loc = temp.indexOf("gnu" + File.separatorChar + "testlet");
- if (loc != - 1)
- {
- compileFailsInFolder++;
- String name = temp.substring(loc);
- if (!name.equals(prev))
- {
- String shortName =
- stripPrefix(name).replace(File.separatorChar, '.');
- if (shortName.endsWith(".java"))
- shortName =
- shortName.substring(0, shortName.length() - 5);
- if (verbose && lastFailingTest != null)
- System.out.println
- ("TEST FAILED: compilation failed " + lastFailingTest);
- lastFailingTest = shortName;
-
- if (verbose)
- System.out.println
- ("TEST: " + shortName + "\n FAIL: " +
- "compilation failed.");
- else
- System.out.println("FAIL: " + shortName
- + ": compilation failed");
- if (!showCompilationErrors)
- System.out.println
- (" Read .ecjErr for details or don't run with" +
- " -hidecompilefails");
-
- // When a test fails to compile, we count it as failing
- // but we do not run it.
- total_test_fails++;
- total_tests++;
- excludeTests.add(name);
- }
- prev = name;
- }
-
- // Unless -hidecompilefails was used, print out the info. Do not
- // print the compiler summer (e.g. '3 problems (3 errors)').
- if (showCompilationErrors &&
- temp.indexOf(problemsString(compileFailsInFolder)) == -1)
- System.out.println(" " + temp);
-
- // Read the next line in the file.
- temp = errReader.readLine();
- }
- if (verbose && lastFailingTest != null)
- System.out.println
- ("TEST FAILED: compilation failed " + lastFailingTest);
- }
- catch (FileNotFoundException fnfe)
- {
- }
- catch (IOException ioe)
- {
- }
- }
return result == 0;
}
@@ -1166,7 +1041,8 @@
new PrintWriter (System.err),
Boolean.FALSE});
return ((Boolean) ecjMethod.invoke (ecjInstance, new Object[] {
- compileString, ecjWriterOut, ecjWriterErr})).booleanValue() ? 0 : -1;
+ compileString, new PrintWriter(System.out),
+ new PrintWriter(System.err)})).booleanValue() ? 0 : -1;
}
private static int compileTest(String testName)
@@ -1186,40 +1062,9 @@
if (result != 0)
{
String shortName = stripPrefix(testName);
- if (verbose)
- System.out.println
- ("TEST: " + shortName + "\n FAIL: compilation failed.");
- else
- System.out.println("FAIL: " + stripPrefix(testName)
- + ": compilation failed");
- if (!showCompilationErrors)
- System.out.println
- (" Read .ecjErr for details or don't run with -hidecompilefails");
- else
- {
- try
- {
- BufferedReader errReader =
- new BufferedReader(new FileReader(".ecjErr"));
- String temp = errReader.readLine();
- while(temp != null && temp.indexOf(testName) == -1)
- temp = errReader.readLine();
- System.out.println(" " + temp);
- temp = errReader.readLine();
- while (temp != null &&
- temp.indexOf("gnu" + File.separatorChar + "teslet") == -1)
- {
- System.out.println(" " + temp);
- temp = errReader.readLine();
- }
- }
- catch (FileNotFoundException fnfe)
- {
- }
- catch (IOException ioe)
- {
- }
- }
+ System.out.println("FAIL: " + stripPrefix(testName)
+ + ": compilation failed");
+
if (config.cpInstallDir.equals(""))
System.out.println(" Try setting --with-bootclasspath " +
"when running configure.\n See the README file for details");
Index: Makefile.am
===================================================================
RCS file: /cvs/mauve/mauve/Makefile.am,v
retrieving revision 1.28
diff -u -r1.28 Makefile.am
--- Makefile.am 24 Apr 2006 19:42:02 -0000 1.28
+++ Makefile.am 7 Jun 2006 14:30:35 -0000
@@ -1,125 +1,22 @@
## Process this file with automake to produce Makefile.in.
-## FIXME: dependencies
-AUTOMAKE_OPTIONS = foreign subdir-objects no-dependencies
+## Do not check for INSTALL, NEWS and AUTHORS files.
+AUTOMAKE_OPTIONS = foreign
-JAVACFLAGS = -g
-
-TESTFLAGS =
-
-check_DATA = $(STAMP)
-
-harness_files = Harness.java \
+harness_files = \
+ Harness.java \
RunnerProcess.java \
gnu/testlet/SimpleTestHarness.java \
- gnu/testlet/TestHarness.java gnu/testlet/Testlet.java \
- gnu/testlet/TestSecurityManager.java \
- gnu/testlet/TestSecurityManager2.java \
- gnu/testlet/ResourceNotFoundException.java \
- gnu/testlet/TestReport.java \
- gnu/testlet/TestResult.java
+ gnu/testlet/TestHarness.java
-harness: FORCE
+harness:
$(JAVAC) $(harness_files)
$(JAVAC) gnu/testlet/config.java
all-local: harness
-## FIXME: leading space makes automake ignore this. Bleah.
- include choices
-
-classes.stamp: choices $(CHOICES) gnu/testlet/config.class
- here=`/bin/pwd`; cd $(srcdir); \
- CLASSPATH=$$CLASSPATH:$$here:`/bin/pwd` $(JAVAC) $(JAVACFLAGS) -d $$here \
- $(harness_files) $(CHOICES)
- touch classes.stamp
-
-gnu/testlet/config.class: gnu/testlet/config.java
- $(JAVAC) $(JAVACFLAGS) gnu/testlet/config.java
-
-KEYS =
-choices: FORCE
- ok=no; \
- if test -f .save-keys && test -f choices && test "`cat .save-keys`" = "$(KEYS)"; then \
- ok=yes; \
- fi; \
- here=`/bin/pwd`; \
- if test "$$ok" = no; then \
- echo "$(KEYS)" > .save-keys; \
- cd $(srcdir) && $(SHELL) choose $$here $(KEYS); \
- fi
-
-FORCE:
-
-if USE_GCJ
-
-if CLASS_FILES
-STAMP = classes.stamp
-
-$(javao_files): classes.stamp
-
-%.o: %.class classes.stamp
- CLASSPATH=.:$(srcdir) $(GCJ) -fassume-compiled $(GCJFLAGS) -c -o $@ $<
-
-else # CLASS_FILES
-
-%.o: %.java
-## Eww.
- @-$(mkinstalldirs) $(dir $@) > /dev/null 2>&1
- CLASSPATH=.:$(srcdir) $(GCJ) -fassume-compiled $(GCJFLAGS) -c -o $@ $<
-
-endif # CLASS_FILES
-
-java_files = $(harness_files) $(CHOICES)
-class_files = $(patsubst %.java,%.class,$(java_files)) \
- gnu/testlet/config.class
-javao_files = $(patsubst %.java,%.o,$(CHOICES))
-
-check_PROGRAMS = SimpleTestHarness
-
-AM_GCJFLAGS = -I. -I$(srcdir)
-
-SimpleTestHarness_SOURCES = gnu/testlet/config.java $(harness_files)
-SimpleTestHarness_DEPENDENCIES = $(STAMP) $(javao_files)
-SimpleTestHarness_LDADD = $(javao_files)
-SimpleTestHarness_LDFLAGS = --main=gnu.testlet.SimpleTestHarness
-
-check-local: $(check_PROGRAMS) $(CHOICES) cleanup-env
- cat classes | GCJ="$(GCJ)" JAVA= ./SimpleTestHarness$(EXEEXT) $(TESTFLAGS)
-
-recheck:
- test -f .save-keys || : > .save-keys
-## Always remove the test program to force a relink.
- @rm -f SimpleTestHarness$(EXEEXT)
- $(MAKE) KEYS="`cat .save-keys`" check
-
-MOSTLYCLEANFILES = $(javao_files)
-CLEANFILES = $(class_files) classes.stamp
-
-else ## USE_GCJ
-
-STAMP = classes.stamp
-
-check-local: classes.stamp cleanup-env
- cat classes | \
- CLASSPATH=$$CLASSPATH:`/bin/pwd` JAVAC="$(JAVAC)" JAVA="$(JAVA)" $(JAVA) gnu.testlet.SimpleTestHarness $(TESTFLAGS)
-
-recheck:
- test -f .save-keys || : > .save-keys
- $(MAKE) KEYS="`cat .save-keys`" check
-
-CLEANFILES = classes.stamp
-
-endif ## USE_GCJ
-
-# Cleanup files, directories and other stuff left over from previous
-# test runs that will interfere with this one. (Ideally a testcase
-# should do this for itself.)
-cleanup-env:
- if test -d /tmp/mauve-testdir ; then \
- chmod -R 777 /tmp/mauve-testdir ; \
- rm -rf /tmp/mauve-testdir ; \
- fi
+check-local:
+ $(JAVA) Harness
-## For now can't define this conditionally.
-SUFFIXES = .class .java
+clean-local:
+ find . -name '*.class' -print | xargs rm -f
Index: README.OldHarness
===================================================================
RCS file: README.OldHarness
diff -N README.OldHarness
--- README.OldHarness 5 Apr 2006 20:11:27 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,234 +0,0 @@
-This is Mauve, a free test suite for the Java Class Libraries.
-
-Mauve is intended to test several different varieties of the
-libraries. For instance, it will contain tests that are specific to a
-particular JDK version. Tags in the test files help the test
-framework decide which tests should or should not be run against a
-given runtime.
-
-
-To build, first run configure. You can control the configuration with
-some environment variables:
-
- JAVA Name of Java interpreter to use
- JAVAC Name of Java (to class) compiler to use
- GCJ Name of Java (to object) compiler to use
-
-GCJ is only used when the `--with-gcj' option is given to configure.
-
-The configure script also supports the following `--with' options:
-
- --with-tmpdir=DIR Put temporary files in DIR
- defaults to `/tmp'
- --with-mailhost=HOSTNAME Use mail server at HOSTNAME for socket tests
- defaults to `mx10.gnu.org'
- (Use this option if your local firewall
- blocks outgoing connections on port 25.)
-
-Note that you will need GNU make to use this testsuite. If your
-installation provides GNU make under a different name, such as gmake,
-replace `make' with `gmake' in the following.
-
-Use `make check' to run the tests. You can set the make variable
-`KEYS' to select a subset of the tests. KEYS is a list of keys that
-must be matched by the files to be tested. Some values:
-
- * Any key starting with `java.' is taken to be the name of a
- class hierarchy.
- E.g., the key `java.lang' matches only test classes in java.lang.*.
-
- * Any key starting with `!java.' is used to exclude a class
- hierarchy.
- E.g., `!java.lang.reflect' can be used to omit all reflection
- tests, while still including the rest of java.lang.
-
- JDK1.0 Run JDK1.0 tests only
- JDK1.1 Run JDK1.1 tests only
- JDK1.2 Run JDK1.2 tests only
-
-If an otherwise unrecognized tag QUUX is seen, and the file
-`mauve-QUUX' exists in the mauve source directory, then the contents
-of this file are treated as a list of tags. For instance, here is the
-current version of `mauve-libjava', which is used by the `libjava'
-library implementation:
-
- # Config file that tells mauve about the `libjava' tag.
- JDK1.0
- JDK1.1
- !java.beans
-
-Note that anything after a `#' on a line is treated as a comment and
-is stripped.
-
-File inclusion and exclusion commands are processed in order. So, for
-instance, specifying `!java.lang java.lang.System' will omit all
-java.lang tests except for System. Every file starts off in the
-`included' state; an explicit exclusion is needed to reject it. (So,
-e.g., specifying just `java.lang' is insufficient to select only
-java.lang. You must specify `!java. java.lang'. Note the `.'!)
-
-If no tags are given, "JDK1.0 JDK1.1" are assumed.
-
-You can use `make recheck' to re-run `make check' with the key list
-you last used.
-
-An alternative way to compiling and running all tests is the batch_run
-script. This makes it easy to run all test in one batch without worrying
-wheter all tests compile and/or running them crashes or hangs the runtime.
-
-batch_run and the runner helper script aren't integrated with the configure
-setup yet so you will have to edit them by hand to explicitly set the
-COMPILER variable in batch_run and the RUNTIME variable in runner.
-Optionally you can also change the KEYS setting in batch_run if you don't
-want to run all tests. You can also set the variable NATIVE=true in
-batch_run when you want to use gcj (without -C) in native mode.
-
-When a test cannot be compiled with the given COMPILER batch_run will
-output FAIL: <testname> COMPILE FAILED and go on with the next test.
-If the runner detects a runtime crash or timeout (runner variable
-WAIT=60 seconds) it will output FAIL: <testname> CRASH or TIMEOUT.
-
-If you want to run a single test by hand, you can feed its name
-directly to the test harness. Make sure to remember the `gnu.testlet'
-prefix for the test cases. E.g.:
-
- echo gnu.testlet.java.lang.Character.classify | \
- java gnu.testlet.SimpleTestHarness -verbose -debug PATH-TO-SRCDIR
-
-The optional `-verbose' command-line argument makes the test suite a
-little noisier about what it is doing. In particular it will print
-information about caught exceptions in this case.
-
-Some tests may provide even more information about failures to aid
-with debugging a particular run-time system. These messages are enabled
-by specifying the optional command-line argument `-debug'
-
-If you are only interested in the results of the tests (not only which
-ones FAIL but also which ones PASS). Then you can use the '-resultsonly'
-command-line argument. This will also suppress the printing of a summary
-at the end.
-
-The '-exceptions' command-line argument to causes the display of full
-stack traces when a test fails due to an uncaught exception.
-
-You may use the environment variable TESTFLAGS to provide these
-flags to the invocation of the SimpleTestHarness in the `check' target.
-For instance,
-
- make check "TESTFLAGS=-verbose -debug"
-
-will run the testsuite in verbose and debug mode.
-
-================================================================
-
-Tags in a test are specified a little differently from tags on the
-command line.
-
-Each tag on the command line is first mapped to a list of actual tags.
-E.g., "JDK1.2" implies all the tags "JDK1.0", "JDK1.1", and "JDK1.2".
-
-If any tag from the expanded list is matched by the test case, then
-the test case is chosen.
-
-However, if one of the tags specified on the command line appears in
-the test with a `!' prefix, then the test is rejected.
-
-Tags must all appear on a single line beginning "// Tags: ".
-
-Many files test functionality that has existed since JDK1.0. The
-corresponding line in the source:
-
- // Tags: JDK1.0
-
-Here is how you would tag something that first appeared in JDK1.2:
-
- // Tags: JDK1.2
-
-Here is how you would tag something that was eliminated in JDK1.2:
-
- // Tags: JDK1.0 !JDK1.2
-
-The idea behind this scheme is that it is undesirable to update all
-the files whenever we add a tag. So instead most tags are defined in
-terms of primitive tags, and then we note the exceptions.
-
-When adding a new tag, change the `choose' program to map the
-specified tag onto the implied tags. There is some code near the top
-that handles this transformation.
-
-Files should only hold tags describing their prerequisites. In
-particular, limitations of a given library implementation should not
-be mentioned in file tags (because when the library changes, this
-would necessitate global edits). Instead, put such limitations in a
-`mauve-QUUX' tag expansion file.
-
-================================================================
-
-Some test cases may require extra utility classes to run. When the
-choose script selects a test case for running, the framework
-identifies the supporting classes through another magic comment in the
-test source.
-
-Support classes must all appear on a single line beginning with the
-string "// Uses: ". The framework assumes that all utility classes
-used are found in that same package as the test case.
-
-================================================================
-
-Graphical tests that display windows and accept input are marked with
-the GUI tag. GUI tests are not included in the default list of tags.
-If the GUI tag does appear in KEYS, batch_run will spawn an Xvfb
-process, set DISPLAY to that X server and run the
-graphical/interactive tests there. By default, metacity is run in
-Xvfb; use the WM environment variable to run a different window
-manager. If you'd rather run the tests directly on your desktop, set
-SHOW_GUI_TESTS=1.
-
-================================================================
-
-The test harness can also ignore known failures. Simply create a
-file 'xfails' in the directory where the tests are being run which
-contains 'FAIL:' entries from previous test runs. The order of the
-lines in the file is immaterial. Also, the -verbose flag must be
-used. Totals for both XFAILs and XPASSes will be output at the
-end of the run.
-
-In this way, implementations can track known failures and subsequent
-test runs can thus highlight regressions.
-
-================================================================
-
-There are still a few things to do in the test framework.
-
-
-It would be nice if we could have tests that can specify their
-expected output. The expected output could be encoded directly in the
-test, e.g.:
-
- /*{
- expected output here
- }*/
-
-The test harness would be reponsible for extracting this from the test
-source and then setting things up so that the checking is done
-correctly. SimpleTestHarness could do this by setting System.out to
-point to some string buffer for the duration of the test.
-
-
-Change things so that the .o files can be built directly from the
-.java files without any intermediate .class files. (Use the same
-configuration options that libjava uses.)
-
-
-Some tests probably should be run in their own environment. This
-could be implemented using a new "group" magic comment, along with
-changes to the `choose' program to generate the list of classes in
-chunks. Each such chunk would be fed into SimpleTestHarness in a
-separate invocation.
-
-
-It would be interesting to be able to compare test results for
-unspecified things against Sun's implementation. This could be done
-by adding a new method to the test harness. The `expected' argument
-would come from Sun's implementation. Unlike `check', a failure here
-would simply be informative.
Index: README.TestletToAPI
===================================================================
RCS file: README.TestletToAPI
diff -N README.TestletToAPI
--- README.TestletToAPI 16 Oct 2005 17:53:20 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-TestletToAPI can be used with Mauve but is in fact independant of it.
-
-TestletToAPI generates 2 japi files that can be used to show the coverage
-(in term of methods, not of lines of code) of mauve testlets.
-
-That's a command line tool that takes 4 parameters :
- inTestlets.japi : the output of japize on mauve testlets");
- inTested.japi : the output of japize on tested api (Classpath, jdk, ...)
- outTestlets.japi, outTested.japi : 2 japi files to be used as input of japicompat
-
-Example of usage (in a "native" command line style) :
- TestletToAPI W:\mauve\mauve.japi W:\mauve\jdk15.japi W:\mauve\mauve.japi.post W:\mauve\jdk15.japi.post
-
\ No newline at end of file
Index: batch_run
===================================================================
RCS file: batch_run
diff -N batch_run
--- batch_run 19 Feb 2006 14:27:58 -0000 1.20
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,141 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
-# Written by Mark Wielaard <mark@klomp.org>
-
-# This file is part of Mauve.
-
-# Mauve is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# Mauve is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Mauve; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Tries to compile and run all possible tests.
-# Produces a FAIL output if compilation fails.
-# 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.
-#
-# Usage: run_batch > result_output
-# Run in the source directory.
-
-# Include every key/tag we can think of but always exclude the unicode test.
-if test "x$KEYS" = "x"; then
-KEYS="JDK1.0 JDK1.1 JDK1.2 JDK1.3 JDK1.4 JDK1.5 JDBC1.0 JDBC2.0 GNU GNU-CRYPTO"
-KEYS="$KEYS !java.lang.Character.unicode"
-fi
-
-if test "x$CLASSPATHBCP" = "x"; then
-CLASSPATHBCP="/usr/local/classpath/share/classpath/glibj.zip"
-fi
-
-if test "x$COMPILER" = "x"; then
-#COMPILER="gcj -C -Wno-deprecated"
-COMPILER="jikes -nowarn -bootclasspath $CLASSPATHBCP"
-fi
-
-if test "x$COMPILER" = "xgcj"; then
-COMPILER_FLAGS="-g -O0"
-else
-COMPILER_FLAGS="-g"
-fi
-
-if test "x$COMPILER" = "xgcj"; then
-NATIVE="true"
-GCJ=gcj; export GCJ;
-else
-NATIVE=
-JAVAC=$COMPILER; export JAVAC
-fi
-
-# 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
-
-# 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" && test "x$COMPILER" != "xnone"; then
- $COMPILER $COMPILER_FLAGS $framework_sources
-fi
-
-# Generate test classes list
-./choose-classes . "$KEYS"
-
-case $KEYS in
- *GUI*)
-
- if test -z "$SHOW_GUI_TESTS"; then
- XVFB=`which Xvfb`
- if test "x$WM" = "x"; then
- WM=`which metacity`
- # check if we found metacity
- if test "x$WM" = "x"; then
- WM=`which true`
- fi
- fi
-
- if test -z $XVFB; then
- echo "warning: Xvfb not found on PATH. Showing GUI tests on main desktop..."
- elif test -z $WM; then
- echo "warning: metacity not found on PATH. Showing GUI tests on main desktop..."
- else
- export DISPLAY=:57
- echo localhost > Xvfb.cfg
- $XVFB :57 -auth Xvfb.cfg > /dev/null 2>&1 &
- XVFB_PID=$!
- $WM > /dev/null 2>&1 &
- WM_PID=$!
- rm -f Xvfb.cfg
- fi
- fi
- ;;
-esac
-
-# Compile and run all the tests
-for testclass in `cat test_classes`; do
- # Get all needed java sources
- ./uses-list . $testclass
-
- # Try to compile sources
- if test -z "$NATIVE"; then
- 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`
- fi
- if test $? = 0; then
- ./runner $testclass 2>&1 | egrep '^(PASS|FAIL): '
- else
- echo "FAIL: $testclass COMPILE FAILED"
- fi
-done
-
-case $KEYS in
- *GUI*)
-
- # killing Xvfb also kills the window manager process
- if test ! -z "$XVFB_PID"; then
- kill $XVFB_PID > /dev/null 2>&1
- fi
- ;;
-esac
Index: build.xml
===================================================================
RCS file: build.xml
diff -N build.xml
--- build.xml 1 Jul 2005 18:33:42 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,116 +0,0 @@
-<?xml version="1.0"?>
-<!--Copyright (c) 2004 Thomas Zander <zander@kde.org>
-
- This file is part of Mauve.
-
- Mauve is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- Mauve is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Mauve; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. -->
-
-<project name="mauve" default="test" basedir=".">
-
- <!-- this loads the ant global properties -->
- <property file="${user.home}/.ant-global.properties"/>
-
- <property name="src" value="."/>
- <property name="build" value="build"/>
- <property name="docs" value="docs"/>
-
- <!-- clean up .class and .jar files -->
- <target name="clean" description="Clean out compiled files">
- <!-- call clean from example-buildfile -->
- <delete dir="${build}"/>
- <delete file="${src}/gnu/testlet/config.java"/>
- <delete dir="${docs}"/>
- </target>
-
- <!-- INIT creates the required directories and files -->
- <target name="init">
- <tstamp/>
- <mkdir dir="${build}"/>
- <mkdir dir="${docs}"/>
- <!-- if ant runs; we can be pretty sure these are correct. -->
- <filter token="SRCDIR" value="${user.dir}"/>
- <filter token="TMPDIR" value="${java.io.tmpdir}" />
- <filter token="CHECK_PATH_SEPARATOR" value="${path.separator}"/>
- <filter token="CHECK_FILE_SEPARATOR" value="${file.separator}"/>
- <copy file="${src}/gnu/testlet/config.java.in"
- tofile="${src}/gnu/testlet/config.java"
- verbose="true"
- filtering="true" />
- </target>
-
- <!-- CLASSPATH -->
- <path id="myclass.path">
- <pathelement location="${build}" />
- </path>
-
- <!-- compiles all the sources -->
- <target name="compile" depends="init" description="Compile all files">
- <javac srcdir="${src}" destdir="${build}"
- includes="gnu/**/*.java"
- excludes="gnu/testlet/BinaryCompatibility/**, gnu/testlet/gnu/**"
- classpathref="myclass.path"
- target="1.1"
- source="1.2"
- debug="on">
- </javac>
- </target>
-
- <target name="doc" depends="init" description="Build javadoc">
- <javadoc packagenames="gnu.testlet"
- defaultexcludes="yes"
- destdir="${docs}/"
- classpathref="myclass.path"
- windowtitle="Mauve test API" >
- <doctitle><![CDATA[<h1>Mauve test API</h1>]]></doctitle>
- </javadoc>
- </target>
-
- <target name="test" depends="init,compile" description="run the tests">
- <taskdef name="mauve" classname="gnu.anttask.RunTests" classpath="build"/>
- <mauve debug="false"
- verbose="false"
- haltonfailure="false"
- srcdir="${src}"
- testJDK="JDK1.4"
- testJDBC="JDBC2.0"
- failonerror="true">
- <fileset dir="${build}" includes="gnu/testlet/java/**" />
- <fileset dir="${build}" includes="gnu/testlet/javax/**" />
- <fileset dir="${build}" includes="gnu/testlet/org/**" />
- </mauve>
- </target>
-
- <target name="parseSources" description="Create tests lists file">
- <java classname="gnu.testlet.runner.CreateTags" fork="true">
- <classpath>
- <pathelement location="${build}" />
- </classpath>
- <arg value="gnu" />
- <arg value="${build}/testslists" />
- </java>
- </target>
-
- <target name="jars" depends="compile, parseSources" description="Bottle jar">
- <jar jarfile="alltests.jar" filesonly="true">
- <fileset dir="build" />
- <manifest>
- <attribute name="Main-Class" value="gnu.testlet.runner.Filter" />
- <attribute name="Built-By" value="${user.name}"/>
- </manifest>
-
- </jar>
- </target>
-</project>
Index: choose
===================================================================
RCS file: choose
diff -N choose
--- choose 24 May 2005 17:52:19 -0000 1.33
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,258 +0,0 @@
-#! /bin/sh
-
-# Copyright (c) 1998, 1999, 2005 Cygnus Solutions
-# Written by Tom Tromey <tromey@cygnus.com>
-
-# This file is part of Mauve.
-
-# Mauve is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# Mauve is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Mauve; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA. */
-
-
-# Choose the tests we want to run.
-# Usage: choose [-verbose] output-directory [tag] ...
-# Run in the source directory.
-# See README for information on tags.
-
-verbose=
-spectags=
-tags=
-file_specs=
-
-if test "$1" = "-verbose"; then
- verbose=yes
- shift
-fi
-
-outdir="$1"
-shift
-
-# Some tags imply other tags. For instance, JDK1.2 implies JDK1.1 and
-# JDK1.0. This makes it easier to keep the tags up to date in the
-# source -- we only have to keep track of differences (as opposed to
-# editing every source file when a new tag is added). If we see an
-# otherwise-unrecognized tag, and the file `mauve-TAG' exists, then we
-# treat the contents of that file as a list of implied tags.
-taglist=${1+"$@"}
-seen_dashdash=
-while test -n "$taglist"; do
- set $taglist
- i="$1"
- shift
- taglist=${1+"$@"}
-
- case "$i" in
- X--)
- seen_dashdash=yes
- ;;
- !!java.*)
- echo "Invalid tag: $i" 1>&2
- exit 1
- ;;
- !java.* | java.* | !javax.* | javax.* | !locales.* | locales.* | !BinaryCompatibility.* | BinaryCompatibility.* | !org.* | org.*)
- file="`echo $i | tr . /`"
- file_specs="$file_specs $file"
- ;;
- not-a-test)
- # You can't specify this.
- :
- ;;
- JDK1.2)
- tags="$tags JDK1.0 JDK1.1 $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JDK1.1)
- tags="$tags JDK1.0 $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- *)
- file=
- # Always prefer a tag file in the build directory.
- if test -f "$outdir/mauve-$i"; then
- file="$outdir/mauve-$i"
- else
- if test -f "mauve-$i"; then
- file="mauve-$i"
- fi
- fi
- if test -n "$file"; then
- # We don't want tags from a file to be treated as specified
- # on the command line. So we add a `X--' before the
- # expansion. We don't use just `--' as this would confuse
- # `set'.
- taglist="$taglist X-- `sed -e 's/#.*$//g' $file`"
- fi
- tags="$tags $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- esac
-done
-
-# By default, use JDK1.1.
-test -z "$tags" && tags="JDK1.0 JDK1.1 GUI"
-
-test -n "$verbose" && echo "tags = $tags"
-test -n "$verbose" && echo "spectags = $spectags"
-test -n "$verbose" && echo "file_specs = $file_specs"
-
-choices=/tmp/choices-$$
-echo "CHOICES =" > $choices
-classes=/tmp/classes-$$
-: > $classes
-usesfile=/tmp/uses-$$
-: > $usesfile
-
-(cd gnu/testlet; find java javax locales BinaryCompatibility org -name '*.java' -print) |
-while read file; do
- exact_match=no
- test -n "$verbose" && echo "Examining $file"
- if test -n "$file_specs"; then
- ok=yes
- for pat in $file_specs; do
- # PAT can be like `java.lang' or `!java.lang'.
- # If `!FILE' matches `PAT', then we know the pattern
- # starts with `!' and is an exclusion pattern.
- # Otherwise, if `!FILE' matches `!PAT', then we know that
- # the file should be included.
- case "!$file" in
- ${pat}*)
- ok=no
- test -n "$verbose" && echo " ... excluded by $pat"
- ;;
- !${pat}.java)
- # If the tag list includes an exact match, then we
- # unconditionally accept it.
- ok=yes
- exact_match=yes
- test -n "$verbose" && echo " ... included by $pat (exact match)"
- ;;
- !${pat}*)
- ok=yes
- test -n "$verbose" && echo " ... included by $pat"
- ;;
- esac
- done
- else
- ok=yes
- fi
-
- if test "$ok" = no; then
- continue
- fi
-
- # Surround value with spaces so that case statements will work
- # correctly.
- taglist=" `grep '^// *Tags:' gnu/testlet/$file | sed -e 's,^// *Tags:,,'` "
- istest=yes
- case "$taglist" in
- *\ not-a-test\ *)
- istest=no
- ;;
- esac
-
- # For an exact match, we don't look at the tags.
- if test "$exact_match" = no; then
- ok=no
- # If any tag on the tag list matches, then we are ok.
- for tag in $tags; do
- case "$taglist" in
- *" ${tag} "*)
- ok=yes
- break
- ;;
- esac
- done
-
- # If any specified tag hits a `not' tag, then we are not ok.
- if test "$ok" = yes; then
- for tag in $spectags; do
- case "$taglist" in
- *" !${tag} "*)
- ok=no
- test -n "$verbose" && echo "File $file has tag !$tag"
- break
- ;;
- esac
- done
- else
- test -n "$verbose" && echo " ... excluded because no tag matched"
- fi
- fi
-
- if test "$ok" = yes; then
- class="gnu.testlet.`echo $file | sed -e 's/\.java$//' | tr / .`"
- dirpart="`echo $file | sed -e 's,/[^/]*$,,'`"
- echo "gnu/testlet/$file" >> $usesfile
- if test "$istest" = yes; then
- echo $class >> $classes
- test -n "$verbose" && echo "Choose $class"
-
- # Now that we know we're going to use this class, see
- # what other support classes this test requires.
- useslist=" `grep '^// *Uses:' gnu/testlet/$file | sed -e 's,^// *Uses:,,'` "
- for used in $useslist; do
- # Normalize by removing '..' components from the start
- # of each 'Uses' file name.
- ndir=$dirpart
- while test `expr $used : '[.][.]/'` -ne 0; do
- ndir=`dirname $ndir`
- used=`echo "$used" | sed -e 's,^[.][.]/,,'`
- done
-
- usedfile=$ndir/$used.java
- echo "gnu/testlet/$usedfile" >> $usesfile
- done
-
- fi
- fi
-done
-
-# Now uniquify the list of auxiliary files we used, and add them to
-# the list of choices. I think neither `uniq' nor `sort -u' is
-# portable, so we do it by hand.
-previous=
-sort $usesfile |
-while read next; do
- if test "$previous" != "$next"; then
- echo " $next" >> $choices
- previous=$next
- fi
-done
-
-# Add a backslash to the end of every line except the last one.
-sed -e '$ !s/$/ \\/' < $choices > /tmp/x-$$
-mv /tmp/x-$$ $choices
-echo >> $choices
-
-# Due to a weirdness in GNU make, we want to list the dependencies
-# explicitly here. This is really nasty. But if we remove this, then
-# SimpleTestHarness will never be built, because its dependencies
-# won't include the .o files (but, strangely, the link line will).
-sed -e 's/CHOICES =/SimpleTestHarness:/' \
- -e 's/\.java/.o/g' $choices > /tmp/x-$$
-cat /tmp/x-$$ >> $choices
-rm /tmp/x-$$
-
-if test -f $outdir/choices \
- && cmp $choices $outdir/choices > /dev/null 2>&1; then
- # Files are the same.
- rm $choices $classes
-else
- mv $choices $outdir/choices
- mv $classes $outdir/classes
-fi
-rm $usesfile
-
-exit 0
Index: choose-classes
===================================================================
RCS file: choose-classes
diff -N choose-classes
--- choose-classes 19 Feb 2006 14:27:58 -0000 1.6
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,230 +0,0 @@
-#! /bin/sh
-
-# Copyright (c) 1998, 1999 Cygnus Solutions
-# Written by Tom Tromey <tromey@cygnus.com>
-
-# Copyright (c) 2002, 2006 Free Software Foundation, Inc.
-# Adapted by Mark Wielaard <mark@klomp.org>
-
-# This file is part of Mauve.
-
-# Mauve is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# Mauve is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Mauve; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA. */
-
-# Choose the tests we want to run. Output generated in file 'test_classes'.
-# Usage: choose-classes [-verbose] output-directory [tag] ...
-# Run in the source directory.
-# See README for information on tags.
-
-verbose=
-spectags=
-tags=
-file_specs=
-
-if test "$1" = "-verbose"; then
- verbose=yes
- shift
-fi
-
-outdir="$1"
-shift
-test -z "$outdir" \
- && echo "Usage: choose-classes [-verbose] output-directory [tag] ..." \
- && exit -1
-
-# Some tags imply other tags. For instance, JDK1.2 implies JDK1.1 and
-# JDK1.0. This makes it easier to keep the tags up to date in the
-# source -- we only have to keep track of differences (as opposed to
-# editing every source file when a new tag is added). If we see an
-# otherwise-unrecognized tag, and the file `mauve-TAG' exists, then we
-# treat the contents of that file as a list of implied tags.
-taglist=${1+"$@"}
-seen_dashdash=
-while test -n "$taglist"; do
- set $taglist
- i="$1"
- shift
- taglist=${1+"$@"}
-
- case "$i" in
- X--)
- seen_dashdash=yes
- ;;
- !!java.*)
- echo "Invalid tag: $i" 1>&2
- exit 1
- ;;
- !java.* | java.* | !javax.* | javax.* | !locales.* | locales.* | !BinaryCompatibility.* | BinaryCompatibility.*)
- file="`echo $i | tr . /`"
- file_specs="$file_specs $file"
- ;;
- GUI)
- tags="$tags GUI $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JAVA2)
- tags="$tags JDK1.0 JDK1.1 JDK1.2 $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JDK1.2)
- tags="$tags JDK1.0 JDK1.1 JAVA2 $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JDK1.1)
- tags="$tags JDK1.0 JLS1.1 $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JDK1.0)
- tags="$tags JLS1.0"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JLS1.1)
- tags="$tags JDK1.0 JDK1.1"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- JLS1.0)
- tags="$tags JDK1.0"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- *)
- file=
- # Always prefer a tag file in the build directory.
- if test -f "$outdir/mauve-$i"; then
- file="$outdir/mauve-$i"
- else
- if test -f "mauve-$i"; then
- file="mauve-$i"
- fi
- fi
- if test -n "$file"; then
- # We don't want tags from a file to be treated as specified
- # on the command line. So we add a `X--' before the
- # expansion. We don't use just `--' as this would confuse
- # `set'.
- taglist="$taglist X-- `sed -e 's/#.*$//g' $file`"
- fi
- tags="$tags $i"
- test -z "$seen_dashdash" && spectags="$spectags $i"
- ;;
- esac
-done
-
-# By default, use JDK1.1.
-test -z "$tags" && tags="JDK1.0 JDK1.1 GUI"
-
-test -n "$verbose" && echo "tags = $tags"
-test -n "$verbose" && echo "spectags = $spectags"
-test -n "$verbose" && echo "file_specs = $file_specs"
-
-classes=/tmp/classes-$$
-: > $classes
-
-(cd gnu/testlet; find java javax gnu org locales BinaryCompatibility -name '*.java' -print) |
-while read file; do
- exact_match=no
- test -n "$verbose" && echo "Examining $file"
- if test -n "$file_specs"; then
- ok=yes
- for pat in $file_specs; do
- # PAT can be like `java.lang' or `!java.lang'.
- # If `!FILE' matches `PAT', then we know the pattern
- # starts with `!' and is an exclusion pattern.
- # Otherwise, if `!FILE' matches `!PAT', then we know that
- # the file should be included.
- case "!$file" in
- ${pat}*)
- ok=no
- test -n "$verbose" && echo " ... excluded by $pat"
- ;;
- !${pat}.java)
- # If the tag list includes an exact match, then we
- # unconditionally accept it.
- ok=yes
- exact_match=yes
- test -n "$verbose" && echo " ... included by $pat (exact match)"
- ;;
- !${pat}*)
- ok=yes
- test -n "$verbose" && echo " ... included by $pat"
- ;;
- esac
- done
- else
- ok=yes
- fi
-
- if test "$ok" = no; then
- continue
- fi
-
- # Surround value with spaces so that case statements will work
- # correctly.
- taglist=" `egrep '^// *Tags:' gnu/testlet/$file | sed -e 's,^// *Tags:,,'` "
- istest=yes
- case "$taglist" in
- *\ not-a-test\ *)
- istest=no
- ;;
- esac
-
- # For an exact match, we don't look at the tags.
- if test "$exact_match" = no; then
- ok=no
- # If any tag on the tag list matches, then we are ok.
- for tag in $tags; do
- case "$taglist" in
- *" ${tag} "*)
- ok=yes
- break
- ;;
- esac
- done
-
- # If any specified tag hits a `not' tag, then we are not ok.
- if test "$ok" = yes; then
- for tag in $spectags; do
- case "$taglist" in
- *" !${tag} "*)
- ok=no
- test -n "$verbose" && echo "File $file has tag !$tag"
- break
- ;;
- esac
- done
- else
- test -n "$verbose" && echo " ... excluded because no tag matched"
- fi
- fi
-
- if test "$ok" = yes; then
- class="gnu.testlet.`echo $file | sed -e 's/\.java$//' | tr / .`"
- if test "$istest" = yes; then
- echo $class >> $classes
- test -n "$verbose" && echo "Choose $class"
- else
- test -n "$verbose" && echo " ... excluded because not-a-test"
- fi
- fi
-done
-
-if test -f $outdir/test_classes \
- && cmp $classes $outdir/test_classes > /dev/null 2>&1; then
- # Files are the same.
- rm $classes
-else
- mv $classes $outdir/test_classes
-fi
-
-exit 0
Index: configure.in
===================================================================
RCS file: /cvs/mauve/mauve/configure.in,v
retrieving revision 1.18
diff -u -r1.18 configure.in
--- configure.in 31 May 2006 17:21:42 -0000 1.18
+++ configure.in 7 Jun 2006 14:30:37 -0000
@@ -2,124 +2,50 @@
AC_INIT(gnu/testlet/Testlet.java)
AM_INIT_AUTOMAKE(mauve, 0.0)
-dnl Check path and file separator types
-ACX_CHECK_PATHNAME_STYLE_DOS
-
-dnl For EXEEXT.
-AC_PROG_CC
-
dnl Check for which JVM should be tested, default to "java"
AC_ARG_WITH(vm,
-[ --with-vm=TESTJVM Run the tests with TESTJVM],
-TEST_JAVA="$with_vm", TEST_JAVA="java")
+ AS_HELP_STRING([--with-vm=TESTJVM],
+ [Run the tests with TESTJVM]),
+ TEST_JAVA="$with_vm",
+ TEST_JAVA="java")
AC_SUBST(TEST_JAVA)
-export MAUVEVM="$TEST_JAVA"
-
-
-AC_ARG_WITH(gcj,
-[ --with-gcj Use gcj to compile .class files])
-AM_CONDITIONAL(USE_GCJ, test "$with_gcj" = yes)
-
-
-AC_ARG_WITH(bootclasspath,
-[ --with-bootclasspath=BOOTCP Specify the bootclasspath for the compiler],
-CP_INSTALL_DIR="$with_bootclasspath")
-AC_SUBST(CP_INSTALL_DIR)
-
-AC_ARG_WITH(emma,
-[ --with-emma(=JARLOCATION) Use emma, either unpacked in classpath
-folder or at the specified JARLOCATION],
-EMMA="$with_emma", EMMA="yes")
-if test "$EMMA" = "yes"
-then
-EMMA="_auto_detect_emma_"
-fi
-AC_SUBST(EMMA)
+dnl If we find an ecj jar file, enable auto-compilation. Otherwise
+dnl disable it.
+ECJ_JAR=""
+auto_compilation="yes"
AC_ARG_WITH(ecj-jar,
-[ --with-ecj-jar=JARLOCATION Use the ecj jar found at JARLOCATION for
-auto-compilation],
-ECJ_JAR="$with_ecj_jar", ECJ_JAR=yes)
-if test "$ECJ_JAR" = "yes"
-then
-ECJ_JAR="/usr/share/java/eclipse-ecj.jar"
-fi
-
+ AS_HELP_STRING([--with-ecj-jar=JARLOCATION],
+ [Use the ecj jar found at JARLOCATION for auto-compilation]),
+ ECJ_JAR="$with_ecj_jar",
+ AC_CHECK_FILE([/usr/share/java/eclipse-ecj.jar],
+ ECJ_JAR="/usr/share/java/eclipse-ecj.jar",
+ AC_CHECK_FILE([/usr/share/ecj.jar],
+ ECJ_JAR="/usr/share/java/eclipse-ecj.jar",
+ auto_compilation="no")))
AC_SUBST(ECJ_JAR)
-
-dnl auto-compilation is disabled by default because it requires the
-dnl --with-classpath-install-dir option to be used as well, and so
-dnl by disabling it, the standard "./configure" setup has a better
-dnl chance of producing meaningful results. If it were enabled
-dnl by default many tests would fail because the compiler wouldn't
-dnl have the correct bootclasspath
-AC_ARG_ENABLE(auto-compilation,
-[ --enable-auto-compilation Use ecj to compile tests on the fly],
-AUTO_COMPILE="$enable_auto_compilation",AUTO_COMPILE="yes")
-AC_SUBST(AUTO_COMPILE)
-
-dnl See if the user prefers to build .class files with gcj, or whether
-dnl javac will be used. The default is to use gcj if we're compiling
-dnl with gcj.
-AC_ARG_ENABLE(gcj-classes,
-[ --enable-gcj-classes Use gcj, not javac, to build class files],
- gcj_classes="$enable_gcj_classes", gcj_classes=maybe)
-if test "$gcj_classes" = yes \
- || (test "$gcj_classes" = maybe && test "$with_gcj" = yes); then
- JAVAC='$(GCJ) -C'
-fi
-
-dnl If we're using gcj, the default is not to build class files at all.
-AC_ARG_ENABLE(class-files,
-[ --enable-class-files Create class files when using gcj],
- class_files="$enable_class_files",
- if test "$with_gcj" = yes; then
- class_files=no
- else
- class_files=yes
- fi)
-AM_CONDITIONAL(CLASS_FILES, test "$class_files" = yes)
+AM_CONDITIONAL(AUTO_COMPILE, test "$auto_compilation" = yes)
JAVA=${JAVA-java}
AC_SUBST(JAVA)
JAVAC=${JAVAC-javac}
AC_SUBST(JAVAC)
-AM_PROG_GCJ
-
-AC_PROG_INSTALL
-
-AC_SUBST(SHELL)
-
-SRCDIR=`(cd $srcdir; pwd)`
-AC_SUBST(SRCDIR)
-
dnl Specify the tempdir.
AC_ARG_WITH(tmpdir,
-changequote(<<,>>)
-<< --with-tmpdir=DIR Put temporary files in DIR [/tmp]>>,
-changequote([,])
-TMPDIR="$with_tmpdir")
-
-TMPDIR=${TMPDIR-/tmp}
+ AS_HELP_STRING([--with-tmpdir=DIR],
+ [Put temporary files in DIR (default is /tmp)])
+ TMPDIR="$with_tmpdir",
+ TMPDIR="/tmp")
AC_SUBST(TMPDIR)
dnl Specify a mail server host for socket testing. This allows you to
dnl choose a different server if 'mx10.gnu.org' is blocked by your firewall
AC_ARG_WITH(mailhost,
-changequote(<<,>>)
-<< --with-mailhost=hostname Server for socket tests [mx10.gnu.org]>>,
-changequote([,])
-MAIL_HOST="$with_mailhost")
-
+ AS_HELP_STRING([--with-mailhost=hostname],
+ [Server for socket tests (default is mx10.gnu.org)]),
+ MAIL_HOST="$with_mailhost")
MAIL_HOST=${MAIL_HOST-mx10.gnu.org}
AC_SUBST(MAIL_HOST)
-if test ! -d gnu; then
- mkdir gnu
-fi
-if test ! -d gnu/testlet; then
- mkdir gnu/testlet
-fi
-
AC_OUTPUT(Makefile gnu/testlet/config.java)
Index: runner
===================================================================
RCS file: runner
diff -N runner
--- runner 19 Feb 2006 14:27:58 -0000 1.15
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2002, 2004, 2006 Free Software Foundation, Inc.
-# Written by Mark Wielaard <mark@klomp.org>
-
-# This file is part of Mauve.
-
-# Mauve is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# Mauve is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Mauve; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Tries to run one test case. Produces a FAIL output if the test crashes
-# or doesn't finish after some timeout occurs.
-# RUNTIME command can be set in the script to select the VM.
-# For testing (gcj) native code set RUNTIME to 'native' it will then try to
-# execute the program SimpleTestHarness in the current directory.
-# Called from batch_run script.
-#
-# Usage: runner test_class_name
-# Run in the source directory.
-
-if test "x$RUNTIME" = "x" ; then
-#RUNTIME="gij"
-#RUNTIME="Kissme"
-#RUNTIME="/usr/local/sablevm/bin/sablevm -Y"
-#RUNTIME="jc -Xint"
-RUNTIME="jamvm"
-#RUNTIME="native"
-fi
-
-JAVA=$RUNTIME; export JAVA
-
-# Number of seconds to wait for the test to finish
-WAIT=60
-
-# Whether the test was killed by a timeout
-KILLED=0
-
-# Called when timeout occurs
-timeout()
-{
- kill -9 $PID > /dev/null 2>&1
- KILLED=1
-}
-
-# Install timeout
-trap timeout SIGALRM
-(sleep $WAIT && kill -s SIGALRM $$) > /dev/null 2>&1 &
-TIMEOUT=$!
-
-testclass=$1
-# Run process
-if test "x$RUNTIME" = "xnative"; then
- echo $testclass > testfilename.txt
- ./SimpleTestHarness -debug -verbose -file testfilename.txt &
-else
- echo $testclass | $RUNTIME -Dmauve.vmexec=$RUNTIME gnu.testlet.SimpleTestHarness -debug -verbose &
-fi
-PID=$!
-wait $PID
-result=$?
-
-# cleanup timeout
-# FIXME: this kills tests too early:
-# trap '' SIGALRM
-# if test $KILLED != 1; then
-# kill -9 $TIMEOUT > /dev/null 2>&1
-# fi
-
-# Test terminated unexpectedly?
-if test $result != 0 -a $result != 1; then
- echo "FAIL: $testclass abnormal termination $result CRASH or TIMEOUT"
-fi
Index: uses-list
===================================================================
RCS file: uses-list
diff -N uses-list
--- uses-list 9 Jul 2005 19:31:07 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,97 +0,0 @@
-#!/bin/sh
-
-# Copyright (c) 2002 Free Software Foundation, Inc.
-# Written by Mark Wielaard <mark@klomp.org>
-# Based on the choose script written by Tom Tromey <tromey@cygnus.com>
-
-# This file is part of Mauve.
-
-# Mauve is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# Mauve is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with Mauve; see the file COPYING. If not, write to
-# the Free Software Foundation, 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-# Given a (list of) test classes or java files generates a list of all java
-# files used for that test in the file 'uses_files'.
-
-usage="uses-list [-verbose] output-directory classes_or_files"
-
-if test "$1" = "-verbose"; then
- verbose=yes
- shift
-else
- verbose=
-fi
-
-outdir="$1"
-shift
-test -z "$outdir" && echo "$usage" && exit -1
-
-usesfile=/tmp/uses-file-$$
-uses=/tmp/uses-$$
-
-class="$1"
-shift
-test -z "$class" && echo "$usage" && exit -1
-
-while test ! -z "$class"; do
- test -n "$verbose" && echo "Processing $class"
-
- # Strip trailing .java or .class if given and replace . with /
- file="`echo $class | sed -e 's/\.java$//' | sed -e 's/\.class$//' | tr . /`"
- file="$file.java"
- dir="`dirname $file`"
- test ! -f "$file" && echo "file $file does not exist" && exit -1
-
- useslist=" `grep '^// Uses:' $file | sed -e 's,^// Uses:,,'` "
-
- filelist=$file
- echo "$file" >> "$usesfile"
- for used in $useslist; do
- usedfile=$dir/$used.java
- if test ! -f "$usedfile"; then
- echo "file $used file used by $file does not exist"
- exit -1
- fi
- echo "$usedfile" >> "$usesfile"
- filelist="$filelist $usedfile"
- done
- test -n "$verbose" && echo " ... uses: $filelist"
-
- if test $# -gt 0; then
- class="$1"
- shift
- else
- class=""
- fi
-done
-
-# Now uniquify the list of auxiliary files we used.
-# I think neither `uniq' nor `sort -u' is portable, so we do it by hand.
-previous=
-sort "$usesfile" |
-while read next; do
- if test "$previous" != "$next"; then
- echo "$next" >> $uses
- previous=$next
- fi
-done
-
-if test -f $outdir/uses_files \
- && cmp $uses $outdir/uses_files > /dev/null 2>&1; then
- # Files are the same.
- rm $uses
-else
- mv $uses $outdir/uses_files
-fi
-rm $usesfile