Skip to content

Commit 6b661ca

Browse files
agattidpgeorge
authored andcommitted
github/workflows: Test mpy-cross debug emitter.
This commit adds a new workflow step to the CI, to test the debug emitter provided by mpy-cross. The checks being done are limited to make sure that the debug emitter does not crash and emits opcodes for a simple test file that is guaranteed to work for all configurations. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent 65f994e commit 6b661ca

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/mpy_format.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
paths:
77
- '.github/workflows/*.yml'
88
- 'examples/**'
9+
- 'mpy-cross/**'
10+
- 'py/**'
911
- 'tests/**'
1012
- 'tools/**'
1113

@@ -22,3 +24,5 @@ jobs:
2224
run: tools/ci.sh mpy_format_setup
2325
- name: Test mpy-tool.py
2426
run: tools/ci.sh mpy_format_test
27+
- name: Test mpy-cross debug emitter
28+
run: tools/ci.sh mpy_cross_debug_emitter

tools/ci.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@ function ci_mpy_format_test {
173173
$micropython ./tools/mpy-tool.py -x -d examples/natmod/features1/features1.mpy
174174
}
175175

176+
function ci_mpy_cross_debug_emitter {
177+
make ${MAKEOPTS} -C mpy-cross
178+
mpy_cross=./mpy-cross/build/mpy-cross
179+
180+
# Make sure the debug emitter does not crash or fail for simple files
181+
$mpy_cross -X emit=native -march=debug ./tests/basics/0prelim.py | \
182+
grep -E "ENTRY|EXIT" | wc -l | grep "^2$"
183+
}
184+
176185
########################################################################################
177186
# ports/cc3200
178187

0 commit comments

Comments
 (0)