Skip to content

Commit

Permalink
tests/frozen: Move frozentest.mpy from ports/ to tests/.
Browse files Browse the repository at this point in the history
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 <jim.mussared@gmail.com>
  • Loading branch information
jimmo authored and dpgeorge committed Sep 19, 2022
1 parent 9ae8d38 commit 6ecdf1a
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion ports/minimal/Makefile
Expand Up @@ -81,7 +81,7 @@ else
all: $(BUILD)/firmware.elf
endif

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

Expand Down
2 changes: 1 addition & 1 deletion ports/powerpc/Makefile
Expand Up @@ -50,7 +50,7 @@ OBJ += $(BUILD)/head.o

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

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

Expand Down
Binary file removed ports/powerpc/frozentest.mpy
Binary file not shown.
7 changes: 0 additions & 7 deletions ports/powerpc/frozentest.py

This file was deleted.

2 changes: 2 additions & 0 deletions tests/frozen/README.md
@@ -0,0 +1,2 @@
This is a .mpy built against the current .mpy version that can be used to test
freezing without a dependency on mpy-cross.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/ci.sh
Expand Up @@ -75,8 +75,8 @@ function ci_mpy_format_setup {

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

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

0 comments on commit 6ecdf1a

Please sign in to comment.