]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix out-of-source ‘make check’ emacs-module-tests
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jul 2020 23:35:48 +0000 (16:35 -0700)
committerGlenn Morris <rgm@gnu.org>
Fri, 25 Sep 2020 17:33:27 +0000 (10:33 -0700)
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)

test/Makefile.in
test/src/emacs-module-tests.el

index f03c194a7cbaf958a0a838b994df3c2a0a0d92f6..0003e763abec8bff3fc960dbf72a8c2da0a82d08 100644 (file)
@@ -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)
 
index 91206156f85be9a54a17c81952ce459b12cd0759..9df0b25a0c5fd19488856d57a94a2b1da7429fc8 100644 (file)
@@ -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'.