summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-07-09 16:35:48 -0700
committerGlenn Morris <rgm@gnu.org>2020-09-25 10:33:27 -0700
commitcc7f9714858ab9f1fc30ffcfc5acc018da2b5d4d (patch)
treedd83072f2976516812261bc93aee292d79c2964e /test
parentf31c6792ab98c8be343838f59d96e35c05353521 (diff)
downloademacs-cc7f9714858ab9f1fc30ffcfc5acc018da2b5d4d.tar.gz
Fix out-of-source ‘make check’ emacs-module-tests
Problem reported by Koki Fukuda in: https://lists.gnu.org/r/emacs-devel/2020-07/msg00169.html * test/Makefile.in (MODULE_CFLAGS): Include from the same directories included from in ../src. * test/src/emacs-module-tests.el (module/describe-function-1): Strip path to source directory. (cherry picked from commit c86f3fe0d023cdd25edbbce91c5b32654f2b734e)
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in4
-rw-r--r--test/src/emacs-module-tests.el3
2 files changed, 4 insertions, 3 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index f03c194a7cb..0003e763abe 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -258,9 +258,7 @@ endif
GMP_LIB = @GMP_LIB@
GMP_OBJ = $(if @GMP_OBJ@, ../src/@GMP_OBJ@)
-# Note: emacs-module.h is generated from emacs-module.h.in, hence we
-# look in ../src, not $(srcdir)/../src.
-MODULE_CFLAGS = -I../src -I$(srcdir)/../lib \
+MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el
index 91206156f85..9df0b25a0c5 100644
--- a/test/src/emacs-module-tests.el
+++ b/test/src/emacs-module-tests.el
@@ -318,6 +318,9 @@ local reference."
(with-temp-buffer
(let ((standard-output (current-buffer)))
(describe-function-1 #'mod-test-sum)
+ (goto-char (point-min))
+ (while (re-search-forward "`[^']*/data/emacs-module/" nil t)
+ (replace-match "`data/emacs-module/"))
(should (equal
(buffer-substring-no-properties 1 (point-max))
(format "a module function in `data/emacs-module/mod-test%s'.