build/pymake/tests/parallel-toserial.mk

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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