]> git.notmuchmail.org Git - notmuch/commitdiff
test/test-lib.sh: fix two out of tree test issues
authorTomi Ollila <tomi.ollila@iki.fi>
Thu, 23 Apr 2020 21:26:43 +0000 (00:26 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 30 May 2020 15:42:14 +0000 (12:42 -0300)
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.

test/test-lib.sh

index 58972339bfa05e7e9cf5707b0b1564abf8333025..87fa6fe4a8aaedeb19dd90bff26484ecc837f732 100644 (file)
@@ -556,7 +556,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_
@@ -1021,7 +1021,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