Mercurial > octave
comparison scripts/testfun/__run_test_suite__.m @ 28056:5f57a71d67db
tests: restore warning "quiet" state after running test suite (bug #57786)
* __run_test_suite__.m: Save warning "quiet" state before enabling it,
restore in unwind_protect_cleanup block.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 10 Feb 2020 18:48:24 -0800 |
parents | 6804f2feea46 |
children | 818bd5b42651 |
comparison
equal
deleted
inserted
replaced
28055:713dc97d887f | 28056:5f57a71d67db |
---|---|
50 if (isempty (topbuilddir)) | 50 if (isempty (topbuilddir)) |
51 topbuilddir = testsdir; | 51 topbuilddir = testsdir; |
52 endif | 52 endif |
53 | 53 |
54 pso = page_screen_output (); | 54 pso = page_screen_output (); |
55 orig_wquiet = warning ("query", "quiet"); | |
55 orig_wstate = warning (); | 56 orig_wstate = warning (); |
56 logfile = make_absolute_filename ("fntests.log"); | 57 logfile = make_absolute_filename ("fntests.log"); |
57 unwind_protect | 58 unwind_protect |
58 page_screen_output (false); | 59 page_screen_output (false); |
59 warning ("on", "quiet"); | 60 warning ("on", "quiet"); |
142 disp (lasterr ()); | 143 disp (lasterr ()); |
143 end_try_catch | 144 end_try_catch |
144 unwind_protect_cleanup | 145 unwind_protect_cleanup |
145 warning ("off", "all"); | 146 warning ("off", "all"); |
146 warning (orig_wstate); | 147 warning (orig_wstate); |
148 warning (orig_wquiet.state, "quiet"); | |
147 page_screen_output (pso); | 149 page_screen_output (pso); |
148 end_unwind_protect | 150 end_unwind_protect |
149 | 151 |
150 if (nargout > 0) | 152 if (nargout > 0) |
151 pass = dp; | 153 pass = dp; |