test: replaced use of python with $NOTMUCH_PYTHON (twice)
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 4 Jan 2017 21:33:15 +0000 (23:33 +0200)
committerDavid Bremner <david@tethera.net>
Thu, 23 Feb 2017 12:55:24 +0000 (08:55 -0400)
$NOTMUCH_PYTHON is sourced from sh.config, configured by
./configure and stated to be used as:

"Name of python command to use in configure and the test suite."

test/T260-thread-order.sh
test/test-lib.sh

index f720c99817a1561ef8df2c1300644d8a2ee600db..89f4d1be4816a8926a0663eeea46db54750e77f3 100755 (executable)
@@ -4,7 +4,7 @@ test_description="threading when messages received out of order"
 
 # Generate all single-root four message thread structures.  We'll use
 # this for multiple tests below.
-THREADS=$(python ${TEST_DIRECTORY}/gen-threads.py 4)
+THREADS=$($NOTMUCH_PYTHON ${TEST_DIRECTORY}/gen-threads.py 4)
 nthreads=$(wc -l <<< "$THREADS")
 
 test_begin_subtest "Messages with one parent get linked in all delivery orders"
index 67be917eb94299c609773ab31a2d798c5b172daa..bb32e97b2af747b35a2db1d82b44d6cc8333d244 100644 (file)
@@ -667,7 +667,7 @@ test_expect_equal_json () {
 
 # Sort the top-level list of JSON data from stdin.
 test_sort_json () {
-    PYTHONIOENCODING=utf-8 python -c \
+    PYTHONIOENCODING=utf-8 $NOTMUCH_PYTHON -c \
         "import sys, json; json.dump(sorted(json.load(sys.stdin)),sys.stdout)"
 }