diff libinterp/octave-value/ov-java.cc @ 24853:1e207bd05b5d

avoid AWT test on OS X (bug #53305) * ov-java.cc: Don't attempt to use AWT in test on OS X systems.
author John W. Eaton <jwe@octave.org>
date Fri, 09 Mar 2018 09:22:18 -0500
parents 037ace76257d
children d5d61f1b6de0
line wrap: on
line diff
--- a/libinterp/octave-value/ov-java.cc	Thu Mar 08 16:09:10 2018 -0800
+++ b/libinterp/octave-value/ov-java.cc	Fri Mar 09 09:22:18 2018 -0500
@@ -3432,7 +3432,10 @@
 %! assert (a(1).s.startsWith ("Oct"))
 
 ## Check for basic usability of the java awt library
-%!testif HAVE_JAVA; usejava ("jvm") && usejava ("awt") && have_window_system ()
+## Skip the test on OS X where we currently have Java 9 and attempting
+## to use awt causes Octave to exit with a message about Java not being
+## installed (it is) instead of returning false.
+%!testif HAVE_JAVA; ! ismac () && usejava ("jvm") && usejava ("awt") && have_window_system ()
 %! frame = javaObject ("java.awt.Frame");
 %! frame.setResizable (true);
 %! assert (frame.isResizable ());