unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: notmuch@notmuchmail.org
Cc: tomi.ollila@iki.fi
Subject: [PATCH] test/test-lib.sh: fix two out of tree test issues
Date: Fri, 24 Apr 2020 00:26:43 +0300	[thread overview]
Message-ID: <20200423212643.864-1-tomi.ollila@iki.fi> (raw)

json_check_nodes.py exists in source tree, not in out of tree
build tree. Added -B to the execution so source tree is not
"polluted" by a .pyc file when json_check_nodes.py is executed.

When creating run_emacs.sh make it load .elc files from out of
tree build tree, not from source tree if such files existed.
If existed, those may be outdated, or even created by some other
emacs than the one that was used to build .elc files in out of
tree build dir.
---

Noticed latter when did in-tree build on Fedora 31 host, then
out-of-tree build running Ubuntu 18.04 in (podman) container;
Fedora had Emacs 26, and ubuntu emacs 25 -- got bytecode
errors...

 test/test-lib.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 7f8a3a4d..f9b7d866 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -523,7 +523,7 @@ test_json_nodes () {
 
 	if ! test_skip "$test_subtest_name"
 	then
-	    output=$(PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON "$TEST_DIRECTORY"/json_check_nodes.py "$@")
+	    output=$(PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -B "$NOTMUCH_SRCDIR"/test/json_check_nodes.py "$@")
 		if [ "$?" = 0 ]
 		then
 			test_ok_
@@ -984,7 +984,7 @@ export NOTMUCH_CONFIG=$NOTMUCH_CONFIG
 # --load		Force loading of notmuch.el and test-lib.el
 
 exec ${TEST_EMACS} --quick \
-	--directory "$NOTMUCH_SRCDIR/emacs" --load notmuch.el \
+	--directory "$NOTMUCH_BUILDDIR/emacs" --load notmuch.el \
 	--directory "$NOTMUCH_SRCDIR/test" --load test-lib.el \
 	"\$@"
 EOF
-- 
2.25.3

             reply	other threads:[~2020-04-23 21:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 21:26 Tomi Ollila [this message]
2020-05-30 15:48 ` [PATCH] test/test-lib.sh: fix two out of tree test issues David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200423212643.864-1-tomi.ollila@iki.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).