build/pymake/tests/parallel-submake.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/pymake/tests/parallel-submake.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,17 @@
     1.4 +#T commandline: ['-j2']
     1.5 +
     1.6 +# A submake shouldn't return control to the parent until it has actually finished doing everything.
     1.7 +
     1.8 +all:
     1.9 +	-$(MAKE) -f $(TESTPATH)/parallel-submake.mk subtarget
    1.10 +	cat results
    1.11 +	test "$$(cat results)" = "0123"
    1.12 +	@echo TEST-PASS
    1.13 +
    1.14 +subtarget: succeed-slowly fail-quickly
    1.15 +
    1.16 +succeed-slowly:
    1.17 +	printf 0 >>results; sleep 1; printf 1 >>results; sleep 1; printf 2 >>results; sleep 1; printf 3 >>results
    1.18 +
    1.19 +fail-quickly:
    1.20 +	exit 1

mercurial