forked from rdiff-backup/rdiff-backup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
126 lines (118 loc) · 4.89 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# tox (https://tox.readthedocs.io/) 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" from this directory.
# Configuration file for quick / short tests.
# Use tox_slow.ini for longer running tests.
[tox]
envlist = check-static, py39, py310, py311, py312
[testenv]
# make sure those variables are passed down; you should define
# either explicitly the RDIFF_TEST_* variables or rely on the current
# user being correctly identified (which might not happen in a container)
passenv = RDIFF_TEST_*, RDIFF_BACKUP_*
setenv =
# paths for coverage must be absolute so that sub-processes find them
# even if they're started from another location.
COVERAGE_FILE = {envtmpdir}/coverage.sqlite
COVERAGE_PROCESS_START = {toxinidir}/tox.ini
deps = -r{toxinidir}/requs/base.txt
-r{toxinidir}/requs/optional.txt
-r{toxinidir}/requs/test.txt
allowlist_externals = sh
commands_pre =
rdiff-backup info
# must be the first command to setup the test environment
python testing/commontest.py
coverage erase
# write the hook file which will make sure that coverage is loaded
# also for sub-processes, like for "client/server" rdiff-backup
python testing/coverage_pth.py
commands =
coverage run testing/action_backuprestore_test.py --verbose --buffer
coverage run testing/action_calculate_test.py --verbose --buffer
coverage run testing/action_compare_test.py --verbose --buffer
coverage run testing/action_complete_test.py --verbose --buffer
coverage run testing/action_list_test.py --verbose --buffer
coverage run testing/action_regress_test.py --verbose --buffer
coverage run testing/action_remove_test.py --verbose --buffer
coverage run testing/action_test_test.py --verbose --buffer
coverage run testing/action_verify_test.py --verbose --buffer
sh ./testing/verbosity_actions_test.sh 9 --verbose --buffer
coverage run testing/api_test.py --verbose --buffer
coverage run testing/arguments_test.py --verbose --buffer
coverage run testing/c_test.py --verbose --buffer
coverage run testing/cmdline_test.py --verbose --buffer
coverage run testing/compare_test.py --verbose --buffer
coverage run testing/connection_test.py --verbose --buffer
coverage run testing/eas_acls_test.py --verbose --buffer
coverage run testing/errorsrecover_test.py --verbose --buffer
coverage run testing/filename_mapping_test.py --verbose --buffer
coverage run testing/fs_abilities_test.py --verbose --buffer
coverage run testing/hardlink_test.py --verbose --buffer
coverage run testing/hash_test.py --verbose --buffer
coverage run testing/increment_test.py --verbose --buffer
coverage run testing/iterfile_test.py --verbose --buffer
coverage run testing/kill_test.py --verbose --buffer
coverage run testing/librsync_test.py --verbose --buffer
coverage run testing/location_lock_test.py --verbose --buffer
coverage run testing/location_map_filenames_test.py --verbose --buffer
coverage run testing/location_map_hardlinks_test.py --verbose --buffer
coverage run testing/log_test.py --verbose --buffer
coverage run testing/longname_test.py --verbose --buffer
coverage run testing/metadata_test.py --verbose --buffer
coverage run testing/rdiff_test.py --verbose --buffer
coverage run testing/rdiffbackupdelete_test.py --verbose --buffer
coverage run testing/readonly_actions_test.py --verbose --buffer
coverage run testing/regress_test.py --verbose --buffer
coverage run testing/restore_test.py --verbose --buffer
coverage run testing/robust_test.py --verbose --buffer
coverage run testing/rorpiter_test.py --verbose --buffer
coverage run testing/rpath_test.py --verbose --buffer
coverage run testing/security_test.py --verbose --buffer
coverage run testing/selection_test.py --verbose --buffer
coverage run testing/setconnections_test.py --verbose --buffer
coverage run testing/statistics_test.py --verbose --buffer
coverage run testing/time_test.py --verbose --buffer
coverage run testing/user_group_test.py --verbose --buffer
coverage run testing/utils_simpleps_test.py --verbose --buffer
# can only work on OS/X TODO later
# coverage run testing/resourcefork_macostest.py
# combine all coverage results and show the summary
coverage combine
coverage report
[testenv:check-static]
deps = -r{toxinidir}/requs/test.txt
commands_pre=
commands =
flake8 setup.py src testing tools
black --check --diff setup.py src testing tools
bandit -r -ll -c pyproject.toml ./setup.py src testing tools
mypy --non-interactive --install-types
[flake8]
ignore =
# line too long (86 > 79 characters)
E501
# line break before binary operator
W503
# whitespace before ':' (due to black)
E203
filename =
*.py,
src/rdiff-backup*
exclude =
.git
.tox
.tox.root
__pycache__
build
max-complexity = 20
[coverage:run]
parallel = True
source =
rdiff_backup
rdiffbackup
[coverage:report]
skip_empty = True
fail_under = 85
sort = Cover