# HG changeset patch
# User Pantxo Diribarne <pantxo.diribarne@gmail.com>
# Date 1576514855 -3600
#      Mon Dec 16 17:47:35 2019 +0100
# Node ID 85d9a597845c8eedaf1bd8bc4150ce4986213dfc
# Parent  e79999c5d7828c22b59eae07bc4db41086a6d059
Don't test support presence of OSMESA which will always fail (bug #57424)

* geometryimages.m, interpimages.m, plotimages.m, sparseimages.m,
  splineimages.m: Don't expect OSMESA to be present.

* publish.tst: Ditto. Only fallback to gnuplot on Windows if Qt offscreen
  support is not detected and "qt" is not the chosen graphics_toolkit.

diff -r e79999c5d782 -r 85d9a597845c doc/interpreter/geometryimages.m
--- a/doc/interpreter/geometryimages.m	Mon Dec 16 01:47:18 2019 -0500
+++ b/doc/interpreter/geometryimages.m	Mon Dec 16 17:47:35 2019 +0100
@@ -146,8 +146,7 @@
   elseif (strcmp ("qt", graphics_toolkit ())
           && __have_feature__ ("QT_OFFSCREEN"))
     ## Use qt with QOffscreenSurface for plot
-  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
-          && ! __have_feature__ ("OSMESA"))
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()))
     if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
       error ("no graphics toolkit available for offscreen plotting");
     else
diff -r e79999c5d782 -r 85d9a597845c doc/interpreter/interpimages.m
--- a/doc/interpreter/interpimages.m	Mon Dec 16 01:47:18 2019 -0500
+++ b/doc/interpreter/interpimages.m	Mon Dec 16 17:47:35 2019 +0100
@@ -88,8 +88,7 @@
   elseif (strcmp ("qt", graphics_toolkit ())
           && __have_feature__ ("QT_OFFSCREEN"))
     ## Use qt with QOffscreenSurface for plot
-  elseif (! strcmp ("gnuplot", graphics_toolkit ())
-          && ! __have_feature__ ("OSMESA"))
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()))
     if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
       error ("no graphics toolkit available for offscreen plotting");
     else
diff -r e79999c5d782 -r 85d9a597845c doc/interpreter/plotimages.m
--- a/doc/interpreter/plotimages.m	Mon Dec 16 01:47:18 2019 -0500
+++ b/doc/interpreter/plotimages.m	Mon Dec 16 17:47:35 2019 +0100
@@ -126,8 +126,7 @@
   elseif (strcmp ("qt", graphics_toolkit ())
           && __have_feature__ ("QT_OFFSCREEN"))
     ## Use qt with QOffscreenSurface for plot
-  elseif (! strcmp ("gnuplot", graphics_toolkit ()) ...
-          && ! __have_feature__ ("OSMESA"))
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()))
     if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
       error ("no graphics toolkit available for offscreen plotting");
     else
diff -r e79999c5d782 -r 85d9a597845c doc/interpreter/sparseimages.m
--- a/doc/interpreter/sparseimages.m	Mon Dec 16 01:47:18 2019 -0500
+++ b/doc/interpreter/sparseimages.m	Mon Dec 16 17:47:35 2019 +0100
@@ -247,8 +247,7 @@
   elseif (strcmp ("qt", graphics_toolkit ())
           && __have_feature__ ("QT_OFFSCREEN"))
     ## Use qt with QOffscreenSurface for plot
-  elseif (! strcmp ("gnuplot", graphics_toolkit ())
-          && ! __have_feature__ ("OSMESA"))
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()))
     if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
       error ("no graphics toolkit available for offscreen plotting");
     else
diff -r e79999c5d782 -r 85d9a597845c doc/interpreter/splineimages.m
--- a/doc/interpreter/splineimages.m	Mon Dec 16 01:47:18 2019 -0500
+++ b/doc/interpreter/splineimages.m	Mon Dec 16 17:47:35 2019 +0100
@@ -178,8 +178,7 @@
   elseif (strcmp ("qt", graphics_toolkit ())
           && __have_feature__ ("QT_OFFSCREEN"))
     ## Use qt with QOffscreenSurface for plot
-  elseif (! strcmp ("gnuplot", graphics_toolkit ())
-          && ! __have_feature__ ("OSMESA"))
+  elseif (! strcmp ("gnuplot", graphics_toolkit ()))
     if (! any (strcmp ("gnuplot", available_graphics_toolkits ())))
       error ("no graphics toolkit available for offscreen plotting");
     else
diff -r e79999c5d782 -r 85d9a597845c test/publish/publish.tst
--- a/test/publish/publish.tst	Mon Dec 16 01:47:18 2019 -0500
+++ b/test/publish/publish.tst	Mon Dec 16 17:47:35 2019 +0100
@@ -22,11 +22,12 @@
 %! visibility = get (0, "defaultfigurevisible");
 %! toolkit = graphics_toolkit ();
 %! unwind_protect
-%!   if (ispc () || ! __have_feature__ ("OSMESA"))
+%!   if (! __have_feature__ ("QT_OFFSCREEN")
+%!       || ! strcmp (graphics_toolkit (), "qt"))
 %!     try
 %!       graphics_toolkit ("gnuplot");
 %!     catch
-%!       ## The system doesn't support OSMESA or gnuplot for drawing hidden
+%!       ## The system doesn't support gnuplot for drawing hidden
 %!       ## figures.  Just return and have test marked as passing.
 %!       return;
 %!     end_try_catch
@@ -53,11 +54,12 @@
 %! visibility = get (0, "defaultfigurevisible");
 %! toolkit = graphics_toolkit ();
 %! unwind_protect
-%!   if (ispc () || ! __have_feature__ ("OSMESA"))
+%!   if (! __have_feature__ ("QT_OFFSCREEN")
+%!       || ! strcmp (graphics_toolkit (), "qt"))
 %!     try
 %!       graphics_toolkit ("gnuplot");
 %!     catch
-%!       ## The system doesn't support OSMESA or gnuplot for drawing hidden
+%!       ## The system doesn't support gnuplot for drawing hidden
 %!       ## figures.  Just return and have test marked as passing.
 %!       return;
 %!     end_try_catch
