changeset 26581:ada14ef3067f stable

Run tests with graphics toolkit fltk only if it is available (bug #54169). * graphics.cc, uimenu.m, allchild.m, findall.m, graphics_toolkit.m: Check if "fltk" is among the available graphics toolkits for the specific tests.
author Markus Mützel <markus.muetzel@gmx.de>
date Sat, 19 Jan 2019 18:22:48 +0100
parents ab06235daf33
children d673b506f382
files libinterp/corefcn/graphics.cc scripts/gui/uimenu.m scripts/plot/util/allchild.m scripts/plot/util/findall.m scripts/plot/util/graphics_toolkit.m
diffstat 5 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc	Sun Jun 24 20:34:11 2018 +0200
+++ b/libinterp/corefcn/graphics.cc	Sat Jan 19 18:22:48 2019 +0100
@@ -5082,7 +5082,7 @@
 }
 
 /*
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! hf = figure ("visible", "off");
 %! graphics_toolkit (hf, "fltk");
 %! unwind_protect
@@ -5102,7 +5102,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! hf = figure ("visible", "off");
 %! graphics_toolkit (hf, "fltk");
 %! fpos = get (hf, "position");
@@ -5122,7 +5122,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! hf = figure ("visible", "off");
 %! graphics_toolkit (hf, "fltk");
 %! fpos = get (hf, "position");
@@ -11834,7 +11834,7 @@
 %! setappdata (gcbf (), "cb_exec", [getappdata(gcbf (), "cb_exec") h]);
 %!endfunction
 %!
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! hf = figure ("visible", "off", "resizefcn", @cb);
 %! unwind_protect
 %!   ## Default
--- a/scripts/gui/uimenu.m	Sun Jun 24 20:34:11 2018 +0200
+++ b/scripts/gui/uimenu.m	Sat Jan 19 18:22:48 2019 +0100
@@ -106,7 +106,7 @@
 %! uimenu (f, 'label', 'Close', 'accelerator', 'q', 'callback', 'close (gcf)');
 %! uimenu (e, 'label', 'Toggle &Grid', 'accelerator', 'g', 'callback', 'grid (gca)');
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
@@ -123,7 +123,7 @@
 %! end_unwind_protect
 
 ## check for top level menus file and edit
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
@@ -136,7 +136,7 @@
 %!   graphics_toolkit (toolkit);
 %! end_unwind_protect
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/util/allchild.m	Sun Jun 24 20:34:11 2018 +0200
+++ b/scripts/plot/util/allchild.m	Sat Jan 19 18:22:48 2019 +0100
@@ -48,7 +48,7 @@
 endfunction
 
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/util/findall.m	Sun Jun 24 20:34:11 2018 +0200
+++ b/scripts/plot/util/findall.m	Sat Jan 19 18:22:48 2019 +0100
@@ -50,7 +50,7 @@
 endfunction
 
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! toolkit = graphics_toolkit ("fltk");
 %! hf = figure ("visible", "off");
 %! unwind_protect
--- a/scripts/plot/util/graphics_toolkit.m	Sun Jun 24 20:34:11 2018 +0200
+++ b/scripts/plot/util/graphics_toolkit.m	Sat Jan 19 18:22:48 2019 +0100
@@ -103,7 +103,7 @@
 endfunction
 
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system ()
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! unwind_protect
 %!   hf = figure ("visible", "off");
 %!   toolkit = graphics_toolkit ();
@@ -114,7 +114,7 @@
 %!   close (hf);
 %! end_unwind_protect
 
-%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("gnuplot", available_graphics_toolkits ()))
+%!testif HAVE_OPENGL, HAVE_FLTK; have_window_system () && any (strcmp ("gnuplot", available_graphics_toolkits ())) && any (strcmp ("fltk", available_graphics_toolkits ()))
 %! old_toolkit = graphics_toolkit ();
 %! switch (old_toolkit)
 %!   case {"gnuplot"}