From 3267763e6ba1787c702a42a131d6e466b1aa42d7 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 21 Feb 2018 20:49:40 -0500 Subject: [PATCH] Speed up parallel make check by testing slower files first * test/Makefile.in (SLOW_TESTS): New variable. (ELFILES): Move slow tests to the front. --- test/Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/Makefile.in b/test/Makefile.in index a85d491d2d3..1653263e7a4 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -96,6 +96,7 @@ TEST_LOCALE = C # Whether to run tests from .el files in preference to .elc, we do # this by default since it gives nicer stacktraces. +# If you just want a pass/fail, setting this to no is much faster. TEST_LOAD_EL ?= yes # Maximum length of lines in ert backtraces; nil for no limit. @@ -174,11 +175,18 @@ else maybe_exclude_module_tests := -name emacs-module-tests.el -prune -o endif +## To speed up parallel builds, put these slow test files (which can +## take longer than all the rest combined) at the start of the list. +SLOW_TESTS = ${srcdir}/lisp/net/tramp-tests.el + ELFILES := $(sort $(shell find ${srcdir} -path "${srcdir}/manual" -prune -o \ -path "${srcdir}/data" -prune -o \ -name "*resources" -prune -o \ ${maybe_exclude_module_tests} \ -name "*.el" ! -name ".*" -print)) + +$(foreach slow,${SLOW_TESTS},$(eval ELFILES:= ${slow} $(filter-out ${slow},${ELFILES}))) + ## .log files may be in a different directory for out of source builds LOGFILES := $(patsubst %.el,%.log, \ $(patsubst $(srcdir)/%,%,$(ELFILES))) -- 2.39.2