1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Set EMACS_TEST_TIMEOUT for emba

* test/Makefile.in: Support EMACS_TEST_TIMEOUT environment variable.

* test/README: Mention EMACS_TEST_TIMEOUT environment variable.

* test/infra/gitlab-ci.yml (variables): Set default value of
EMACS_TEST_TIMEOUT.
(.job-template): Propagate EMACS_TEST_TIMEOUT and EMACS_TEST_VERBOSE.
(test-all-inotify): Set specific EMACS_TEST_TIMEOUT.
This commit is contained in:
Michael Albinus 2021-10-16 18:08:25 +02:00
parent 4c468c6b3c
commit ffff168d5f
3 changed files with 17 additions and 3 deletions

View File

@ -77,9 +77,14 @@ EMACSOPT = --no-init-file --no-site-file --no-site-lisp -L "$(SEPCHAR)$(srcdir)"
# Prevent any settings in the user environment causing problems.
unexport EMACSDATA EMACSDOC EMACSPATH GREP_OPTIONS XDG_CONFIG_HOME
## To run tests under a debugger, set this to eg: "gdb --args".
# To run tests under a debugger, set this to eg: "gdb --args".
GDB =
# Whether a timeout shall be given, writing possibly a core dump.
ifneq (${EMACS_TEST_TIMEOUT},)
TEST_TIMEOUT = timeout -s ABRT ${EMACS_TEST_TIMEOUT}
endif
# Set this to 'yes' to run the tests in an interactive instance.
TEST_INTERACTIVE ?= no
@ -117,7 +122,7 @@ endif
# and prevent locals to influence the text of the errors we expect to receive.
emacs = LANG=C EMACSLOADPATH= \
EMACS_TEST_DIRECTORY=$(abspath $(srcdir)) \
$(GDB) "$(EMACS)" $(MODULES_EMACSOPT) $(EMACSOPT)
$(GDB) $(TEST_TIMEOUT) "$(EMACS)" $(MODULES_EMACSOPT) $(EMACSOPT)
# Set HOME to a nonexistent directory to prevent tests from accessing
# it accidentally (e.g., popping up a gnupg dialog if ~/.authinfo.gpg

View File

@ -140,6 +140,11 @@ these test environments.
$EMACS_HYDRA_CI indicates the hydra environment, and $EMACS_EMBA_CI
indicates the emba environment, respectively.
If tests on these premises take too long, and it is needed to create a
core dump for further analysis, the environment variable
$EMACS_TEST_TIMEOUT could set a limit (in seconds) when this shall
happen.
(Also, see etc/compilation.txt for compilation mode font lock tests
and etc/grep.txt for grep mode font lock tests.)

View File

@ -44,6 +44,8 @@ workflow:
variables:
GIT_STRATEGY: fetch
EMACS_EMBA_CI: 1
# Three hours, see below.
EMACS_TEST_TIMEOUT: 10800
EMACS_TEST_VERBOSE: 1
# # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
# DOCKER_HOST: tcp://docker:2376
@ -108,7 +110,7 @@ default:
# TODO: with make -j4 several of the tests were failing, for
# example shadowfile-tests, but passed without it.
- 'export PWD=$(pwd)'
- 'timeout 7200s docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name} ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -c "git fetch ${PWD} HEAD && echo checking out these updated files && git diff --name-only FETCH_HEAD && ( git diff --name-only FETCH_HEAD | xargs git checkout -f FETCH_HEAD ) && make -j4 && timeout -s ABRT 3600s make ${make_params}"'
- 'docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} -e EMACS_TEST_TIMEOUT=${EMACS_TEST_TIMEOUT} -e EMACS_TEST_VERBOSE=${EMACS_TEST_VERBOSE} --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name} ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -c "git fetch ${PWD} HEAD && echo checking out these updated files && git diff --name-only FETCH_HEAD && ( git diff --name-only FETCH_HEAD | xargs git checkout -f FETCH_HEAD ) && make -j4 && make ${make_params}"'
after_script:
- docker ps -a
- printenv
@ -312,6 +314,8 @@ test-all-inotify:
variables:
target: emacs-inotify
make_params: check-expensive
# Two hours.
EMACS_TEST_TIMEOUT: 7200
# Local Variables:
# add-log-current-defun-header-regexp: "^\\([-_.[:alnum:]]+\\)[ \t]*:"