From 672ef82aca99605343710a2fb2d0fd7307dd7816 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Fri, 11 Mar 2011 19:53:05 -0500 Subject: [PATCH] Altered Makefile to support parallel tests --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index a277102..0cf386c 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,9 @@ PATH_BROWSER_TEST=${PATH_TOOLS}/browser-test.html COMBINE=${PATH_TOOLS}/combine +TESTS_JS := $(shell find "./test" -name 'test-*.js') +TESTS_SHELL := $(shell find "./test" -name 'test-[^\.]*') + .PHONY: test @@ -25,16 +28,13 @@ combine: mkbuild cp ${PATH_BROWSER_TEST} ${PATH_BUILD} # run tests -test: default - for test in `find ./test -name 'test-*.js'`; do \ - node $${test}; \ - done; \ - - for test in `find ./test -regex '.*/test-[^\.]*'`; do \ - ./$$test; \ - done; +test: default $(TESTS_JS) $(TESTS_SHELL) +test-%.js: default + node $@ +test-%: default + ./$@ # clean up build dir clean: rm -rf ${PATH_BUILD} - +