-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
103 lines (92 loc) · 2.58 KB
/
tox.ini
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[tox]
# Running plain tox will run the default environment (testenv) with the default
# python3 interpreter of the user.
envlist=testenv
# PEP-517 type sdist building
isolated_build=True
[testenv]
deps=pytest
pytest-timeout
coverage
# Pass windows env variable for includes
passenv=
PYTHON_ISAL_LINK_DYNAMIC
INCLUDE
setenv =
PYTHONDEVMODE=1
commands =
# Create HTML coverage report for humans and xml coverage report for external services.
coverage run --branch --source=isal -m pytest tests
# Ignore errors during report generation. Pypy does not generate proper coverage reports.
coverage html -i
coverage xml -i
[testenv:asan]
setenv=
PYTHONDEVMODE=1
PYTHONMALLOC=malloc
CFLAGS=-lasan -fsanitize=address -fno-omit-frame-pointer
allowlist_externals=bash
commands=
bash -c 'export LD_PRELOAD=$(gcc -print-file-name=libasan.so) && printenv LD_PRELOAD && python -c "from isal import isal_zlib" && pytest tests'
[testenv:compliance]
deps=pytest
commands=
pytest -v tests/test_zlib_compliance.py tests/test_gzip_compliance.py
[testenv:compatibility]
deps=pytest
commands=
pytest tests/test_isal.py
[testenv:lint]
deps=flake8
flake8-import-order
mypy
pytest
skip_install=True
commands =
flake8 src tests setup.py benchmark_scripts
mypy src/ tests benchmark_scripts
[testenv:twine_check]
deps=build
twine
skip_install=True
commands =
python -m build
twine check dist/*
# Documentation should build on python version 3
[testenv:docs]
deps=-r requirements-docs.txt
allowlist_externals=bash
mkdir
rm
commands=
python --version
# PLACEHOLDER: create _static folder, since we do not have static files in
# our project yet
mkdir -p docs/_static
# Remove docs/_build so all documentation has to be build again
# This is necessary when using --keep-going on sphinx-build
rm -rf docs/_build
# Test if documentation can be build without errors and warnings
# -a rebuilds everything. -W turns warnings into errors.
# --keep-going makes sure we see al the errors that are there in one go.
sphinx-build -a -W -n --keep-going docs docs/_build
[testenv:benchmark-all]
deps=
setenv =
commands=
python ./benchmark_scripts/benchmark.py --all
[testenv:benchmark-functions]
deps=
setenv =
commands=
python ./benchmark_scripts/benchmark.py --functions
[testenv:benchmark-gzip]
deps=
setenv =
commands=
python ./benchmark_scripts/benchmark.py --gzip
[testenv:benchmark-checksums]
deps=
setenv =
commands=
python ./benchmark_scripts/benchmark.py --checksums