changeset 22270:2c7acd39e9b7

Conditionally disable tests that rely on optional features * chol.cc: Use %!testif HAVE_CHOLMOD for tests that rely on CHOLMOD. * unpack.m: Use %!testif HAVE_ZLIB for test that relies on zlib.
author Mike Miller <mtmiller@octave.org>
date Thu, 11 Aug 2016 09:56:12 -0700
parents a76b931d2c4b
children 16efd0403698
files libinterp/dldfcn/chol.cc scripts/miscellaneous/unpack.m
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/dldfcn/chol.cc	Thu Aug 11 10:38:19 2016 -0700
+++ b/libinterp/dldfcn/chol.cc	Thu Aug 11 09:56:12 2016 -0700
@@ -331,7 +331,7 @@
 
 ## Check the "vector" option which only affects the 3rd argument and
 ## is only valid for sparse input.
-%!test
+%!testif HAVE_CHOLMOD
 %! a = sparse ([2 1; 1 1]);
 %! r = sparse ([sqrt(2), 1/sqrt(2); 0, 1/sqrt(2)]);
 %! [rd, pd, qd] = chol (a);
@@ -580,20 +580,20 @@
 %!  assert (chol2inv (chol ( full (T))), ciT, tol*2);
 %!endfunction
 
-%!test
+%!testif HAVE_CHOLMOD
 %! A = gallery ("poisson", 3);
 %! sparse_chol2inv (A, eps);
 
-%!test
+%!testif HAVE_CHOLMOD
 %! n = 10;
 %! B = spdiags (ones (n, 1) * [1 2 1], [-1 0 1], n, n);
 %! sparse_chol2inv (B, eps*100);
 
-%!test
+%!testif HAVE_CHOLMOD
 %! C = gallery("tridiag", 5);
 %! sparse_chol2inv (C, eps*10);
 
-%!test
+%!testif HAVE_CHOLMOD
 %! D = gallery("wathen", 1, 1);
 %! sparse_chol2inv (D, eps*10^4);
 
--- a/scripts/miscellaneous/unpack.m	Thu Aug 11 10:38:19 2016 -0700
+++ b/scripts/miscellaneous/unpack.m	Thu Aug 11 09:56:12 2016 -0700
@@ -304,7 +304,7 @@
 endfunction
 
 
-%!test
+%!testif HAVE_ZLIB
 %! ## Create temporary directory and file for packing and unpacking
 %! dirname = tempname ();
 %! assert (mkdir (dirname));