run_test.m 785 Bytes
Newer Older
1
2
function run_test()
test_files = {
sebastien's avatar
sebastien committed
3
4
'.'  'ramst';
'.'  'ramst_a';
5
'.' 'example1';
sebastien's avatar
sebastien committed
6
7
8
9
10
11
12
13
14
15
16
17
18
'.' 'example2';
'.' 't_sgu_ex1';
'arima' 'mod1';
'arima' 'mod1a';
'arima' 'mod1b';
'arima' 'mod1c';
'arima' 'mod2';
'arima' 'mod2a';
'arima' 'mod2b';
'arima' 'mod2c';
'fs2000' 'fs2000';
'fs2000' 'fs2000a';
}
19
20
21
22
23
24
25
26
27
28
29
30

results = cell(length(test_files),1);

for i=1:length(test_files)
     results{i}= run_test1(test_files{i,1},test_files{i,2});
end

for i=1:length(test_files)
  disp(test_files{i,2})
  disp(results{i})
end
function msg=run_test1(path1,mod_file)
sebastien's avatar
sebastien committed
31
32
     global options_
     clear options_
33
34
35
36
37
38
39
     old_path = pwd;
     cd(path1);
     msg = 'OK';
     expr = ['disp(''error in ' mod_file ''');msg=lasterr;disp(msg)'];
     eval(['dynare ' mod_file ' noclearall'],'eval(expr)');
     cd(old_path)