# HG changeset patch # User Mike Miller # Date 1458597672 25200 # Node ID e1c5aca1c7981b3664a8ae6d91ac445b2b4b6631 # Parent ddfd7e5f8d18394bce0a0a276ae7ab5f29d7cb5c Fix failing tests when building with --without-opengl * graphics.cc, __osmesa_print__.cc, uimenu.m, allchild.m, findall.m, graphics_toolkit.m: Fix failing BIST tests when building with --without-opengl by adding HAVE_OPENGL to the test preconditions. diff -r ddfd7e5f8d18 -r e1c5aca1c798 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Sun Mar 20 21:39:49 2016 +0000 +++ b/libinterp/corefcn/graphics.cc Mon Mar 21 15:01:12 2016 -0700 @@ -4587,7 +4587,7 @@ } /* -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! hf = figure ("visible", "off"); %! graphics_toolkit (hf, "fltk"); %! unwind_protect @@ -4606,7 +4606,7 @@ %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! hf = figure ("visible", "off"); %! graphics_toolkit (hf, "fltk"); %! fpos = get (hf, "position"); @@ -4625,7 +4625,7 @@ %! unwind_protect_cleanup %! close (hf); %! end_unwind_protect -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! hf = figure ("visible", "off"); %! graphics_toolkit (hf, "fltk"); %! fpos = get (hf, "position"); diff -r ddfd7e5f8d18 -r e1c5aca1c798 libinterp/dldfcn/__osmesa_print__.cc --- a/libinterp/dldfcn/__osmesa_print__.cc Sun Mar 20 21:39:49 2016 +0000 +++ b/libinterp/dldfcn/__osmesa_print__.cc Mon Mar 21 15:01:12 2016 -0700 @@ -206,7 +206,7 @@ ## This is not critical, since this facility will mostly be used in ## the future for generating the images in Octave's own documentation. ## For the moment, disable these tests on PC's and Macs. -%!testif HAVE_OSMESA, HAVE_GL2PS_H +%!testif HAVE_OPENGL, HAVE_OSMESA, HAVE_GL2PS_H %! if (isunix ()) %! h = figure ("visible", "off"); %! fn = tempname (); @@ -221,7 +221,7 @@ %! assert (img_fp, [52942515; 54167797; 56158178], -0.05); %! endif -%!testif HAVE_OSMESA, HAVE_GL2PS_H +%!testif HAVE_OPENGL, HAVE_OSMESA, HAVE_GL2PS_H %! if (isunix ()) %! h = figure ("visible", "off"); %! fn = tempname (); diff -r ddfd7e5f8d18 -r e1c5aca1c798 scripts/gui/uimenu.m --- a/scripts/gui/uimenu.m Sun Mar 20 21:39:49 2016 +0000 +++ b/scripts/gui/uimenu.m Mon Mar 21 15:01:12 2016 -0700 @@ -103,7 +103,7 @@ %! uimenu (f, 'label', 'Close', 'accelerator', 'q', 'callback', 'close (gcf)'); %! uimenu (e, 'label', 'Toggle &Grid', 'accelerator', 'g', 'callback', 'grid (gca)'); -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! toolkit = graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect @@ -120,7 +120,7 @@ %! end_unwind_protect ## check for top level menus file and edit -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! toolkit = graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect @@ -133,7 +133,7 @@ %! graphics_toolkit (toolkit); %! end_unwind_protect -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! toolkit = graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect diff -r ddfd7e5f8d18 -r e1c5aca1c798 scripts/plot/util/allchild.m --- a/scripts/plot/util/allchild.m Sun Mar 20 21:39:49 2016 +0000 +++ b/scripts/plot/util/allchild.m Mon Mar 21 15:01:12 2016 -0700 @@ -48,7 +48,7 @@ endfunction -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! toolkit = graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect diff -r ddfd7e5f8d18 -r e1c5aca1c798 scripts/plot/util/findall.m --- a/scripts/plot/util/findall.m Sun Mar 20 21:39:49 2016 +0000 +++ b/scripts/plot/util/findall.m Mon Mar 21 15:01:12 2016 -0700 @@ -50,7 +50,7 @@ endfunction -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! toolkit = graphics_toolkit ("fltk"); %! hf = figure ("visible", "off"); %! unwind_protect diff -r ddfd7e5f8d18 -r e1c5aca1c798 scripts/plot/util/graphics_toolkit.m --- a/scripts/plot/util/graphics_toolkit.m Sun Mar 20 21:39:49 2016 +0000 +++ b/scripts/plot/util/graphics_toolkit.m Mon Mar 21 15:01:12 2016 -0700 @@ -105,7 +105,7 @@ endfunction -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! unwind_protect %! hf = figure ("visible", "off"); %! toolkit = graphics_toolkit (); @@ -116,7 +116,7 @@ %! close (hf); %! end_unwind_protect -%!testif HAVE_FLTK +%!testif HAVE_OPENGL, HAVE_FLTK %! old_toolkit = graphics_toolkit (); %! switch (old_toolkit) %! case {"gnuplot"}