X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT391-python-cffi.sh;h=0059b050c718a1452ae994e32d605d370e18c65b;hb=HEAD;hp=d54bad279e12dfb1444ac365c4ac45b84bbc5572;hpb=15d8067c0a209a24d757b416107d92007529f01f;p=notmuch diff --git a/test/T391-python-cffi.sh b/test/T391-python-cffi.sh index d54bad27..0059b050 100755 --- a/test/T391-python-cffi.sh +++ b/test/T391-python-cffi.sh @@ -2,13 +2,22 @@ test_description="python bindings (pytest)" . $(dirname "$0")/test-lib.sh || exit 1 -if [ $NOTMUCH_HAVE_PYTHON3_CFFI -eq 0 -o $NOTMUCH_HAVE_PYTHON3_PYTEST -eq 0 ]; then +if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then test_done fi +if [ "${NOTMUCH_HAVE_PYTHON3_CFFI-0}" = "0" -o "${NOTMUCH_HAVE_PYTHON3_PYTEST-0}" = "0" ]; then + test_done +fi + +test_begin_subtest "python cffi tests (NOTMUCH_CONFIG set)" +pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage +printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini +test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)" -test_begin_subtest "python cffi tests" +test_begin_subtest "python cffi tests (NOTMUCH_CONFIG unset)" pytest_dir=$NOTMUCH_BUILDDIR/bindings/python-cffi/build/stage printf "[pytest]\nminversion = 3.0\naddopts = -ra\n" > $pytest_dir/pytest.ini +unset NOTMUCH_CONFIG test_expect_success "(cd $pytest_dir && ${NOTMUCH_PYTHON} -m pytest --verbose --log-file=$TMP_DIRECTORY/test.output)" test_done