Octave 7 compatibility fix: in testsuite, replace --no-window-system option by xvfb-run

This is a workaround for Octave bug 62101, which affects
tests/shock_decomposition/ls2003_plot.mod, but is unlikely to be fixed.
fix-tolerance-parameters
Sébastien Villemot 2022-04-15 14:33:02 +02:00
parent 715aff891a
commit 96346b77e5
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 3 deletions

View File

@ -1444,7 +1444,7 @@ check-matlab-ols: $(M_OLS_TRS_FILES)
%.o.trs %.o.log: %.mod
@echo "`tput bold``tput setaf 8`OCTAVE: $(CURDIR)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(CURDIR)" FILESTEM="$*" \
$(OCTAVE) --no-window-system --no-init-file --silent --no-history --path "$*.mod" run_test_octave.m > $*.o.log 2>&1 || \
xvfb-run -a $(OCTAVE) --no-init-file --silent --no-history --path "$*.mod" 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:elapsed-time: 0.0\n" > $*.o.trs
@if test -z "$(filter $*.o.trs,$(O_XFAIL_TRS_FILES))"; then pass_color=2; fail_color=1; else pass_color=1; fail_color=2; fi; \
if grep -q ":test-result: PASS" $*.o.trs; then \
@ -1459,7 +1459,7 @@ check-matlab-ols: $(M_OLS_TRS_FILES)
%.o.trs %.o.log : %.m
@echo "`tput bold``tput setaf 8`OCTAVE: $(CURDIR)/$*... `tput sgr0`"
@DYNARE_VERSION="$(PACKAGE_VERSION)" TOP_TEST_DIR="$(CURDIR)" \
$(OCTAVE) --no-window-system --no-init-file --silent --no-history $< > $*.o.log 2>&1 || \
xvfb-run -a $(OCTAVE) --no-init-file --silent --no-history $< > $*.o.log 2>&1 || \
printf ":test-result: FAIL\n:number-tests: 1\n:number-failed-tests: 1\n:list-of-failed-tests: $*.m\n:elapsed-time: 0.0\n" > $*.o.trs
@echo "`tput bold``tput setaf 8`OCTAVE: $(CURDIR)/$* Done!`tput sgr0`"
@ -1473,7 +1473,7 @@ check-matlab-ols: $(M_OLS_TRS_FILES)
%.o.tls : %.m
@echo "`tput bold``tput setaf 8`OCTAVE: $(CURDIR)/$*... `tput sgr0`"
@TOP_TEST_DIR="$(CURDIR)" FILESTEM="$*" \
$(OCTAVE) --no-window-system --no-init-file --silent --no-history run_o_script.m 2>&1
xvfb-run -a $(OCTAVE) --no-init-file --silent --no-history run_o_script.m 2>&1
@touch $*.o.tls
@echo "`tput bold``tput setaf 8`OCTAVE: $(CURDIR)/$* Done!`tput sgr0`"