Skip to content
Snippets Groups Projects
Commit 757b9f39 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

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
No related branches found
No related tags found
No related merge requests found
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(); 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; install_unit_test_toolbox = false;
try try
initialize_unit_tests_toolbox; initialize_unit_tests_toolbox;
catch catch
urlwrite('https://github.com/DynareTeam/m-unit-tests/archive/master.zip','master.zip'); urlwrite('https://github.com/DynareTeam/m-unit-tests/archive/master.zip','master.zip');
warning('off','MATLAB:MKDIR:DirectoryExists') warning('off','MATLAB:MKDIR:DirectoryExists');
mkdir('../externals') mkdir('../externals');
warning('on','MATLAB:MKDIR:DirectoryExists') warning('on','MATLAB:MKDIR:DirectoryExists');
unzip('master.zip','../externals') unzip('master.zip','../externals');
delete('master.zip') delete('master.zip');
addpath([pwd() '/../externals/m-unit-tests-master/src']) addpath([pwd() '/../externals/m-unit-tests-master/src']);
initialize_unit_tests_toolbox; initialize_unit_tests_toolbox;
install_unit_test_toolbox = true; install_unit_test_toolbox = true;
end end
...@@ -28,12 +29,12 @@ catch ...@@ -28,12 +29,12 @@ catch
end end
if isoctave if isoctave
more off more off;
end end
tmp = dates_src_root; tmp = dates_src_root;
tmp = tmp(1:end-1); % Remove trailing slash. tmp = tmp(1:end-1); % Remove trailing slash.
run_unitary_tests_in_directory(tmp); report = run_unitary_tests_in_directory(tmp);
delete('*.log'); delete('*.log');
...@@ -41,3 +42,7 @@ if install_unit_test_toolbox ...@@ -41,3 +42,7 @@ if install_unit_test_toolbox
rmdir('../externals/m-unit-tests-master','s'); rmdir('../externals/m-unit-tests-master','s');
end end
path(opath); path(opath);
if any(~[report{:,3}])
system('touch failed');
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment