diff --git a/tests/Makefile.am b/tests/Makefile.am index 49892d1c3f5b1cb369e42e7615b68fa618dbcb6f..6cfc204ebe640833568c1518ebbf14b56652932b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -849,29 +849,19 @@ EXTRA_DIST = \ prior_posterior_function/posterior_function_demo.m -TARGETS = -TEXTOUT = - if HAVE_CMD_LINE_MATLAB -TARGETS += check-matlab -TEXTOUT += run_test_matlab_output.txt +check-local: check-matlab endif if HAVE_OCTAVE -TARGETS += check-octave -TEXTOUT += run_test_octave_output.txt +check-local: check-octave endif -check-local: $(TEXTOUT) - @cat $(TEXTOUT) - -$(TEXTOUT): $(TARGETS) - check-matlab: $(M_XFAIL_TRS_FILES) $(M_TRS_FILES) - ./read_trs_files.sh "$(M_TRS_FILES)" "$(M_XFAIL_TRS_FILES)" + @./read_trs_files.sh "$(M_TRS_FILES)" "$(M_XFAIL_TRS_FILES)" check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES) - ./read_trs_files.sh "$(O_TRS_FILES)" "$(O_XFAIL_TRS_FILES)" + @./read_trs_files.sh "$(O_TRS_FILES)" "$(O_XFAIL_TRS_FILES)" %.m.trs %.m.log: %.mod @echo "`tput bold``tput setaf 8`MATLAB: $(CURDIR)/$*... `tput sgr0`" diff --git a/tests/read_trs_files.sh b/tests/read_trs_files.sh index e0e9a06d1089f892f9def7d516dde36988fce540..2392eb310201aca460b0cddf1f1eb1d7fb002dc0 100755 --- a/tests/read_trs_files.sh +++ b/tests/read_trs_files.sh @@ -55,7 +55,7 @@ else outfile=run_test_matlab_output.txt fi -# Print Output +# Print Output (to stdout and to a file) { echo '================================' echo "DYNARE MAKE CHECK $prg RESULTS" @@ -88,7 +88,7 @@ fi fi echo "$timing" | tr ':' '\n' | sed -e 's/^[ \t]*//;/^$/d;s/^|[ ]/| * /' echo -} > $outfile +} | tee $outfile # Exit with error code if some tests failed ((failed + xpassed == 0))