build/pymake/tests/parallel-toserial.mk

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 #T commandline: ['-j4']
michael@0 2
michael@0 3 # Test that -j1 in a submake has the proper effect.
michael@0 4
michael@0 5 define SLOWCMD
michael@0 6 printf "$@:0:" >>$(RFILE)
michael@0 7 sleep 0.5
michael@0 8 printf "$@:1:" >>$(RFILE)
michael@0 9 endef
michael@0 10
michael@0 11 all: p1 p2
michael@0 12 subtarget: s1 s2
michael@0 13
michael@0 14 p1 p2: RFILE = presult
michael@0 15 s1 s2: RFILE = sresult
michael@0 16
michael@0 17 p1 s1:
michael@0 18 $(SLOWCMD)
michael@0 19
michael@0 20 p2 s2:
michael@0 21 sleep 0.1
michael@0 22 $(SLOWCMD)
michael@0 23
michael@0 24 all:
michael@0 25 $(MAKE) -j1 -f $(TESTPATH)/parallel-toserial.mk subtarget
michael@0 26 printf "presult: %s\n" "$$(cat presult)"
michael@0 27 test "$$(cat presult)" = "p1:0:p2:0:p1:1:p2:1:"
michael@0 28 printf "sresult: %s\n" "$$(cat sresult)"
michael@0 29 test "$$(cat sresult)" = "s1:0:s1:1:s2:0:s2:1:"
michael@0 30 @echo TEST-PASS
michael@0 31

mercurial