-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
119 lines (97 loc) · 2.98 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
[tox]
envlist = dev,bmap,emmc,sdmmc,qspi,deploy,clean
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:{dev,bmap,emmc,sdmmc,qspi,deploy}]
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
emmc: Build the (wic) emmc boot target
sdmmc: Build the default (wic) sdmmc boot target
bmap: Burn the sdmmc wic image to sdcard device (default: {env:DISK})
qspi: Clean and build the qspi boot target
deploy: Deploy qspi build products to sdcard
setenv =
IPP = {env:IPP:}
DEBUG = {env:DEBUG:}
DEPLOY_DIR = {env:DEPLOY_DIR:build/tmp-glibc/deploy/images/{env:MACHINE}}
DISK = {env:DISK:/dev/mmcblk0}
IMAGE = {env:IMAGE:devel-image-minimal}
MACHINE = {env:MACHINE:me-aa1-270-2i2-d11e-nfx3}
UBOOT_CONFIG = {env:UBOOT_CONFIG:{envname}}
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/bmap-tools.git@pep517
pyserv @ git+https://github.com/sarnold/pyserv.git@master
commands_pre =
bash -c '[[ -e layers/meta-user-aa1 ]] || ( mkdir -p layers && git clone https://github.com/VCTLabs/meta-user-aa1.git -b oe-mickledore layers/meta-user-aa1 )'
commands =
dev: kas checkout layers/meta-user-aa1/kas/{posargs:"sysvinit"}.yaml
qspi: bash -c 'rm -rf build/tmp*'
{qspi,sdmmc,emmc}: kas shell layers/meta-user-aa1/kas/{posargs:"sysvinit"}.yaml -c 'PACKAGE_FEED_IP_PORT={env:IPP} UBOOT_CONFIG={env:UBOOT_CONFIG} bitbake {env:IMAGE}'
bmap: bmaptool copy {env:DEPLOY_DIR}{/}{env:IMAGE}-{env:MACHINE}.wic {env:DISK}
deploy: bash scripts/populate_sdcard.sh {env:DISK} {env:DEPLOY_DIR}
commands_post =
dev: bash -c 'sudo setcap cap_net_bind_service+ep {envdir}/bin/python'
dev: bash -c 'sudo setcap cap_net_bind_service+ep {envdir}/bin/python3'
[testenv:lint]
skip_install = true
always_copy = False
allowlist_externals =
bash
deps =
{[base]deps}
kas
reuse
commands =
reuse lint
[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
allowlist_externals =
bash
deps =
pip>=21.1
commands =
bash -c 'rm -rf __pycache__ qspi/ build/tmp*'