[m-dev.] Running the tests in the Java grade using stage 2

Julien Fischer jfischer at opturion.com
Thu Nov 2 11:10:59 AEDT 2017


Hi all,

Currently, running the tests at the end of a bootcheck in the java grade falls
over.  The reason for this is that the tests are run from the stage 2
compiler's source tree, but the generated wrapper scripts set the CLASSPATH as
the though compiler had been installed (e.g. the wrapper script is telling the
JVM to look for the stdlib .jar files in INSTALL_PREFIX/lib etc.).

I propose that we add a new developer-only environment variable to the
compiler, MERCURY_STAGE2_WRAPPER_BASE (or something), whose value would be the
absolute path of the stage 2 directory.  When set, the Mercury compiler would
generate wrapper scripts that set the CLASSPATH to look for .jars in the stage2
directories rather than the installation directories.  The bootcheck script
would (obviously) set this environment variable before running the tests using
stage 2.

(I think it is probably easier to maintain the new setting using an environment
variable rather than a new compiler flag, because various test casese modify
the set of flags.)

Julien.


More information about the developers mailing list