forked from ni/nimi-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox-system_tests.ini
More file actions
70 lines (59 loc) · 3.03 KB
/
tox-system_tests.ini
File metadata and controls
70 lines (59 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox -c tox-system_tests.ini" from the driver directory. (generated/niscope)
[tox]
envlist = py{310,311,312,313,314}-niscope-wheel_dep,py{310,311,312,313,314}-niscope-system_tests, py314-niscope-coverage
skip_missing_interpreters=True
ignore_basepython_conflict=True
# We put the .tox directory outside of the Jenkins workspace so that it isn't wiped with the rest of the repo
toxworkdir = ../../../.tox
[testenv]
description =
niscope-wheel_dep: Build the nitclk wheel because we use it in niscope tests
niscope-system_tests: Run niscope system tests (requires NI-SCOPE runtime to be installed)
niscope-coverage: Prepare coverage report for upload to codecov.io # upload handled by GitHub Actions
changedir =
niscope-wheel_dep: ../nitclk
niscope-system_tests: .
niscope-coverage: .
commands =
niscope-wheel_dep: python -m build --wheel
# --disable-pip-version-check prevents pip from telling us we need to upgrade pip, since we are doing that now
niscope-system_tests: python -m pip install --disable-pip-version-check --upgrade pip
niscope-system_tests: python ../../tools/install_local_wheel.py --driver nitclk --start-path ../..
niscope-system_tests: python -c "import niscope; niscope.print_diagnostic_information()"
niscope-system_tests: coverage run --rcfile=../../tools/coverage_system_tests.rc --source niscope --parallel-mode -m pytest ../../src/niscope/examples --junitxml=../junit/junit-niscope-{envname}-examples-{env:BITNESS:64}.xml {posargs}
niscope-system_tests: coverage run --rcfile=../../tools/coverage_system_tests.rc --source niscope --parallel-mode -m pytest ../../src/niscope/system_tests -c tox-system_tests.ini --junitxml=../junit/junit-niscope-{envname}-{env:BITNESS:64}.xml --durations=5 {posargs}
niscope-coverage: coverage combine --rcfile=../../tools/coverage_system_tests.rc ./
# Create the report to upload
niscope-coverage: coverage xml -i --rcfile=../../tools/coverage_system_tests.rc
# Display the coverage results
niscope-coverage: coverage report --rcfile=../../tools/coverage_system_tests.rc
deps =
niscope-wheel_dep: build
niscope-system_tests: pytest
niscope-system_tests: coverage
niscope-system_tests: numpy
niscope-system_tests: hightime
niscope-system_tests: fasteners
niscope-system_tests: pytest-json
niscope-system_tests: .[grpc]
niscope-coverage: coverage
depends =
niscope-coverage: py{310,311,312,313,314}-niscope-system_tests
niscope-system_tests: py{310,311,312,313,314}-niscope-wheel_dep,
passenv =
GIT_BRANCH
GIT_COMMIT
BUILD_URL
BRANCH_NAME
JENKINS_URL
BUILD_NUMBER
[pytest]
addopts = --verbose
filterwarnings =
error::pytest.PytestUnhandledThreadExceptionWarning
norecursedirs = .* build dist CVS _darcs {arch} *.egg venv
junit_suite_name = nimi-python
junit_family = xunit1