mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
various cleanups, better parallelism and build-dir structure
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user