diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2021-10-16 18:08:25 +0200 |
---|---|---|
committer | Michael Albinus <michael.albinus@gmx.de> | 2021-10-16 18:08:25 +0200 |
commit | ffff168d5fb14fbfa74f7c04fab0235a14bb7e64 (patch) | |
tree | 58acfcf59b97852d4182fa24128f738832139b22 | |
parent | 4c468c6b3c12c12a96a6efce7a49c9b77e73bbd0 (diff) | |
download | emacs-ffff168d5fb14fbfa74f7c04fab0235a14bb7e64.tar.gz emacs-ffff168d5fb14fbfa74f7c04fab0235a14bb7e64.tar.bz2 emacs-ffff168d5fb14fbfa74f7c04fab0235a14bb7e64.zip |
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.
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/README | 5 | ||||
-rw-r--r-- | test/infra/gitlab-ci.yml | 6 |
3 files changed, 17 insertions, 3 deletions
diff --git a/test/Makefile.in b/test/Makefile.in index a5720b25714..7bef1c36605 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -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 diff --git a/test/README b/test/README index a0961249cfa..4d447c9bf15 100644 --- a/test/README +++ b/test/README @@ -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.) diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 98abd1d2c41..d4b7ee99d8b 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -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]*:" |