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 c86f3fe0d0
)
This commit is contained in:
parent
f31c6792ab
commit
cc7f971485
2 changed files with 4 additions and 3 deletions
|
@ -258,9 +258,7 @@ endif
|
||||||
GMP_LIB = @GMP_LIB@
|
GMP_LIB = @GMP_LIB@
|
||||||
GMP_OBJ = $(if @GMP_OBJ@, ../src/@GMP_OBJ@)
|
GMP_OBJ = $(if @GMP_OBJ@, ../src/@GMP_OBJ@)
|
||||||
|
|
||||||
# Note: emacs-module.h is generated from emacs-module.h.in, hence we
|
MODULE_CFLAGS = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
|
||||||
# look in ../src, not $(srcdir)/../src.
|
|
||||||
MODULE_CFLAGS = -I../src -I$(srcdir)/../lib \
|
|
||||||
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
|
$(FPIC_CFLAGS) $(PROFILING_CFLAGS) \
|
||||||
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
|
$(WARN_CFLAGS) $(WERROR_CFLAGS) $(CFLAGS)
|
||||||
|
|
||||||
|
|
|
@ -318,6 +318,9 @@ local reference."
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(let ((standard-output (current-buffer)))
|
(let ((standard-output (current-buffer)))
|
||||||
(describe-function-1 #'mod-test-sum)
|
(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
|
(should (equal
|
||||||
(buffer-substring-no-properties 1 (point-max))
|
(buffer-substring-no-properties 1 (point-max))
|
||||||
(format "a module function in `data/emacs-module/mod-test%s'.
|
(format "a module function in `data/emacs-module/mod-test%s'.
|
||||||
|
|
Loading…
Add table
Reference in a new issue