emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ffff168: Set EMACS_TEST_TIMEOUT for emba


From: Michael Albinus
Subject: master ffff168: Set EMACS_TEST_TIMEOUT for emba
Date: Sat, 16 Oct 2021 12:08:32 -0400 (EDT)

branch: master
commit ffff168d5fb14fbfa74f7c04fab0235a14bb7e64
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    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.
---
 test/Makefile.in         | 9 +++++++--
 test/README              | 5 +++++
 test/infra/gitlab-ci.yml | 6 +++++-
 3 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index a5720b2..7bef1c3 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 a096124..4d447c9 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 98abd1d..d4b7ee9 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 
- [...]
   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]*:"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]