build/pymake/tests/parallel-native.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build/pymake/tests/parallel-native.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +#T commandline: ['-j2']
     1.5 +
     1.6 +# ensure that calling python commands doesn't block other targets
     1.7 +ifndef SLEEP
     1.8 +SLEEP := sleep
     1.9 +endif
    1.10 +
    1.11 +PRINTF = printf "$@:0:" >>results
    1.12 +EXPECTED = target2:0:target1:0:
    1.13 +
    1.14 +all:: target1 target2
    1.15 +	cat results
    1.16 +	test "$$(cat results)" = "$(EXPECTED)"
    1.17 +	@echo TEST-PASS
    1.18 +
    1.19 +target1:
    1.20 +	$(SLEEP) 0.1
    1.21 +	$(PRINTF)
    1.22 +
    1.23 +target2:
    1.24 +	$(PRINTF)

mercurial