mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-27 13:17:56 +01:00
ec26eeaeec
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
23 lines
952 B
Bash
Executable file
23 lines
952 B
Bash
Executable file
#!/usr/bin/env bash
|
|
test_description="python bindings (pytest)"
|
|
. $(dirname "$0")/test-lib.sh || exit 1
|
|
|
|
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 (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
|