1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-12 16:23:57 +00:00

Treat tests in lib-src like tests in src

* test/Makefile.in (test_template): Depend on a .c source file for a
test under lib-src, as for src.  (Thanks, Glenn Morris for pointing me
in the right direction.)
This commit is contained in:
Reuben Thomas 2017-08-22 01:39:10 +01:00
parent 891bc9822b
commit ba0bb332dd

View File

@ -178,12 +178,12 @@ TESTS := $(LOGFILES:.log=)
define test_template define test_template
## A test FOO-tests depends on the source file with the similar ## A test FOO-tests depends on the source file with the similar
## name, unless FOO itself contains the string '-tests/'. ## name, unless FOO itself contains the string '-tests/'.
## The similar name is FOO.c if FOO begins with 'src/', FOO.el ## The similar name is FOO.c if FOO begins with '{lib-,}src/', FOO.el
## otherwise. Although this heuristic does not identify all the ## otherwise. Although this heuristic does not identify all the
## dependencies, it is better than nothing. ## dependencies, it is better than nothing.
ifeq (,$(patsubst %-tests,,$(1))$(findstring -tests/,$(1))) ifeq (,$(patsubst %-tests,,$(1))$(findstring -tests/,$(1)))
$(1).log: $(patsubst %-tests,$(srcdir)/../%,$(1))$(if \ $(1).log: $(patsubst %-tests,$(srcdir)/../%,$(1))$(if \
$(patsubst src/%,,$(1)),.el,.c) $(patsubst src/%,,$(patsubst lib-src/%,,$(1))),.el,.c)
endif endif
## Short aliases that always re-run the tests, with no logging. ## Short aliases that always re-run the tests, with no logging.