From 12e74a0645103feeb177f399279356ed1bee75ef Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Mon, 10 Jun 2019 18:07:23 +0200 Subject: [PATCH] Allow selecting the target to build This is useful to investiage coredumps. --- python/README.rst | 8 ++++++++ python/src/deltachat/_build.py | 3 ++- run-integration-tests.sh | 7 ++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/python/README.rst b/python/README.rst index 0de7c1a97..4fec44e5a 100644 --- a/python/README.rst +++ b/python/README.rst @@ -114,6 +114,14 @@ The ``run-integration-tests.sh`` script will automatically use .. _`deltachat-core-rust github repository`: https://github.com/deltachat/deltachat-core-rust .. _`deltachat-core`: https://github.com/deltachat/deltachat-core-rust +Running test using a debug build +-------------------------------- + +If you need to examine e.g. a coredump you may want to run the tests +using a debug build:: + + DCC_RS_TARGET=debug ./run-integration-tests.sh -e py37 -- -x -v -k failing_test + Building manylinux1 wheels ========================== diff --git a/python/src/deltachat/_build.py b/python/src/deltachat/_build.py index 183e665a8..9f478933e 100644 --- a/python/src/deltachat/_build.py +++ b/python/src/deltachat/_build.py @@ -8,9 +8,10 @@ import cffi def ffibuilder(): projdir = os.environ.get('DCC_RS_DEV') + target = os.environ.get('DCC_RS_TARGET', 'release') if projdir: libs = [] - objs = [os.path.join(projdir, 'target', 'release', 'libdeltachat.a')] + objs = [os.path.join(projdir, 'target', target, 'libdeltachat.a')] incs = [os.path.join(projdir, 'deltachat-ffi')] else: libs = ['deltachat'] diff --git a/run-integration-tests.sh b/run-integration-tests.sh index 53c92715d..7a70ec89a 100755 --- a/run-integration-tests.sh +++ b/run-integration-tests.sh @@ -10,13 +10,10 @@ # # ./run-integration-tests.sh -e py35 -- -x -cargo build -p deltachat_ffi --release +cargo build -p deltachat_ffi -# CFLAGS=-I`pwd`/deltachat-ffi -# LD_LIBRARY_PATH=`pwd`/target/release -# export CFLAGS -# export LD_LIBRARY_PATH export DCC_RS_DEV=$(pwd) +export DCC_RS_TARGET=${DCC_RS_TARGET:-release} pushd python toxargs="$@"