octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #49767] publish.tst failure when OSMesa exclud


From: Dan Sebald
Subject: [Octave-bug-tracker] [bug #49767] publish.tst failure when OSMesa excluded from build
Date: Tue, 6 Dec 2016 00:54:49 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0

Follow-up Comment #10, bug #49767 (project octave):

Oh, I think the small change in the patch is the best alternative for now.  I
tried a few things, but they all had drawbacks.

There is also this

octave:15> __have_feature__ ("ENABLE_DOCS")
ans = 1

Also, there can be multiple requirements in a

%!testif

but unfortunately there is no negation logic for that.  One could build a file
with the desired test scripts and then call

test('onthefly')

but once one starts doing that the skips and printout start to make no sense.

Anyway, I'm going to copy here a diff file for what I think would work if only
I knew how to define HAVE_GNUPLOT_AT_BUILD.  I see configure.ac, and the
>>confdefs.h in configure, but I'm not making the connection and it isn't
worth the effort:


diff --git a/test/publish/publish.tst b/test/publish/publish.tst
--- a/test/publish/publish.tst
+++ b/test/publish/publish.tst
@@ -18,14 +18,53 @@
 
 ## publish
 
-%!test
+%!testif HAVE_OSMESA
+%! tk = graphics_toolkit ();
 %! visibility = get (0, "defaultfigurevisible");
 %! toolkit = graphics_toolkit ();
 %! unwind_protect
 %!   set (0, "defaultfigurevisible", "off");
-%!   if (ispc ())
-%!     graphics_toolkit ("gnuplot");
-%!   endif
+%!   graphics_toolkit (tk);
+%!   cases = dir ("test_script*.m");
+%!   cases = strsplit (strrep ([cases.name], ".m", ".m\n"));
+%!   for i = 1:length(cases)-1
+%!     publish (cases{i});
+%!   endfor
+%!   confirm_recursive_rmdir (false, "local");
+%!   rmdir ("html", "s");
+%! unwind_protect_cleanup
+%!   set (0, "defaultfigurevisible", visibility);
+%! end_unwind_protect
+
+## grabcode
+
+%!testif HAVE_OSMESA
+%! tk = graphics_toolkit ();
+%! visibility = get (0, "defaultfigurevisible");
+%! toolkit = graphics_toolkit ();
+%! unwind_protect
+%!   set (0, "defaultfigurevisible", "off");
+%!   graphics_toolkit (tk);
+%!   publish ("test_script.m");
+%!   str1 = fileread ("test_script.m");
+%!   str2 = grabcode ("html/test_script.html");
+%!   confirm_recursive_rmdir (false, "local");
+%!   rmdir ("html", "s");
+%!   # Canonicalize strings
+%!   str1 = strjoin (deblank (strsplit (str1, "\n")), "\n");
+%!   str2 = strjoin (deblank (strsplit (str2, "\n")), "\n");
+%!   assert (hash ("md5", str1), hash ("md5", str2));
+%! unwind_protect_cleanup
+%!   set (0, "defaultfigurevisible", visibility);
+%! end_unwind_protect
+
+%!testif HAVE_GNUPLOT_AT_BUILD
+%! tk = "gnuplot";
+%! visibility = get (0, "defaultfigurevisible");
+%! toolkit = graphics_toolkit ();
+%! unwind_protect
+%!   set (0, "defaultfigurevisible", "off");
+%!   graphics_toolkit (tk);
 %!   cases = dir ("test_script*.m");
 %!   cases = strsplit (strrep ([cases.name], ".m", ".m\n"));
 %!   for i = 1:length(cases)-1
@@ -40,14 +79,13 @@
 
 ## grabcode
 
-%!test
+%!testif HAVE_GNUPLOT_AT_BUILD
+%! tk = "gnuplot";
 %! visibility = get (0, "defaultfigurevisible");
 %! toolkit = graphics_toolkit ();
 %! unwind_protect
 %!   set (0, "defaultfigurevisible", "off");
-%!   if (ispc ())
-%!     graphics_toolkit ("gnuplot");
-%!   endif
+%!   graphics_toolkit (tk);
 %!   publish ("test_script.m");
 %!   str1 = fileread ("test_script.m");
 %!   str2 = grabcode ("html/test_script.html");


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49767>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]