Added a script to run all the unit tests.

Install m-unit-tests module from Github/master if needed.
parent 63659a15
opath = path();
% Check that the m-unit-tests module is available.
install_unit_test_toolbox = false;
try
initialize_unit_tests_toolbox;
catch
urlwrite('https://github.com/DynareTeam/m-unit-tests/archive/master.zip','master.zip');
warning('off','MATLAB:MKDIR:DirectoryExists')
mkdir('../externals')
warning('on','MATLAB:MKDIR:DirectoryExists')
unzip('master.zip','../externals')
delete('master.zip')
addpath([pwd() '/../externals/m-unit-tests-master/src'])
initialize_unit_tests_toolbox;
install_unit_test_toolbox = true;
end
% Initialize the dseries module
try
initialize_dates_toolbox;
catch
unit_tests_root = strrep(which('runalltests'),'runalltests.m','');
addpath([unit_tests_root '../src']);
initialize_dates_toolbox;
end
tmp = dates_src_root;
tmp = tmp(1:end-1); % Remove trailing slash.
run_unitary_tests_in_directory(tmp);
delete('*.log');
if install_unit_test_toolbox
rmdir('../externals/m-unit-tests-master','s');
end
path(opath);
\ No newline at end of file
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