Skip to content

Commit 00ec1b4

Browse files
committed
Added github action to test custom TLV
1 parent e9d65b3 commit 00ec1b4

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Custom TLV - test with simulator target
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
custom_tlv_simulator_tests:
11+
runs-on: ubuntu-20.04
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: true
17+
18+
- name: make clean
19+
run: |
20+
make distclean
21+
22+
- name: Select config
23+
run: |
24+
cp config/examples/sim.config .config
25+
26+
- name: Build tools
27+
run: |
28+
make -C tools/keytools && make -C tools/bin-assemble
29+
30+
- name: Build wolfboot.elf and test-app/image.elf
31+
run: |
32+
make clean && make
33+
34+
- name: Sign the image with a custom TLV
35+
run: |
36+
tools/keytools/sign --ed25519 --custom-tlv-buffer 0x0034 AABBCCDDEEFF0011223344 test-app/image.elf wolfboot_signing_private_key.der 1
37+
38+
- name: Re-assemble the internal_flash.dd image file
39+
run: |
40+
make assemble_internal_flash.dd
41+
42+
- name: Run get_tlv simulator test
43+
run: |
44+
[ x`./wolfboot.elf get_tlv 2>/dev/null| tail -1` = xAABBCCDDEEFF0011223344 ]

test-app/app_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int do_cmd(const char *cmd)
8989
/* From here, the value 0xAABBCCDD is at ptr */
9090
printf("TLV 0x%x:\n", tlv);
9191
for (i=0; i<size; i++) {
92-
printf(" 0x%02X ", ptr[i]);
92+
printf("%02X", ptr[i]);
9393
}
9494
printf("\n");
9595
}

0 commit comments

Comments
 (0)