diff --git a/python/src/deltachat/_build.py b/python/src/deltachat/_build.py index cc01ecb07..2d2c0b0f7 100644 --- a/python/src/deltachat/_build.py +++ b/python/src/deltachat/_build.py @@ -31,6 +31,7 @@ def ffibuilder(): libs = ['deltachat'] objs = [] incs = [] + extra_link_args = [] builder = cffi.FFI() builder.set_source( 'deltachat.capi', @@ -70,8 +71,8 @@ def ffibuilder(): distutils.sysconfig.customize_compiler(cc) tmpdir = tempfile.mkdtemp() try: - src_name = os.path.join(tmpdir, "prep.h") - dst_name = os.path.join(tmpdir, "prep2.c") + src_name = os.path.join(tmpdir, "include.h") + dst_name = os.path.join(tmpdir, "expanded.h") with open(src_name, "w") as src_fp: src_fp.write('#include ') cc.preprocess(source=src_name, diff --git a/python/tests/conftest.py b/python/tests/conftest.py index a74cf65d6..fca88e94a 100644 --- a/python/tests/conftest.py +++ b/python/tests/conftest.py @@ -16,6 +16,14 @@ def pytest_addoption(parser): ) +def pytest_configure(config): + cfg = config.getoption('--liveconfig') + if not cfg: + cfg = os.getenv('DCC_PY_LIVECONFIG') + if cfg: + config.option.liveconfig = cfg + + @pytest.hookimpl(trylast=True) def pytest_runtest_call(item): # perform early finalization because we otherwise get cloberred @@ -35,10 +43,14 @@ def pytest_report_header(config, startdir): ac.shutdown() finally: os.remove(t) - return "Deltachat core={} sqlite={}".format( - info['deltachat_core_version'], - info['sqlite_version'], - ) + summary = ['Deltachat core={} sqlite={}'.format( + info['deltachat_core_version'], + info['sqlite_version'], + )] + cfg = config.getoption('--liveconfig') + if cfg: + summary.append('Liveconfig: {}'.format(os.path.abspath(cfg))) + return summary @pytest.fixture(scope="session") @@ -74,7 +86,7 @@ def acfactory(pytestconfig, tmpdir, request): def configlist(self): configlist = [] for line in open(fn): - if line.strip(): + if line.strip() and not line.strip().startswith('#'): d = {} for part in line.split(): name, value = part.split("=") diff --git a/python/tox.ini b/python/tox.ini index 7dce3df91..49ce8d78e 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -13,6 +13,8 @@ commands = passenv = TRAVIS DCC_RS_DEV + DCC_RS_TARGET + DCC_PY_LIVECONFIG deps = pytest pytest-faulthandler diff --git a/run-integration-tests.sh b/run-integration-tests.sh index 579a7b662..8633bdd77 100755 --- a/run-integration-tests.sh +++ b/run-integration-tests.sh @@ -23,11 +23,10 @@ if [ $? != 0 ]; then fi pushd python -toxargs="$@" -if [ -e liveconfig ]; then - toxargs="--liveconfig liveconfig $@" +if [ -e "./liveconfig" ]; then + export DCC_PY_LIVECONFIG=liveconfig fi -tox $toxargs +tox "$@" ret=$? popd exit $ret diff --git a/src/constants.rs b/src/constants.rs index ac956be43..de50237fc 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -491,3 +491,12 @@ pub enum KeyType { Public = 0, Private = 1, } + +pub const DC_CMD_GROUPNAME_CHANGED: libc::c_int = 2; +pub const DC_CMD_GROUPIMAGE_CHANGED: libc::c_int = 3; +pub const DC_CMD_MEMBER_ADDED_TO_GROUP: libc::c_int = 4; +pub const DC_CMD_MEMBER_REMOVED_FROM_GROUP: libc::c_int = 5; +pub const DC_CMD_AUTOCRYPT_SETUP_MESSAGE: libc::c_int = 6; +pub const DC_CMD_SECUREJOIN_MESSAGE: libc::c_int = 7; +pub const DC_CMD_LOCATION_STREAMING_ENABLED: libc::c_int = 8; +pub const DC_CMD_LOCATION_ONLY: libc::c_int = 9; diff --git a/src/dc_receive_imf.rs b/src/dc_receive_imf.rs index edc68da30..d3020025e 100644 --- a/src/dc_receive_imf.rs +++ b/src/dc_receive_imf.rs @@ -215,7 +215,9 @@ pub unsafe fn dc_receive_imf( maybe this can be optimized later, by checking the state before the message body is downloaded */ let mut allow_creation: libc::c_int = 1; - if msgrmsg == 0 { + if mime_parser.is_system_message != DC_CMD_AUTOCRYPT_SETUP_MESSAGE + && msgrmsg == 0 + { let show_emails = context .sql .get_config_int(context, "show_emails")