Fix emacs-module-tests to work with VPATH builds
authorRob Browning <rlb@defaultvalue.org>
Thu, 20 Aug 2020 01:29:37 +0000 (20:29 -0500)
committerRob Browning <rlb@defaultvalue.org>
Sun, 23 Aug 2020 19:58:17 +0000 (14:58 -0500)
Add 0011-emacs-module-tests-fix-VPATH-builds.patch to address the
issue.

1  2 
debian/.git-dpm
debian/patches/0011-emacs-module-tests-fix-VPATH-builds.patch
debian/patches/series

diff --cc debian/.git-dpm
index 2732f00b63042d4d9cccb05672c51b7cb01a98c4,0000000000000000000000000000000000000000..a7d8b5f67a330d3a86c6669c79b2b08ed81aa0ef
mode 100644,000000..100644
--- /dev/null
@@@ -1,8 -1,0 +1,8 @@@
- dab3621bbfd8ef6361f4b0ef904c0f5256556a53
- dab3621bbfd8ef6361f4b0ef904c0f5256556a53
 +# see git-dpm(1) from git-dpm package
++eeeed459bbcad847b83a9687156f24cb4d370880
++eeeed459bbcad847b83a9687156f24cb4d370880
 +d429af9a70839a40bba83ebeaa33ad8d7219fbcd
 +d429af9a70839a40bba83ebeaa33ad8d7219fbcd
 +emacs_27.1+1.orig.tar.xz
 +fa38330a1a57cf7a01ee8128f0faf2dd0117f703
 +25483548
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..adb25267d987bfdbc07346084fcee8994a4f4b39
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,54 @@@
++From eeeed459bbcad847b83a9687156f24cb4d370880 Mon Sep 17 00:00:00 2001
++From: Rob Browning <rlb@defaultvalue.org>
++Date: Wed, 19 Aug 2020 19:14:35 -0500
++Subject: emacs-module-tests: fix VPATH builds
++
++Add the actual srcdir to the MODULE_CFLAGS include path, and adjust
++the module/describe-function-1 test to ignore the shared library path
++prefix, which varies when building outside the source tree.
++
++Bug: https://debbugs.gnu.org/37797
++Status: new
++---
++ test/Makefile.in               |  2 +-
++ test/src/emacs-module-tests.el | 11 ++++++-----
++ 2 files changed, 7 insertions(+), 6 deletions(-)
++
++diff --git a/test/Makefile.in b/test/Makefile.in
++index f03c194a7cb..6c433f1d682 100644
++--- a/test/Makefile.in
+++++ b/test/Makefile.in
++@@ -260,7 +260,7 @@ 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$(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..1b512aff566 100644
++--- a/test/src/emacs-module-tests.el
+++++ b/test/src/emacs-module-tests.el
++@@ -318,14 +318,15 @@ module--test-assertion
++   (with-temp-buffer
++     (let ((standard-output (current-buffer)))
++       (describe-function-1 #'mod-test-sum)
++-      (should (equal
++-               (buffer-substring-no-properties 1 (point-max))
++-               (format "a module function in `data/emacs-module/mod-test%s'.
+++      (let ((result (buffer-substring-no-properties 1 (point-max))))
+++        (should (string-match-p
+++                 (format "a module function in `.*data/emacs-module/mod-test%s'.
++ 
++ (mod-test-sum a b)
++ 
++-Return A + B"
++-                       module-file-suffix))))))
+++Return A \\+ B"
+++                         module-file-suffix)
+++                 (buffer-substring-no-properties 1 (point-max))))))))
++ 
++ (ert-deftest module/load-history ()
++   "Check that Bug#30164 is fixed."
index d0928ddd62c76aa985e521cc9bddd64dc01b3339,0000000000000000000000000000000000000000..c02bc450a529d95815ada546a9284a2b5ad77361
mode 100644,000000..100644
--- /dev/null
@@@ -1,10 -1,0 +1,11 @@@
 +0001-Prefer-usr-share-info-emacs.patch
 +0002-Run-debian-startup-and-set-debian-emacs-flavor.patch
 +0003-Remove-files-that-appear-to-be-incompatible-with-the.patch
 +0004-Adjust-documentation-references-for-Debian.patch
 +0005-Modify-the-output-of-version-to-indicate-Debian-modi.patch
 +0006-Don-t-try-to-build-src-macuvs.h-via-IVD_Sequences.tx.patch
 +0007-Kill-gpg-agent-in-package-test.el-to-avoid-a-race.patch
 +0008-Don-t-downcase-real-xref-in-elisp-mode-tests.patch
 +0009-Mark-vc-bzr-test-fauilt-bzr-autoloads-as-unstable-fo.patch
 +0010-Mark-echo-server-with-dns-test-as-unstable-for-now.patch
++0011-emacs-module-tests-fix-VPATH-builds.patch