Altered Makefile to support parallel tests
parent
caddb2b362
commit
672ef82aca
16
Makefile
16
Makefile
|
@ -7,6 +7,9 @@ PATH_BROWSER_TEST=${PATH_TOOLS}/browser-test.html
|
||||||
|
|
||||||
COMBINE=${PATH_TOOLS}/combine
|
COMBINE=${PATH_TOOLS}/combine
|
||||||
|
|
||||||
|
TESTS_JS := $(shell find "./test" -name 'test-*.js')
|
||||||
|
TESTS_SHELL := $(shell find "./test" -name 'test-[^\.]*')
|
||||||
|
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
|
|
||||||
|
@ -25,14 +28,11 @@ combine: mkbuild
|
||||||
cp ${PATH_BROWSER_TEST} ${PATH_BUILD}
|
cp ${PATH_BROWSER_TEST} ${PATH_BUILD}
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
test: default
|
test: default $(TESTS_JS) $(TESTS_SHELL)
|
||||||
for test in `find ./test -name 'test-*.js'`; do \
|
test-%.js: default
|
||||||
node $${test}; \
|
node $@
|
||||||
done; \
|
test-%: default
|
||||||
|
./$@
|
||||||
for test in `find ./test -regex '.*/test-[^\.]*'`; do \
|
|
||||||
./$$test; \
|
|
||||||
done;
|
|
||||||
|
|
||||||
# clean up build dir
|
# clean up build dir
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in New Issue