@@ -18,6 +18,7 @@ test_expect_success 'simple progress display' '
1818 EOF
1919
2020 cat >in <<-\EOF &&
21+ start 0
2122 update
2223 progress 1
2324 update
@@ -26,8 +27,9 @@ test_expect_success 'simple progress display' '
2627 progress 4
2728 update
2829 progress 5
30+ stop
2931 EOF
30- test-tool progress "Working hard" <in 2>stderr &&
32+ test-tool progress <in 2>stderr &&
3133
3234 show_cr <stderr >out &&
3335 test_cmp expect out
@@ -42,11 +44,13 @@ test_expect_success 'progress display with total' '
4244 EOF
4345
4446 cat >in <<-\EOF &&
47+ start 3
4548 progress 1
4649 progress 2
4750 progress 3
51+ stop
4852 EOF
49- test-tool progress --total=3 "Working hard" <in 2>stderr &&
53+ test-tool progress <in 2>stderr &&
5054
5155 show_cr <stderr >out &&
5256 test_cmp expect out
@@ -63,14 +67,14 @@ Working hard.......2.........3.........4.........5.........6:
6367EOF
6468
6569 cat >in <<-\EOF &&
70+ start 100000 Working hard.......2.........3.........4.........5.........6
6671 progress 100
6772 progress 1000
6873 progress 10000
6974 progress 100000
75+ stop
7076 EOF
71- test-tool progress --total=100000 \
72- "Working hard.......2.........3.........4.........5.........6" \
73- <in 2>stderr &&
77+ test-tool progress <in 2>stderr &&
7478
7579 show_cr <stderr >out &&
7680 test_cmp expect out
@@ -89,16 +93,16 @@ Working hard.......2.........3.........4.........5.........6:
8993EOF
9094
9195 cat >in <<-\EOF &&
96+ start 100000 Working hard.......2.........3.........4.........5.........6
9297 update
9398 progress 1
9499 update
95100 progress 2
96101 progress 10000
97102 progress 100000
103+ stop
98104 EOF
99- test-tool progress --total=100000 \
100- "Working hard.......2.........3.........4.........5.........6" \
101- <in 2>stderr &&
105+ test-tool progress <in 2>stderr &&
102106
103107 show_cr <stderr >out &&
104108 test_cmp expect out
@@ -117,14 +121,14 @@ Working hard.......2.........3.........4.........5.........6:
117121EOF
118122
119123 cat >in <<-\EOF &&
124+ start 100000 Working hard.......2.........3.........4.........5.........6
120125 progress 25000
121126 progress 50000
122127 progress 75000
123128 progress 100000
129+ stop
124130 EOF
125- test-tool progress --total=100000 \
126- "Working hard.......2.........3.........4.........5.........6" \
127- <in 2>stderr &&
131+ test-tool progress <in 2>stderr &&
128132
129133 show_cr <stderr >out &&
130134 test_cmp expect out
@@ -141,14 +145,14 @@ Working hard.......2.........3.........4.........5.........6.........7.........:
141145EOF
142146
143147 cat >in <<-\EOF &&
148+ start 100000 Working hard.......2.........3.........4.........5.........6.........7.........
144149 progress 25000
145150 progress 50000
146151 progress 75000
147152 progress 100000
153+ stop
148154 EOF
149- test-tool progress --total=100000 \
150- "Working hard.......2.........3.........4.........5.........6.........7........." \
151- <in 2>stderr &&
155+ test-tool progress <in 2>stderr &&
152156
153157 show_cr <stderr >out &&
154158 test_cmp expect out
@@ -165,12 +169,14 @@ test_expect_success 'progress shortens - crazy caller' '
165169 EOF
166170
167171 cat >in <<-\EOF &&
172+ start 1000
168173 progress 100
169174 progress 200
170175 progress 1
171176 progress 1000
177+ stop
172178 EOF
173- test-tool progress --total=1000 "Working hard" <in 2>stderr &&
179+ test-tool progress <in 2>stderr &&
174180
175181 show_cr <stderr >out &&
176182 test_cmp expect out
@@ -186,6 +192,7 @@ test_expect_success 'progress display with throughput' '
186192 EOF
187193
188194 cat >in <<-\EOF &&
195+ start 0
189196 throughput 102400 1000
190197 update
191198 progress 10
@@ -198,8 +205,9 @@ test_expect_success 'progress display with throughput' '
198205 throughput 409600 4000
199206 update
200207 progress 40
208+ stop
201209 EOF
202- test-tool progress "Working hard" <in 2>stderr &&
210+ test-tool progress <in 2>stderr &&
203211
204212 show_cr <stderr >out &&
205213 test_cmp expect out
@@ -215,6 +223,7 @@ test_expect_success 'progress display with throughput and total' '
215223 EOF
216224
217225 cat >in <<-\EOF &&
226+ start 40
218227 throughput 102400 1000
219228 progress 10
220229 throughput 204800 2000
@@ -223,8 +232,9 @@ test_expect_success 'progress display with throughput and total' '
223232 progress 30
224233 throughput 409600 4000
225234 progress 40
235+ stop
226236 EOF
227- test-tool progress --total=40 "Working hard" <in 2>stderr &&
237+ test-tool progress <in 2>stderr &&
228238
229239 show_cr <stderr >out &&
230240 test_cmp expect out
@@ -240,6 +250,7 @@ test_expect_success 'cover up after throughput shortens' '
240250 EOF
241251
242252 cat >in <<-\EOF &&
253+ start 0
243254 throughput 409600 1000
244255 update
245256 progress 1
@@ -252,8 +263,9 @@ test_expect_success 'cover up after throughput shortens' '
252263 throughput 1638400 4000
253264 update
254265 progress 4
266+ stop
255267 EOF
256- test-tool progress "Working hard" <in 2>stderr &&
268+ test-tool progress <in 2>stderr &&
257269
258270 show_cr <stderr >out &&
259271 test_cmp expect out
@@ -268,6 +280,7 @@ test_expect_success 'cover up after throughput shortens a lot' '
268280 EOF
269281
270282 cat >in <<-\EOF &&
283+ start 0
271284 throughput 1 1000
272285 update
273286 progress 1
@@ -277,15 +290,17 @@ test_expect_success 'cover up after throughput shortens a lot' '
277290 throughput 3145728 3000
278291 update
279292 progress 3
293+ stop
280294 EOF
281- test-tool progress "Working hard" <in 2>stderr &&
295+ test-tool progress <in 2>stderr &&
282296
283297 show_cr <stderr >out &&
284298 test_cmp expect out
285299'
286300
287301test_expect_success ' progress generates traces' '
288302 cat >in <<-\EOF &&
303+ start 40
289304 throughput 102400 1000
290305 update
291306 progress 10
@@ -298,10 +313,11 @@ test_expect_success 'progress generates traces' '
298313 throughput 409600 4000
299314 update
300315 progress 40
316+ stop
301317 EOF
302318
303- GIT_TRACE2_EVENT="$(pwd)/trace.event" test-tool progress --total=40 \
304- "Working hard" <in 2>stderr &&
319+ GIT_TRACE2_EVENT="$(pwd)/trace.event" test-tool progress \
320+ <in 2>stderr &&
305321
306322 # t0212/parse_events.perl intentionally omits regions and data.
307323 test_region progress "Working hard" trace.event &&
0 commit comments