- Loading...
...
| Code Block |
|---|
export JAVA_HOME=`/usr/libexec/java_home --version 1.7` $JAVA_HOME/bin/java -version |
jtreg is the test harness used by the OpenJDK test framework. The script linux/jtreg is just a shell script that runs fine on Mac OS X. It will run all the tests under $SRC/jdk/.
By default jtreg will use the current jvm for running both the test harness and the tests themselves.
The examples below use the jtreg option -jdk to specify the JDK compiled in the macosx-port source directory.
Example: running all the jdk tests (takes a long time):
| Code Block |
|---|
cd $SRC<path-to-macosx-port-source>/jdk/ (path<path to jtreg>/linux/bin/jtreg -jdk:../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/ -v:summary test |
Example: running just the jdk java/lang tests (approximately 340 tests; completes in about 6 minutes):
| Code Block |
|---|
cd <path-to-macosx-port-source>/jdk/ <path to jtreg>/linux/bin/jtreg -jdk:../build/macosx-universal/j2sdk-bundle/1.7.0.jdk/Contents/Home/ -v:summary test/java/lang |
If you run jtreg by making a symbolic link to linux/jtreg in another directory already on your PATH you will need to export a JT_HOME environmental variable.
If your version of Xcode is older than 3.2.5, the 32-bit build won't run, but the 64-bit build will.