Skip to content

Commit 6ecdf1a

Browse files
jimmodpgeorge
authored andcommitted
tests/frozen: Move frozentest.mpy from ports/ to tests/.
frozentest.mpy was previously duplicated in ports/minimal and ports/powerpc. This needs to be re-generated on every .mpy version increase, so might as well just have a single copy of it. Signed-off-by: Jim Mussared <[email protected]>
1 parent 9ae8d38 commit 6ecdf1a

File tree

8 files changed

+6
-11
lines changed

8 files changed

+6
-11
lines changed

ports/minimal/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ else
8181
all: $(BUILD)/firmware.elf
8282
endif
8383

84-
$(BUILD)/_frozen_mpy.c: frozentest.mpy $(BUILD)/genhdr/qstrdefs.generated.h
84+
$(BUILD)/_frozen_mpy.c: $(TOP)/tests/frozen/frozentest.mpy $(BUILD)/genhdr/qstrdefs.generated.h
8585
$(ECHO) "MISC freezing bytecode"
8686
$(Q)$(TOP)/tools/mpy-tool.py -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h -mlongint-impl=none $< > $@
8787

ports/powerpc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ OBJ += $(BUILD)/head.o
5050

5151
all: $(BUILD)/firmware.elf $(BUILD)/firmware.map $(BUILD)/firmware.bin
5252

53-
$(BUILD)/_frozen_mpy.c: frozentest.mpy $(BUILD)/genhdr/qstrdefs.generated.h
53+
$(BUILD)/_frozen_mpy.c: $(TOP)/tests/frozen/frozentest.mpy $(BUILD)/genhdr/qstrdefs.generated.h
5454
$(ECHO) "MISC freezing bytecode"
5555
$(Q)$(MPY_TOOL) -f -q $(BUILD)/genhdr/qstrdefs.preprocessed.h -mlongint-impl=mpz $< > $@
5656

ports/powerpc/frozentest.mpy

-196 Bytes
Binary file not shown.

ports/powerpc/frozentest.py

-7
This file was deleted.

tests/frozen/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This is a .mpy built against the current .mpy version that can be used to test
2+
freezing without a dependency on mpy-cross.
File renamed without changes.
File renamed without changes.

tools/ci.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ function ci_mpy_format_setup {
7575

7676
function ci_mpy_format_test {
7777
# Test mpy-tool.py dump feature on bytecode
78-
python2 ./tools/mpy-tool.py -xd ports/minimal/frozentest.mpy
79-
python3 ./tools/mpy-tool.py -xd ports/minimal/frozentest.mpy
78+
python2 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
79+
python3 ./tools/mpy-tool.py -xd tests/frozen/frozentest.mpy
8080

8181
# Test mpy-tool.py dump feature on native code
8282
make -C examples/natmod/features1

0 commit comments

Comments
 (0)