Added configuration file for travis-ci.

Also adapted runalltests script (saves an empty file called failed iff
one of the unit tests fails).
parent 85e6de8b
language: python
install:
- export
- sudo add-apt-repository ppa:octave/stable -y
- sudo apt-get update -qq
- sudo apt-get install -qq octave liboctave-dev
script:
- make check-octave
- ./success.sh
#!/bin/sh
if [ -f ./tests/failed ]
then
exit 1
fi
opath = path();
% Check that the m-unit-tests module is available.
system('rm -f failed');
% 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'])
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
......@@ -28,16 +29,20 @@ catch
end
if isoctave
more off
more off;
end
tmp = dates_src_root;
tmp = tmp(1:end-1); % Remove trailing slash.
run_unitary_tests_in_directory(tmp);
report = 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
path(opath);
if any(~[report{:,3}])
system('touch failed');
end
\ 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