diff --git a/ports/minimal/Makefile b/ports/minimal/Makefile index 5ba6514c9e..0e875cc249 100644 --- a/ports/minimal/Makefile +++ b/ports/minimal/Makefile @@ -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 $< > $@ diff --git a/ports/powerpc/Makefile b/ports/powerpc/Makefile index 12ae485bb8..0986fd13eb 100644 --- a/ports/powerpc/Makefile +++ b/ports/powerpc/Makefile @@ -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 $< > $@ diff --git a/ports/powerpc/frozentest.mpy b/ports/powerpc/frozentest.mpy deleted file mode 100644 index 99581617ac..0000000000 Binary files a/ports/powerpc/frozentest.mpy and /dev/null differ diff --git a/ports/powerpc/frozentest.py b/ports/powerpc/frozentest.py deleted file mode 100644 index 78cdd60bf0..0000000000 --- a/ports/powerpc/frozentest.py +++ /dev/null @@ -1,7 +0,0 @@ -print("uPy") -print("a long string that is not interned") -print("a string that has unicode αβγ chars") -print(b"bytes 1234\x01") -print(123456789) -for i in range(4): - print(i) diff --git a/tests/frozen/README.md b/tests/frozen/README.md new file mode 100644 index 0000000000..bd786d5a3c --- /dev/null +++ b/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. diff --git a/ports/minimal/frozentest.mpy b/tests/frozen/frozentest.mpy similarity index 100% rename from ports/minimal/frozentest.mpy rename to tests/frozen/frozentest.mpy diff --git a/ports/minimal/frozentest.py b/tests/frozen/frozentest.py similarity index 100% rename from ports/minimal/frozentest.py rename to tests/frozen/frozentest.py diff --git a/tools/ci.sh b/tools/ci.sh index 9c670b7be5..9963f7796c 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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