-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
117 lines (100 loc) · 5.41 KB
/
.gitlab-ci.yml
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
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
stages:
- build
- test
build_mfg_tool:
stage: build
image:
name: python:3.9-bullseye
entrypoint: [ '/bin/bash', '-c', 'ln -snf /bin/bash /bin/sh && /bin/bash -c $0' ]
tags:
- build
artifacts:
paths:
- mfg_tool/dist/
expire_in: 1 week
script:
- cd mfg_tool
- python3 -m pip install --upgrade pip build setuptools
- python3 -m build
test_mfg_tool:
stage: test
image: python:3.9-bullseye
tags:
- build
needs:
- build_mfg_tool
script:
- cd mfg_tool
- python3 -m pip install --upgrade pip build setuptools
- python3 -m pip install dist/esp_matter_mfg_tool*.whl
- export PATH=$PATH:$PWD/test_data
- |
echo "Test 1 - factory partition with generated DAC"
esp-matter-mfg-tool -cn "My bulb" -v 0xFFF2 -p 0x8001 --pai \
-k test_data/Chip-Test-PAI-FFF2-8001-Key.pem \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der &> /tmp/output.txt
out_path=$(cat /tmp/output.txt | grep 'Generated output files at:' | awk -F'Generated output files at: ' '{print $2}')
chip-cert validate-att-cert -d $out_path/internal/DAC_cert.pem \
-i out/fff2_8001/staging/pai_cert.der \
-a test_data/Chip-Test-PAA-NoVID-Cert.pem
# Test with different vendor ID and product ID with width less than 4 bytes
- |
echo "Test 2 - factory partition with generated PAI and DAC and VID/PID with width less than 4 bytes"
esp-matter-mfg-tool -v 0x4d2 -p 0xb --paa \
-c test_data/Chip-Test-PAA-NoVID-Cert.pem \
-k test_data/Chip-Test-PAA-NoVID-Key.pem &> /tmp/output.txt
out_path=$(cat /tmp/output.txt | grep 'Generated output files at:' | awk -F'Generated output files at: ' '{print $2}')
chip-cert validate-att-cert -d $out_path/internal/DAC_cert.pem \
-i out/4d2_b/staging/pai_cert.der \
-a test_data/Chip-Test-PAA-NoVID-Cert.pem
- |
echo "Test 3 - factory partition with generated DAC and dac-in-secure-cert"
esp-matter-mfg-tool -cn "My bulb" -v 0xFFF2 -p 0x8001 --pai \
-k test_data/Chip-Test-PAI-FFF2-8001-Key.pem \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der \
--dac-in-secure-cert --target esp32 &> /tmp/output.txt
out_path=$(cat /tmp/output.txt | grep 'Generated output files at:' | awk -F'Generated output files at: ' '{print $2}')
chip-cert validate-att-cert -d $out_path/internal/DAC_cert.pem \
-i out/fff2_8001/staging/pai_cert.der \
-a test_data/Chip-Test-PAA-NoVID-Cert.pem
- |
echo "Test 4 - factory partition with with generated DAC for 5 devices"
esp-matter-mfg-tool -n 5 -cn "My bulb" -v 0xFFF2 -p 0x8001 --pai \
-k test_data/Chip-Test-PAI-FFF2-8001-Key.pem \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der
- |
echo "Test 5 - factory partition with external DAC"
esp-matter-mfg-tool -cn "My Bulb" -v 0xFFF2 -p 0x8001 --pai \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der \
--dac-key test_data/DAC_key.pem \
--dac-cert test_data/DAC_cert.pem
- |
echo "Test 6 - factory partition with rotating device id"
esp-matter-mfg-tool -cn "My bulb" -v 0xFFF2 -p 0x8001 --pai \
-k test_data/Chip-Test-PAI-FFF2-8001-Key.pem \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der \
--passcode 20202021 --discriminator 3840 \
--enable-rotating-device-id \
--rd-id-uid d2f351f57bb9387445a5f92a601d1c14 &> /tmp/output.txt
out_path=$(cat /tmp/output.txt | grep 'Generated output files at:' | awk -F'Generated output files at: ' '{print $2}')
chip-cert validate-att-cert -d $out_path/internal/DAC_cert.pem \
-i out/fff2_8001/staging/pai_cert.der \
-a test_data/Chip-Test-PAA-NoVID-Cert.pem
- |
echo "Test 7 - factory partition with extra nvs key config and value"
esp-matter-mfg-tool -cn "My bulb" -v 0xFFF2 -p 0x8001 --pai \
-k test_data/Chip-Test-PAI-FFF2-8001-Key.pem \
-c test_data/Chip-Test-PAI-FFF2-8001-Cert.pem \
-cd test_data/Chip-Test-CD-FFF2-8001.der \
--csv test_data/extra_nvs_key_config.csv \
--mcsv test_data/extra_nvs_key_value.csv &> /tmp/output.txt
- |
echo "Test 8 - factory partition without DAC"
esp-matter-mfg-tool -v 0xFFF2 -p 0x8001 -cd test_data/Chip-Test-CD-FFF2-8001.der