forked from precice/python-bindings
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
24 lines (23 loc) · 883 Bytes
/
Copy pathtox.ini
File metadata and controls
24 lines (23 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[tox]
env_list =
py3
minversion = 4.23.2
[testenv]
description = run the tests with pytest against the universal preCICE mock
package = sdist
wheel_build_env = .pkg
; PYPRECICE_MOCKED makes setup.py skip linking libprecice; the preCICE symbols
; are provided at runtime by preloading the universal preCICE mock
; (libpreciceMocked.so, built from extras/mock in the preCICE repository).
; Point PRECICE_MOCK_LIB to that library before running tox.
setenv =
PYPRECICE_MOCKED = True
LD_PRELOAD = {env:PRECICE_MOCK_LIB:}
passenv =
PRECICE_MOCK_LIB
deps =
pytest>=6
commands_pre =
python -c "import os, sys; lib = os.environ.get('LD_PRELOAD', ''); sys.exit(None if os.path.isfile(lib) else 'PRECICE_MOCK_LIB must point to libpreciceMocked.so (the universal preCICE mock), which is preloaded into the test run.')"
commands =
pytest {tty:--color=yes} {posargs}