]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/test/core_parallel_actions.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / tools / build / test / core_parallel_actions.py
1 #!/usr/bin/python
2
3 # Copyright 2006 Rene Rivera.
4 # Copyright 2011 Steven Watanabe
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
7
8 import BoostBuild
9
10 t = BoostBuild.Tester(pass_toolset=0, pass_d0=False)
11
12 t.write("sleep.bat", """\
13 ::@timeout /T %1 /NOBREAK >nul
14 @ping 127.0.0.1 -n 2 -w 1000 >nul
15 @ping 127.0.0.1 -n %1 -w 1000 >nul
16 @exit /B 0
17 """)
18
19 t.write("file.jam", """\
20 if $(NT)
21 {
22 actions sleeper
23 {
24 echo [$(<:S)] 0
25 call sleep.bat 1
26 echo [$(<:S)] 1
27 call sleep.bat 1
28 echo [$(<:S)] 2
29 call sleep.bat $(<:B)
30 }
31 }
32 else
33 {
34 actions sleeper
35 {
36 echo "[$(<:S)] 0"
37 sleep 1
38 echo "[$(<:S)] 1"
39 sleep 1
40 echo "[$(<:S)] 2"
41 sleep $(<:B)
42 }
43 }
44
45 rule sleeper
46 {
47 DEPENDS $(<) : $(>) ;
48 }
49
50 NOTFILE front ;
51 sleeper 1.a : front ;
52 sleeper 2.a : front ;
53 sleeper 3.a : front ;
54 sleeper 4.a : front ;
55 NOTFILE choke ;
56 DEPENDS choke : 1.a 2.a 3.a 4.a ;
57 sleeper 1.b : choke ;
58 sleeper 2.b : choke ;
59 sleeper 3.b : choke ;
60 sleeper 4.b : choke ;
61 DEPENDS bottom : 1.b 2.b 3.b 4.b ;
62 DEPENDS all : bottom ;
63 """)
64
65 t.run_build_system(["-ffile.jam", "-j4"], stdout="""\
66 ...found 12 targets...
67 ...updating 8 targets...
68 sleeper 1.a
69 [.a] 0
70 [.a] 1
71 [.a] 2
72 sleeper 2.a
73 [.a] 0
74 [.a] 1
75 [.a] 2
76 sleeper 3.a
77 [.a] 0
78 [.a] 1
79 [.a] 2
80 sleeper 4.a
81 [.a] 0
82 [.a] 1
83 [.a] 2
84 sleeper 1.b
85 [.b] 0
86 [.b] 1
87 [.b] 2
88 sleeper 2.b
89 [.b] 0
90 [.b] 1
91 [.b] 2
92 sleeper 3.b
93 [.b] 0
94 [.b] 1
95 [.b] 2
96 sleeper 4.b
97 [.b] 0
98 [.b] 1
99 [.b] 2
100 ...updated 8 targets...
101 """)
102
103 t.cleanup()