| 1 |
function run_all_tests() |
| 2 |
|
| 3 |
% Copyright © 2018-2021 Dynare Team |
| 4 |
% |
| 5 |
% This file is part of Dynare. |
| 6 |
% |
| 7 |
% Dynare is free software: you can redistribute it and/or modify |
| 8 |
% it under the terms of the GNU General Public License as published by |
| 9 |
% the Free Software Foundation, either version 3 of the License, or |
| 10 |
% (at your option) any later version. |
| 11 |
% |
| 12 |
% Dynare is distributed in the hope that it will be useful, |
| 13 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
% GNU General Public License for more details. |
| 16 |
% |
| 17 |
% You should have received a copy of the GNU General Public License |
| 18 |
% along with Dynare. If not, see <https://www.gnu.org/licenses/>. |
| 19 |
|
| 20 |
r = []; |
| 21 |
|
| 22 |
r = [r; run_this_test('var-1')]; |
| 23 |
r = [r; run_this_test('var-2')]; |
| 24 |
r = [r; run_this_test('var-3')]; |
| 25 |
r = [r; run_this_test('var-4')]; |
| 26 |
r = [r; run_this_test('var-5')]; |
| 27 |
r = [r; run_this_test('var-6')]; |
| 28 |
r = [r; run_this_test('var-7')]; |
| 29 |
|
| 30 |
r = [r; run_this_test('trend-component-1')]; |
| 31 |
r = [r; run_this_test('trend-component-2')]; |
| 32 |
r = [r; run_this_test('trend-component-3')]; |
| 33 |
r = [r; run_this_test('trend-component-4')]; |
| 34 |
r = [r; run_this_test('trend-component-5')]; |
| 35 |
r = [r; run_this_test('trend-component-6')]; |
| 36 |
r = [r; run_this_test('trend-component-7')]; |
| 37 |
r = [r; run_this_test('trend-component-8-mc-iterative-ols')]; |
| 38 |
r = [r; run_this_test('trend-component-8-mc-nls')]; |
| 39 |
r = [r; run_this_test('trend-component-9')]; |
| 40 |
r = [r; run_this_test('trend-component-10')]; |
| 41 |
r = [r; run_this_test('trend-component-11')]; |
| 42 |
r = [r; run_this_test('trend-component-12')]; |
| 43 |
r = [r; run_this_test('trend-component-13a')]; |
| 44 |
r = [r; run_this_test('trend-component-13b')]; |
| 45 |
r = [r; run_this_test('trend-component-14')]; |
| 46 |
r = [r; run_this_test('trend-component-15')]; |
| 47 |
r = [r; run_this_test('trend-component-16')]; |
| 48 |
r = [r; run_this_test('trend-component-17')]; |
| 49 |
r = [r; run_this_test('trend-component-18')]; |
| 50 |
r = [r; run_this_test('trend-component-19')]; |
| 51 |
r = [r; run_this_test('trend-component-19-growth-lin-comb')]; |
| 52 |
r = [r; run_this_test('trend-component-20-1')]; |
| 53 |
r = [r; run_this_test('trend-component-20-2')]; |
| 54 |
r = [r; run_this_test('trend-component-20-3')]; |
| 55 |
r = [r; run_this_test('trend-component-20-4')]; |
| 56 |
r = [r; run_this_test('trend-component-21')]; |
| 57 |
r = [r; run_this_test('trend-component-22')]; |
| 58 |
r = [r; run_this_test('trend-component-23')]; |
| 59 |
r = [r; run_this_test('trend-component-24')]; |
| 60 |
r = [r; run_this_test('trend-component-25')]; |
| 61 |
r = [r; run_this_test('trend-component-26')]; |
| 62 |
r = [r; run_this_test('trend-component-27')]; |
| 63 |
r = [r; run_this_test('trend-component-28')]; |
| 64 |
r = [r; run_this_test('trend-component-29')]; |
| 65 |
r = [r; run_this_test('trend-component-30')]; |
| 66 |
r = [r; run_this_test('trend-component-31')]; |
| 67 |
|
| 68 |
print_results(r); |
| 69 |
|
| 70 |
function o = run_this_test(folder) |
| 71 |
try |
| 72 |
cd(folder) |
| 73 |
tstart = tic; |
| 74 |
clear M_ oo_ options_ |
| 75 |
dynare example |
| 76 |
elapsed = toc(tstart); |
| 77 |
o = {folder, true, elapsed}; |
| 78 |
system('./clean') |
| 79 |
cd .. |
| 80 |
catch |
| 81 |
o = {folder, false, NaN}; |
| 82 |
system('./clean') |
| 83 |
cd .. |
| 84 |
end |
| 85 |
|
| 86 |
function print_results(r) |
| 87 |
message = sprintf('Testsuite results (PAC model):\n'); |
| 88 |
for i = 1:size(r, 1) |
| 89 |
if r{i,2} |
| 90 |
message = sprintf('%s\n%s\t\t PASS (%ss)', message, r{i,1}, num2str(r{i,3})); |
| 91 |
else |
| 92 |
message = sprintf('%s\n%s\t\t FAILED', message, r{i,1}); |
| 93 |
end |
| 94 |
end |
| 95 |
disp(message) |