Commit 9a0a87ca authored by Houtan Bastani's avatar Houtan Bastani
Browse files

save make-check summary to text file

parent 41a8ff55
......@@ -190,3 +190,5 @@ clean-local:
rm -rf partial_information/PItest3aHc0PCLsimModPiYrVarobsAll_PCL* partial_information/PItest3aHc0PCLsimModPiYrVarobsCNR_PCL*
rm -rf block_bytecode/ws block_bytecode/ls2003_tmp*
rm -f run_test_matlab_output.txt run_test_octave_output.txt
\ No newline at end of file
......@@ -131,21 +131,36 @@ delete('makeCheckMatlabBase.mat');
total_tests = size(name,2)+num_block_tests;
% print output to screen and to file
fid = fopen('run_test_matlab_output.txt', 'w');
fprintf('\n\n\n');
fprintf(fid,'\n\n\n');
disp('***************************************');
fprintf(fid,'***************************************\n');
disp('* DYNARE TEST RESULTS *');
fprintf(fid,'* DYNARE TEST RESULTS *\n');
disp('* for make check-matlab *');
fprintf(fid,'* for make check-matlab *\n');
disp('***************************************');
fprintf(fid,'***************************************\n');
disp([' ' num2str(total_tests-size(failedBase,2)-size(failedBlock,2)) ' tests PASSED out of ' num2str(total_tests) ' tests run']);
fprintf(fid,' %d tests PASSED out of %d tests run\n', total_tests-size(failedBase,2)-size(failedBlock,2), total_tests);
disp('***************************************');
fprintf(fid,'***************************************\n');
if size(failedBase,2) > 0 || size(failedBlock,2) > 0
disp(['List of ' num2str(size(failedBase,2)+size(failedBlock,2)) ' tests FAILED:']);
fprintf(fid,'List of %d tests FAILED:\n', size(failedBase,2)+size(failedBlock,2));
for i=1:size(failedBase,2)
disp([' * ' failedBase{i}]);
fprintf(fid,' * %s\n', failedBase{i});
end
for i=1:size(failedBlock,2)
disp([' * ' failedBlock{i}]);
fprintf(fid,' * %s\n', failedBlock{i});
end
fprintf('***************************************\n\n');
fprintf(fid,'***************************************\n\n');
end
fclose(fid);
exit;
......@@ -146,25 +146,40 @@ delete('makeCheckOctaveBase.mat');
total_tests = size(name,2)+num_block_tests;
% print output to screen and to file
fid = fopen("run_test_octave_output.txt", "w");
printf("\n\n\n");
fprintf(fid,'\n\n\n');
printf("***************************************\n");
fprintf(fid,"***************************************\n");
printf("* DYNARE TEST RESULTS *\n");
fprintf(fid,"* DYNARE TEST RESULTS *\n");
printf("* for make check-octave *\n");
fprintf(fid,"* for make check-octave *\n");
printf("***************************************\n");
fprintf(fid,"***************************************\n");
printf(" %d tests PASSED out of %d tests run\n", total_tests-size(failedBase,2)-size(failedBlock,2), total_tests);
fprintf(fid," %d tests PASSED out of %d tests run\n", total_tests-size(failedBase,2)-size(failedBlock,2), total_tests);
printf("***************************************\n");
fprintf(fid,"***************************************\n");
if size(failedBase,2) > 0 || size(failedBlock,2) > 0
printf("List of %d tests FAILED:\n", size(failedBase,2)+size(failedBlock,2));
fprintf(fid,"List of %d tests FAILED:\n", size(failedBase,2)+size(failedBlock,2));
for i=1:size(failedBase,2)
printf(" * %s\n",failedBase{i});
fprintf(fid," * %s\n", failedBase{i});
end
for i=1:size(failedBlock,2)
printf(" * %s\n",failedBlock{i});
fprintf(fid," * %s\n", failedBlock{i});
end
printf("***************************************\n\n");
fprintf(fid,"***************************************\n\n");
clear -all
error("make check-octave FAILED");
end
fclose(fid);
clear -all
## Local variables:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment