comparison scripts/testfun/__run_test_suite__.m @ 20461:fe488ffe5f4b

* __run_test_suite__.m: Return number of passed, failed, and skipped tests.
author John W. Eaton <jwe@octave.org>
date Wed, 05 Aug 2015 15:21:21 -0400
parents 4197fc428c7d
children
comparison
equal deleted inserted replaced
20459:099bdf98f724 20461:fe488ffe5f4b
19 ## -*- texinfo -*- 19 ## -*- texinfo -*-
20 ## @deftypefn {Function File} {} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs}) 20 ## @deftypefn {Function File} {} __run_test_suite__ (@var{fcndirs}, @var{fixedtestdirs})
21 ## Undocumented internal function. 21 ## Undocumented internal function.
22 ## @end deftypefn 22 ## @end deftypefn
23 23
24 function __run_test_suite__ (fcndirs, fixedtestdirs) 24 function [pass, fail, xfail, skip] = __run_test_suite__ (fcndirs, fixedtestdirs)
25
25 testsdir = octave_config_info ("octtestsdir"); 26 testsdir = octave_config_info ("octtestsdir");
26 libinterptestdir = fullfile (testsdir, "libinterp"); 27 libinterptestdir = fullfile (testsdir, "libinterp");
27 liboctavetestdir = fullfile (testsdir, "liboctave"); 28 liboctavetestdir = fullfile (testsdir, "liboctave");
28 fixedtestdir = fullfile (testsdir, "fixed"); 29 fixedtestdir = fullfile (testsdir, "fixed");
29 fcnfiledir = octave_config_info ("fcnfiledir"); 30 fcnfiledir = octave_config_info ("fcnfiledir");
115 unwind_protect_cleanup 116 unwind_protect_cleanup
116 warning ("off", "all"); 117 warning ("off", "all");
117 warning (orig_wstate); 118 warning (orig_wstate);
118 page_screen_output (pso); 119 page_screen_output (pso);
119 end_unwind_protect 120 end_unwind_protect
121
122 if (nargout > 0)
123 pass = np;
124 fail = nfail;
125 xfail = dxf;
126 skip = xsk;
127 endif
128
120 endfunction 129 endfunction
121 130
122 function print_test_file_name (nm) 131 function print_test_file_name (nm)
123 filler = repmat (".", 1, 60-length (nm)); 132 filler = repmat (".", 1, 60-length (nm));
124 printf (" %s %s", nm, filler); 133 printf (" %s %s", nm, filler);