From d5ce916f267ae7d948afdd73cb8ccfd3bd839c45 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Wed, 16 Apr 2014 20:38:16 +0100 Subject: [PATCH 1/2] Add 'test' target to unix/Makefile In conjunction with #504 this allows you to do things like: ```shell make -C unix clean && make -C unix test CC=gcc-4.7 ``` all from the top-level micropython directory :-) Something similar could probably be done for windows/Makefile too, but I don't have a cygwin setup to test with. --- unix/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unix/Makefile b/unix/Makefile index 07a75f7adb..d9fa5e7566 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -67,3 +67,8 @@ OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) include ../py/mkrules.mk +.PHONY: test + +test: $(PROG) ../tests/run-tests + $(eval DIRNAME=$(notdir $(CURDIR))) + cd ../tests && MICROPY_MP_PY=../$(DIRNAME)/$(PROG) ./run-tests From e02b77bf6b84b7f3149071c8aeadaffe173cb368 Mon Sep 17 00:00:00 2001 From: Andrew Scheller Date: Thu, 17 Apr 2014 01:26:25 +0100 Subject: [PATCH 2/2] Updated the envvar used by ./run-tests As discussed in #504 --- unix/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/Makefile b/unix/Makefile index d9fa5e7566..c9509b9f0d 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -71,4 +71,4 @@ include ../py/mkrules.mk test: $(PROG) ../tests/run-tests $(eval DIRNAME=$(notdir $(CURDIR))) - cd ../tests && MICROPY_MP_PY=../$(DIRNAME)/$(PROG) ./run-tests + cd ../tests && MICROPY_MICROPYTHON=../$(DIRNAME)/$(PROG) ./run-tests