summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-03-11 17:03:01 +1100
committerDamien George <damien.p.george@gmail.com>2020-03-11 20:20:18 +1100
commit359213fbe135417a87c149553e89ac3fb2b57849 (patch)
tree9b5f42f24eee41f9d35360169fb1d4189e940d7a
parent86bfabec11456b892fadd47cecab12157bbd8c0e (diff)
unix/Makefile: Detect and pass thru mpy-cross flags when running tests.
-rw-r--r--ports/unix/Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index 1e0a38ca2..9deaba299 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -200,6 +200,12 @@ ifneq ($(FROZEN_MANIFEST)$(FROZEN_DIR),)
CFLAGS += -DMICROPY_MODULE_FROZEN_STR
endif
+ifeq ($(MICROPY_FORCE_32BIT),1)
+RUN_TESTS_MPY_CROSS_FLAGS = --mpy-cross-flags='-mcache-lookup-bc -march=x86'
+else
+RUN_TESTS_MPY_CROSS_FLAGS = --mpy-cross-flags='-mcache-lookup-bc'
+endif
+
include $(TOP)/py/mkrules.mk
.PHONY: test test_full
@@ -213,8 +219,8 @@ test_full: $(PROG) $(TOP)/tests/run-tests
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests -d thread
cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --emit native
- cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy -d basics float micropython
- cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy --emit native -d basics float micropython
+ cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) -d basics float micropython
+ cd $(TOP)/tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests --via-mpy $(RUN_TESTS_MPY_CROSS_FLAGS) --emit native -d basics float micropython
cat $(TOP)/tests/basics/0prelim.py | ./$(PROG) | grep -q 'abc'
test_gcov: test_full