changeset 29036:b71672c8d337 stable

Let "test" execute BISTs that were extracted on pkg install (bug #41298). * testfun/test.m: Search for BISTs (of .oct files) also in .cc-tst files.
author Oliver Heimlich <oheim@posteo.de>
date Fri, 27 Dec 2019 22:56:24 +0100
parents e3bc897115ed
children 495af8064428 9aec2c6ad40c
files scripts/testfun/test.m
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/test.m	Thu Nov 05 16:50:03 2020 -0800
+++ b/scripts/testfun/test.m	Fri Dec 27 22:56:24 2019 +0100
@@ -212,14 +212,15 @@
     error ("test: unknown flag '%s'", __flag);
   endif
 
-  ## Locate the file to test.
+  ## Locate the file with tests.
   __file = file_in_loadpath (__name, "all");
-  if (isempty (__file))
-    __file = file_in_loadpath ([__name ".m"], "all");
-  endif
-  if (isempty (__file))
-    __file = file_in_loadpath ([__name ".cc"], "all");
-  endif
+  for suffix = {".m", ".cc", ".cc-tst", ".c-tst", ".C-tst", ".cpp-tst", ...
+                ".cxx-tst"}
+    if (! isempty (__file))
+      break;
+    endif
+    __file = file_in_loadpath ([__name, suffix{1}], "all");
+  endfor
   if (iscell (__file))
     if (isempty (__file))
       __file = "";