Skip to content
Snippets Groups Projects
Commit fd9c81f0 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

test suite: ensure test suite keeps on running even when Octave or Matlab crash. Closes #1069

parent a44fa17c
Branches
Tags
No related merge requests found
...@@ -616,7 +616,8 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES) ...@@ -616,7 +616,8 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES)
%.m.trs %.m.log: %.mod %.m.trs %.m.log: %.mod
@echo "`tput bold``tput setaf 8`MATLAB: $(PWD)/$*... `tput sgr0`" @echo "`tput bold``tput setaf 8`MATLAB: $(PWD)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \ @DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(MATLAB)/bin/matlab -nosplash -nodisplay -r run_test_matlab > $*.m.log 2> /dev/null $(MATLAB)/bin/matlab -nosplash -nodisplay -r run_test_matlab > $*.m.log 2> /dev/null || \
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:cputime: 0.0\n" > $*.m.trs
@if grep -q ":test-result: PASS" $*.m.trs; then \ @if grep -q ":test-result: PASS" $*.m.trs; then \
echo "`tput bold``tput setaf 2`MATLAB: $(PWD)/$* PASSED!`tput sgr0`" ; \ echo "`tput bold``tput setaf 2`MATLAB: $(PWD)/$* PASSED!`tput sgr0`" ; \
else \ else \
...@@ -635,7 +636,8 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES) ...@@ -635,7 +636,8 @@ check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES)
%.o.trs %.o.log: %.mod %.o.trs %.o.log: %.mod
@echo "`tput bold``tput setaf 8`OCTAVE: $(PWD)/$*... `tput sgr0`" @echo "`tput bold``tput setaf 8`OCTAVE: $(PWD)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \ @DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(PWD)" FILESTEM="$*" \
$(OCTAVE) --no-init-file --silent --no-history run_test_octave.m > $*.o.log 2>&1 $(OCTAVE) --no-init-file --silent --no-history run_test_octave.m > $*.o.log 2>&1 || \
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.mod\n:cputime: 0.0\n" > $*.o.trs
@if grep -q ":test-result: PASS" $*.o.trs; then \ @if grep -q ":test-result: PASS" $*.o.trs; then \
echo "`tput bold``tput setaf 2`OCTAVE: $(PWD)/$* PASSED!`tput sgr0`" ; \ echo "`tput bold``tput setaf 2`OCTAVE: $(PWD)/$* PASSED!`tput sgr0`" ; \
else \ else \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment