summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAndrew Scheller <github@loowis.durge.org>2014-04-16 20:38:16 +0100
committerAndrew Scheller <github@loowis.durge.org>2014-04-16 20:38:16 +0100
commitd5ce916f267ae7d948afdd73cb8ccfd3bd839c45 (patch)
tree0d0be12b32f5bd64e4207be1032f5127b23ef639
parenta1c67206c88fe0c0712c99d6181cff9b99b07b33 (diff)
downloadmicropython-d5ce916f267ae7d948afdd73cb8ccfd3bd839c45.tar.gz
micropython-d5ce916f267ae7d948afdd73cb8ccfd3bd839c45.zip
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.
-rw-r--r--unix/Makefile5
1 files changed, 5 insertions, 0 deletions
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