Skip to content

Commit 0124bd5

Browse files
agattidpgeorge
authored andcommitted
qemu/Makefile: Do not mount ROMFS partition on non-test targets.
This commit fixes a mistake introduced in micropython#19051, where the test ROMFS partition would get mounted even on targets that do not need it to function (ie. `repl`). Now the ROMFS image is mounted only for test targets: `test`, `test_full`, and `test_natmod`. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 05740fd commit 0124bd5

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

ports/qemu/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,13 +224,12 @@ endif
224224

225225
ROMFS_TEST_IMAGE = assets/random_romfs.bin
226226

227+
# Mount the ROMFS test image specifically for test runs (if there is a slot 0).
227228
ifneq ($(MICROPY_HW_ROMFS_PART0_START),)
228-
ifeq ($(QEMU_ROMFS_IMG0),)
229-
QEMU_ARGS += -device loader,file=$(ROMFS_TEST_IMAGE),addr=$(MICROPY_HW_ROMFS_PART0_START),force-raw=on
230-
endif
229+
QEMU_TEST_ARGS = -device loader,file=$(ROMFS_TEST_IMAGE),addr=$(MICROPY_HW_ROMFS_PART0_START),force-raw=on
231230
endif
232231

233-
RUN_TESTS_FULL_ARGS = -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) -serial pty -kernel ../ports/qemu/$<" $(RUN_TESTS_ARGS)
232+
RUN_TESTS_FULL_ARGS = -t execpty:"$(QEMU_SYSTEM) $(QEMU_ARGS) $(QEMU_TEST_ARGS) -serial pty -kernel ../ports/qemu/$<" $(RUN_TESTS_ARGS)
234233

235234
################################################################################
236235
# Source files and libraries

0 commit comments

Comments
 (0)