8015588: [TEST_BUG] [macosx] Test java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java fails on MacOSX
Reviewed-by: anthony, serb
diff --git a/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java b/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java
index 559d7de..9505c12 100644
--- a/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java
+++ b/test/java/awt/MenuBar/MenuBarSetFont/MenuBarSetFont.java
@@ -65,6 +65,12 @@
     }
 
     public static void main(final String[] args) throws Exception {
+
+        if (sun.awt.OSInfo.getOSType() == sun.awt.OSInfo.OSType.MACOSX) {
+            System.err.println("This test is not for OS X. Menu.setFont() is not supported on OS X.");
+            return;
+        }
+
         //Components initialization.
         frame.setMenuBar(mb);
         mb.setFont(new Font("Helvetica", Font.ITALIC, 5));