Makefile 779 Bytes
Newer Older
1 2
OCTAVE ?= octave-cli
MATLAB ?= $(shell which matlab)
3 4 5

all: check-octave check-matlab

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

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

check-clean:
17
	rm -f tests/*_test_*.m tests/*.csv tests/*.xls tests/*.xlsx tests/*.mat tests/failed tests/datafile_for_test
18 19
	rm -f git.info git.last-commit-hash tests/pass tests/failed tests/*.spc
	rm -rf m-unit-tests