Makefile 756 Bytes
Newer Older
1
2
3
4
5
OCTAVE=octave-cli
MATLAB=`which matlab`

all: check-octave check-matlab

Stéphane Adjemian's avatar
Stéphane Adjemian committed
6
7
8
9
m-unit-tests/src/mtest.m:
	git clone https://git.dynare.org/Dynare/m-unit-tests

check-octave: m-unit-tests/src/mtest.m
10
11
	@cd tests ;\
	$(OCTAVE) --no-init-file --silent --no-history --eval "addpath([pwd() '/../m-unit-tests/src']); runalltests" && [ ! -f ./failed ] && [ -f ./pass ]
12

Stéphane Adjemian's avatar
Stéphane Adjemian committed
13
check-matlab: m-unit-tests/src/mtest.m
14
	@$(MATLAB)  -nosplash -nodisplay -r "addpath m-unit-tests/src; cd tests; runalltests; quit" && [ ! -f ./tests/failed ] && [ -f ./tests/pass ]
Stéphane Adjemian's avatar
Stéphane Adjemian committed
15
16

check-clean:
17
	rm -f tests/*_test_*.m tests/*.csv tests/*.xls tests/*.xlsx tests/*.mat tests/failed tests/datafile_for_test
Stéphane Adjemian's avatar
Stéphane Adjemian committed
18
19
	rm -f git.info git.last-commit-hash tests/pass tests/failed tests/*.spc
	rm -rf m-unit-tests