-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
137 lines (114 loc) · 3.23 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
127
128
129
130
131
132
133
134
135
136
137
[tox]
envlist = dev,bmap,sdcard,sync,do
skip_missing_interpreters = true
isolated_build = true
skipsdist = true
# uncomment the following line if your tox version is still 3.x
#min_version = 4.3.3
[base]
deps =
pip>=22.1
[testenv]
skip_install = true
install_command = pip install {opts} {packages}
always_copy = True
[testenv:{sync,do}]
always_copy = False
envdir = {toxinidir}/.sync
# these 2 tox env cmds share a virtual env using the following plugin
# https://github.com/masenf/tox-ignore-env-name-mismatch
runner = ignore_env_name_mismatch
description =
do: Run a cmd following "--" from the sync .env, e.g. "tox -e do -- repolite --show"
sync: Install repolite and use it for cloning workflow deps
passenv =
REPO_CFG
DISPLAY
XAUTHORITY
HOME
USERNAME
USER
CI
LANG
LC_COLLATE
SSH_*
GID
UID
XDG_*
PIP_DOWNLOAD_CACHE
PYTHONIOENCODING
deps =
# logging_tree
{[base]deps}
build
repolite @ https://github.com/sarnold/repolite/releases/download/0.6.2/repolite-0.6.2-py3-none-any.whl
commands =
sync: repolite {posargs:--quiet}
do: {posargs:python -c 'print("No cmd provided")'}
[testenv:{dev,bmap,sdcard}]
envdir = {toxinidir}/.venv
# these tox env cmds share a virtual env using the following plugin
# https://github.com/masenf/tox-ignore-env-name-mismatch as toxfile.py
runner = ignore_env_name_mismatch
allowlist_externals =
bash
description =
dev: Create a kas build virtual environment with managed deps
sdcard: Build the (wic) sdcard boot target
bmap: Burn the wic image to sdcard device (default: {env:DISK})
setenv =
IPP = {env:IPP:}
CORE = {env:CORE:oe}
DEBUG = {env:DEBUG:}
KAS_MACHINE = {env:KAS_MACHINE:raspberrypi3-64}
DEPLOY_DIR = {env:DEPLOY_DIR:build/tmp-glibc/deploy/images/{env:KAS_MACHINE}}
DISK = {env:DISK:/dev/mmcblk0}
IMAGE = {env:IMAGE:rpi-test-image}
PKGTYPE = {env:PKGTYPE:ipk}
passenv =
DISPLAY
XAUTHORITY
GID
UID
HOME
USERNAME
USER
CI
LANG
LC_COLLATE
SSH_*
XDG_*
PYTHONIOENCODING
PIP_DOWNLOAD_CACHE
deps =
# logging_tree
{[base]deps}
kas
bmaptool @ git+https://github.com/sarnold/bmaptool.git@pep517
pyserv @ git+https://github.com/sarnold/pyserv.git@master
commands =
dev: kas checkout layers/meta-small-arm-extra/kas/{env:CORE}/{posargs:"sysvinit"}.yaml
sdcard: kas shell layers/meta-small-arm-extra/kas/{env:CORE}/{posargs:"sysvinit"}.yaml -c 'PACKAGE_FEED_IP_PORT={env:IPP} PACKAGE_FEED_TYPE={env:PKGTYPE} bitbake {env:IMAGE}'
bmap: bmaptool copy {env:DEPLOY_DIR}{/}{env:IMAGE}-{env:KAS_MACHINE}.wic {env:DISK}
commands_post =
dev: bash -c 'sudo setcap cap_net_bind_service+ep {envpython}'
dev: bash -c 'sudo setcap cap_net_bind_service+ep {envpython}3'
[testenv:changes]
skip_install = true
always_copy = False
allowlist_externals =
bash
deps =
{[base]deps}
gitchangelog @ https://github.com/sarnold/gitchangelog/releases/download/3.2.0/gitchangelog-3.2.0-py3-none-any.whl
commands =
bash -c 'gitchangelog {posargs} > CHANGELOG.rst'
[testenv:clean]
skip_install = true
always_copy = False
allowlist_externals =
bash
deps =
pip>=21.1
commands =
bash -c 'rm -rf __pycache__ build/tmp*'