From cb612c51d6c428aa7d8fd01f1b3fde13284c1c16 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 19 Nov 2021 16:50:03 +0100 Subject: [PATCH] Add more test jobs for emba * test/Makefile.in (SUBDIRS): Suppress "*auto-save-list". (SUBDIR_TARGETS): New variable. (subdir_template): Set it. (subdir-targets): New target. * test/infra/gitlab-ci.yml (variables): Add CI_DEBUG_TRACE. (build-image-inotify): Remove timeout. (generator, test-jobs-pipeline): New jobs. (test-lisp-inotify, test-lisp-net-inotify): Comment. * test/infra/test-jobs-generator.sh: New script. --- test/Makefile.in | 14 +++-- test/infra/gitlab-ci.yml | 46 ++++++++++------ test/infra/test-jobs-generator.sh | 89 +++++++++++++++++++++++++++++++ 3 files changed, 131 insertions(+), 18 deletions(-) create mode 100755 test/infra/test-jobs-generator.sh diff --git a/test/Makefile.in b/test/Makefile.in index 7bef1c36605..39d7b1d4e48 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -31,7 +31,7 @@ SHELL = @SHELL@ srcdir = @srcdir@ -abs_top_srcdir=@abs_top_srcdir@ +abs_top_srcdir = @abs_top_srcdir@ top_builddir = @top_builddir@ VPATH = $(srcdir) @@ -67,7 +67,7 @@ elpa_opts = $(foreach el,$(elpa_els),$(and $(wildcard $(el)),-L $(dir $(el)) -l # directory, we can use emacs --chdir. EMACS = ../src/emacs -EMACS_EXTRAOPT= +EMACS_EXTRAOPT = # Command line flags for Emacs. # Apparently MSYS bash would convert "-L :" to "-L ;" anyway, @@ -252,9 +252,12 @@ endef $(foreach test,${TESTS},$(eval $(call test_template,${test}))) ## Get the tests for only a specific directory. -SUBDIRS = $(sort $(shell cd ${srcdir} && find lib-src lisp misc src -type d ! -path "*resources*" -print)) +SUBDIRS = $(sort $(shell cd ${srcdir} && find lib-src lisp misc src -type d \ + ! \( -path "*resources*" -o -path "*auto-save-list" \) -print)) +SUBDIR_TARGETS = define subdir_template + SUBDIR_TARGETS += check-$(subst /,-,$(1)) .PHONY: check-$(subst /,-,$(1)) check-$(subst /,-,$(1)): @${MAKE} check LOGFILES="$(patsubst %.el,%.log, \ @@ -367,3 +370,8 @@ maintainer-clean: distclean bootstrap-clean check-declare: $(emacs) -l check-declare \ --eval '(check-declare-directory "$(srcdir)")' + +.PHONY: subdir-targets + +subdir-targets: + @echo $(SUBDIR_TARGETS) diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 096a293b302..c14af0e3011 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -47,7 +47,7 @@ variables: # 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 + # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled # DOCKER_HOST: tcp://docker:2376 # DOCKER_TLS_CERTDIR: "/certs" # Put the configuration for each run in a separate directory to @@ -57,6 +57,8 @@ variables: # We don't use ${CI_COMMIT_SHA} to be able to do one bootstrap # across multiple builds. BUILD_TAG: ${CI_COMMIT_REF_SLUG} + # Disable if you don't need it, it can be a security risk. + CI_DEBUG_TRACE: "true" default: image: docker:19.03.12 @@ -224,8 +226,6 @@ build-image-inotify: extends: [.job-template, .build-template] variables: target: emacs-inotify -# Temporarily. - timeout: 8 hours # test-fast-inotify: # stage: fast @@ -234,19 +234,35 @@ build-image-inotify: # target: emacs-inotify # make_params: "-C test check" -test-lisp-inotify: - stage: normal - extends: [.job-template, .test-template] - variables: - target: emacs-inotify - make_params: "-C test check-lisp" +generator: + stage: generate + script: + - ./test-jobs-generator.sh > test-jobs.yml + artifacts: + paths: + - test-jobs.yml -test-lisp-net-inotify: - stage: normal - extends: [.job-template, .test-template] - variables: - target: emacs-inotify - make_params: "-C test check-lisp-net" +test-jobs-pipeline: + stage: trigger + trigger: + include: + - artifact: test-jobs.yml + job: generator + strategy: depend + +# test-lisp-inotify: +# stage: normal +# extends: [.job-template, .test-template] +# variables: +# target: emacs-inotify +# make_params: "-C test check-lisp" + +# test-lisp-net-inotify: +# stage: normal +# extends: [.job-template, .test-template] +# variables: +# target: emacs-inotify +# make_params: "-C test check-lisp-net" build-image-filenotify-gio: stage: platform-images diff --git a/test/infra/test-jobs-generator.sh b/test/infra/test-jobs-generator.sh new file mode 100755 index 00000000000..97346785eaf --- /dev/null +++ b/test/infra/test-jobs-generator.sh @@ -0,0 +1,89 @@ +#!/bin/sh + +# Copyright (C) 2021 Free Software Foundation, Inc. +# +# This file is part of GNU Emacs. +# +# GNU Emacs is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GNU Emacs is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Emacs. If not, see . + +# GNU Emacs support for the GitLab-specific build of Docker images. + +# The presence of this file does not imply any FSF/GNU endorsement of +# Docker or any other particular tool. Also, it is intended for +# evaluation purposes, thus possibly temporary. + +# Maintainer: Michael Albinus +# URL: https://emba.gnu.org/emacs/emacs + +for target in $(cd ..; make -s subdir-targets); do + case $target in + check-lib-src) + changes=" + - lib-src/*.{h,c} + - test/lib-src/*.el" + ;; + check-lisp-emacs-lisp) + changes=" + - lisp/emacs-lisp/*.el + - test/lisp/emacs-lisp/*.el" + ;; + check-lisp-emacs-lisp-eieio-tests) + changes=" + - lisp/emacs-lisp/eieio-tests/*.el + - test/lisp/emacs-lisp/eieio-tests/*.el" + ;; + check-lisp-emacs-lisp-faceup-tests) + changes=" + - lisp/emacs-lisp/faceup-tests/*.el + - test/lisp/emacs-lisp/faceup-tests/*.el" + ;; + check-lisp-mh-e) + changes=" + - lisp/mh-e/*.el + - test/lisp/mh-e/*.el" + ;; + check-lisp-so-long-tests) + changes=" + - lisp/so-long-tests/*.el + - test/lisp/so-long-tests/*.el" + ;; + check-misc) + changes=" + - admin/*.el + - test/misc/*.el" + ;; + check-src) + changes=" + - src/*.{h,c} + - test/src/*.el" + ;; + *) + changes=" + - $(echo -n ${target##check-}/*.el | tr '-' '/') + - $(echo -n test${target##check}/*.el | tr '-' '/')" + ;; + esac + + cat <