-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathsnapcraft.yaml
More file actions
131 lines (126 loc) · 3.9 KB
/
snapcraft.yaml
File metadata and controls
131 lines (126 loc) · 3.9 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
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
name: checkbox-ce-oem
summary: Checkbox CE OEM test runner and public providers for 24.04 classic
description: "Checkbox CE OEM test runner and public providers for 24.04 classic"
confinement: classic
grade: stable
version: '1.0-noble'
base: core24
apps:
checkbox-cli:
command-chain: [bin/wrapper_local]
command: bin/checkbox-cli-wrapper
configure:
command-chain: [bin/wrapper_local]
command: bin/configure
remote-slave:
command-chain: [bin/wrapper_local]
command: bin/checkbox-cli-wrapper slave
daemon: simple
restart-condition: on-failure
shell:
command-chain: [bin/wrapper_local]
command: bin/shell-wrapper
test-runner:
command-chain: [bin/wrapper_local]
command: bin/test-runner
passthrough:
hooks:
configure:
command-chain: [bin/wrapper_local]
parts:
checkbox-provider-ce-oem:
plugin: dump
source: checkbox-provider-ce-oem
source-type: local
stage-packages:
- mtd-utils
- u-boot-tools
- v4l-utils
- device-tree-compiler
- linuxptp
- snmp
- python3-rpyc
- gpsd
override-prime: |
craftctl default
override-build: |
export PYTHONPATH=/snap/checkbox24/current/lib/python3.12/site-packages/
for path in $(find "/snap/checkbox24/current/providers/" -mindepth 1 -maxdepth 1 -type d); do export PROVIDERPATH=$path${PROVIDERPATH:+:$PROVIDERPATH}; done
python3 manage.py validate
python3 manage.py build
python3 manage.py install --layout=relocatable --prefix=/providers/checkbox-provider-ce-oem --root="$CRAFT_PART_INSTALL"
build-snaps:
- checkbox24
build-packages:
- python3-dev
- python3-jinja2
- python3-packaging
- python3-urwid
- python3-xlsxwriter
- python3-requests-oauthlib
input-pcspkr:
plugin: nil
after: [checkbox-provider-ce-oem]
build-packages:
- gcc
- libc6-dev
override-build: |
mkdir -p ${CRAFT_PART_INSTALL}/usr/bin
gcc ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem/src/input-pcspkr.c -o ${CRAFT_PART_INSTALL}/usr/bin/beep
xtest:
plugin: dump
after: [checkbox-provider-ce-oem]
source: https://github.com/OP-TEE/optee_test.git
source-type: git
build-snaps:
- checkbox24
build-packages:
- jq
- python3-requests-unixsocket
build-environment:
- PART_DEST: ${CRAFT_PART_INSTALL}/providers/checkbox-provider-ce-oem/data/
- PROVIDER_SRC: ${CRAFT_PROJECT_DIR}/checkbox-provider-ce-oem
- PYTHONPATH: /snap/checkbox24/current/lib/python3.12/site-packages/
override-pull: |
snapcraftctl pull
cp ${PROVIDER_SRC}/data/xtest_supported_version.json .
cp ${PROVIDER_SRC}/bin/optee_helper.py .
cp ${PROVIDER_SRC}/bin/look_up_xtest.py .
cp ${PROVIDER_SRC}/bin/xtest_install_ta.py .
override-build: |
for ver in `cat xtest_supported_version.json | jq -r .xtest_suite_tag[]`; do
git checkout $ver
python3 optee_helper.py parse_xtest_src $ver
done
mkdir -p ${PART_DEST}
cp -v optee-test-*.json ${PART_DEST}
spidev-test:
plugin: make
source: https://github.com/torvalds/linux.git
source-type: git
source-depth: 1
source-subdir: tools/spi
parts-meta-info:
plugin: nil
override-build: |
craftctl default
for p in `ls -d ../../*`; do
if [ -d $p/src ]; then
(cd $p/src
if [ -d $p/src/.git ]; then
(echo `basename $p`\: && git show --pretty=format:"%h%d %aN %ci%n%s%n" -q ; echo ) >> $CRAFT_PART_INSTALL/parts_meta_info
fi # for additional `source-type` support, elif them here
)
fi
done
after: [checkbox-provider-ce-oem]
launchers:
plugin: dump
source: launchers/
build-attributes: [no-patchelf]
organize:
'*': bin/
config-variables:
plugin: dump
source: config/
build-attributes: [no-patchelf]