various cleanups, better parallelism and build-dir structure

This commit is contained in:
holger krekel
2019-11-21 13:56:15 +01:00
parent 590fd53dd4
commit 932c86bb3b
9 changed files with 118 additions and 64 deletions

View File

@@ -1,32 +1,32 @@
#!/bin/bash
#
# Run Python functional test for Delta Chat core.
#
# Run functional tests for Delta Chat core using the python bindings
# and tox/pytest.
set -e -x
set -e +x
# build the core library
cargo build --release -p deltachat_ffi --target=$TARGET
# make sure we have proper settings to run Online tests
X=${DCC_PY_LIVECONFIG:?need env var to run Online tests}
set -x
# Statically link against libdeltachat.a.
export DCC_RS_DEV=$(pwd)
# for core-building and python install step
export DCC_RS_TARGET=release
export DCC_RS_DEV=`pwd`
cd python
python install_python_bindings.py
# remove and inhibit writing PYC files
rm -rf tests/__pycache__
rm -rf src/deltachat/__pycache__
export PYTHONDONTWRITEBYTECODE=1
# make sure we have proper settings to run Online tests
X=${DCC_PY_LIVECONFIG:?need env var to run Online tests}
# run python tests (tox invokes pytest to run tests in python/tests)
# we split out qr-tests run to minimize likelyness of flaky tests
# (some qr tests are pretty heavy in terms of send/received
# messages and async-imap's likely has concurrency problems,
# eg https://github.com/async-email/async-imap/issues/4 )
tox -e lint,py37 -- --reruns 3 -k "not qr" tests/
tox -e py37 -- --reruns 5 -k "qr" tests/
tox -e lint,py37
unset DCC_PY_LIVECONFIG