Running jtreg
jtreg is the test harness used by the OpenJDK test framework. The script linux/jtreg
is 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):
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
Example: running just the jdk java/lang tests (approximately 340 tests; completes in about 6 minutes):
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.
Apple JUnit harness conversion to jtreg
- 5% of tests converted
Tests Converted to macosx-port/jdk/test/
- java/awt/Button/BasicButton.java (com.apple.junit.java.awt.button)
- java/awt/Component/SetBackground/TwoInOne.java (com.apple.junit.java.awt.Component)
- java/awt/Container/AddOrder/AddOrder01.java (com.apple.junit.java.awt.Container)
- java/awt/Container/Validate/ValidateTest.java (com.apple.junit.java.awt.Container)
- java/awt/Container/ZOrder/ZOrder01.java (com.apple.junit.java.awt.Container)
- java/awt/Cursor/CursorDefaults.java (com.apple.junit.java.awt.cursor)
- java/awt/Dialog/NestedDialogs/Modal/NestedModalDialogTest.java
- java/awt/Dialog/NestedDialogs/Modeless/NestedModelessDialogTest.java
- java/awt/Frame/ExtendedState/ZoomedFrame.java (com.apple.junit.java.awt.Frame)
- java/awt/Frame/GetLocation/GetLocation.java (com.apple.junit.java.awt.Frame)
- java/awt/Frame/Insets/R2226724Insets.java (com.apple.junit.java.awt.Frame)
- java/awt/Frame/SetMinimumSize/MinSizeTest.java
- java/awt/GrapicsDevice/GrapicsDevicesTest.java (com.apple.junit.java.awt.Device.GrapicsDevicesTest)
- java/awt/regtesthelpers/VisibilityValidator.java (com.apple.junit.utils)
- java/awt/TextField/TextFields01.java (com.apple.junit.java.text.TextFields)
- java/awt/Window/ChildOfModal/ChildOfModal.java
- java/awt/Window/Repaint/Repainter.java (com.apple.junit.java.awt.Window)
- java/io/File/R2226785File_delete.java
- java/io/File/R2254176FileClosing.java
- java/io/File/R2256773File_getPath.java
- java/io/File/R2297115File_mkdir.java
- java/io/File/R2385593ListFileSlash.java
- java/io/File/R2391232FileSlashDot.java
- java/io/File/R2405276ListCurDir.java
- java/io/File/R2408635SpecialCharacters.java
- java/io/File/R2426905CrashOnEmptyFilename.java
- java/io/File/R4978208MultipleUmlautsTest.java
- java/lang/Double/R1388007FloatOverflow.java
- java/lang/Math/R1400112FloatPrecisionTest.java
- java/lang/Math/VampireNumbers.java
- java/net/Socket/GetLocalAddressTest.java (com.apple.junit.java.net)
- java/text/MessageFormat/R2200042Msgfmt.java (com.apple.junit.java.text.MessageFormat)
- java/util/Date/R1610789DateTests.java
- java/util/Date/R1651062DateMonthParse.java
- java/util/Date/R2452208DateEpochFormat.java
- java/vm/R3569904ThreadedAppendDoubleDivByZeroTest.java
- java/vm/XmxHeapSizeTest.java (com.apple.junit.java.vm)
jtreg known failures
- java/awt/Container/isRemoveNotifyNeeded/JInternalFrameTest.java (Issue: MACOSX_PORT-5)