]> 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)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 9 Jul 2020 23:38:45 +0000 (16:38 -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.

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

index 10e3d9617d38e524bf044c325742b45415ef3c60..c4840670e610d6baf8a11b59e3de44c4641ee880 100644 (file)
@@ -258,9 +258,7 @@ endif
 GMP_H = @GMP_H@
 LIB_GMP = @LIB_GMP@
 
-# 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 6851b8904519ff0ad16fd210d446f697ec05e28e..411b4505da0b33ee90ec683d6adefc621e842eb8 100644 (file)
@@ -288,6 +288,9 @@ during garbage collection."
   (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'.