@@ -18,6 +18,7 @@ test_expect_success 'simple progress display' '
18
18
EOF
19
19
20
20
cat >in <<-\EOF &&
21
+ start 0
21
22
update
22
23
progress 1
23
24
update
@@ -26,8 +27,9 @@ test_expect_success 'simple progress display' '
26
27
progress 4
27
28
update
28
29
progress 5
30
+ stop
29
31
EOF
30
- test-tool progress "Working hard" <in 2>stderr &&
32
+ test-tool progress <in 2>stderr &&
31
33
32
34
show_cr <stderr >out &&
33
35
test_cmp expect out
@@ -42,11 +44,13 @@ test_expect_success 'progress display with total' '
42
44
EOF
43
45
44
46
cat >in <<-\EOF &&
47
+ start 3
45
48
progress 1
46
49
progress 2
47
50
progress 3
51
+ stop
48
52
EOF
49
- test-tool progress --total=3 "Working hard" <in 2>stderr &&
53
+ test-tool progress <in 2>stderr &&
50
54
51
55
show_cr <stderr >out &&
52
56
test_cmp expect out
@@ -63,14 +67,14 @@ Working hard.......2.........3.........4.........5.........6:
63
67
EOF
64
68
65
69
cat >in <<-\EOF &&
70
+ start 100000 Working hard.......2.........3.........4.........5.........6
66
71
progress 100
67
72
progress 1000
68
73
progress 10000
69
74
progress 100000
75
+ stop
70
76
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 &&
74
78
75
79
show_cr <stderr >out &&
76
80
test_cmp expect out
@@ -89,16 +93,16 @@ Working hard.......2.........3.........4.........5.........6:
89
93
EOF
90
94
91
95
cat >in <<-\EOF &&
96
+ start 100000 Working hard.......2.........3.........4.........5.........6
92
97
update
93
98
progress 1
94
99
update
95
100
progress 2
96
101
progress 10000
97
102
progress 100000
103
+ stop
98
104
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 &&
102
106
103
107
show_cr <stderr >out &&
104
108
test_cmp expect out
@@ -117,14 +121,14 @@ Working hard.......2.........3.........4.........5.........6:
117
121
EOF
118
122
119
123
cat >in <<-\EOF &&
124
+ start 100000 Working hard.......2.........3.........4.........5.........6
120
125
progress 25000
121
126
progress 50000
122
127
progress 75000
123
128
progress 100000
129
+ stop
124
130
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 &&
128
132
129
133
show_cr <stderr >out &&
130
134
test_cmp expect out
@@ -141,14 +145,14 @@ Working hard.......2.........3.........4.........5.........6.........7.........:
141
145
EOF
142
146
143
147
cat >in <<-\EOF &&
148
+ start 100000 Working hard.......2.........3.........4.........5.........6.........7.........
144
149
progress 25000
145
150
progress 50000
146
151
progress 75000
147
152
progress 100000
153
+ stop
148
154
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 &&
152
156
153
157
show_cr <stderr >out &&
154
158
test_cmp expect out
@@ -165,12 +169,14 @@ test_expect_success 'progress shortens - crazy caller' '
165
169
EOF
166
170
167
171
cat >in <<-\EOF &&
172
+ start 1000
168
173
progress 100
169
174
progress 200
170
175
progress 1
171
176
progress 1000
177
+ stop
172
178
EOF
173
- test-tool progress --total=1000 "Working hard" <in 2>stderr &&
179
+ test-tool progress <in 2>stderr &&
174
180
175
181
show_cr <stderr >out &&
176
182
test_cmp expect out
@@ -186,6 +192,7 @@ test_expect_success 'progress display with throughput' '
186
192
EOF
187
193
188
194
cat >in <<-\EOF &&
195
+ start 0
189
196
throughput 102400 1000
190
197
update
191
198
progress 10
@@ -198,8 +205,9 @@ test_expect_success 'progress display with throughput' '
198
205
throughput 409600 4000
199
206
update
200
207
progress 40
208
+ stop
201
209
EOF
202
- test-tool progress "Working hard" <in 2>stderr &&
210
+ test-tool progress <in 2>stderr &&
203
211
204
212
show_cr <stderr >out &&
205
213
test_cmp expect out
@@ -215,6 +223,7 @@ test_expect_success 'progress display with throughput and total' '
215
223
EOF
216
224
217
225
cat >in <<-\EOF &&
226
+ start 40
218
227
throughput 102400 1000
219
228
progress 10
220
229
throughput 204800 2000
@@ -223,8 +232,9 @@ test_expect_success 'progress display with throughput and total' '
223
232
progress 30
224
233
throughput 409600 4000
225
234
progress 40
235
+ stop
226
236
EOF
227
- test-tool progress --total=40 "Working hard" <in 2>stderr &&
237
+ test-tool progress <in 2>stderr &&
228
238
229
239
show_cr <stderr >out &&
230
240
test_cmp expect out
@@ -240,6 +250,7 @@ test_expect_success 'cover up after throughput shortens' '
240
250
EOF
241
251
242
252
cat >in <<-\EOF &&
253
+ start 0
243
254
throughput 409600 1000
244
255
update
245
256
progress 1
@@ -252,8 +263,9 @@ test_expect_success 'cover up after throughput shortens' '
252
263
throughput 1638400 4000
253
264
update
254
265
progress 4
266
+ stop
255
267
EOF
256
- test-tool progress "Working hard" <in 2>stderr &&
268
+ test-tool progress <in 2>stderr &&
257
269
258
270
show_cr <stderr >out &&
259
271
test_cmp expect out
@@ -268,6 +280,7 @@ test_expect_success 'cover up after throughput shortens a lot' '
268
280
EOF
269
281
270
282
cat >in <<-\EOF &&
283
+ start 0
271
284
throughput 1 1000
272
285
update
273
286
progress 1
@@ -277,15 +290,17 @@ test_expect_success 'cover up after throughput shortens a lot' '
277
290
throughput 3145728 3000
278
291
update
279
292
progress 3
293
+ stop
280
294
EOF
281
- test-tool progress "Working hard" <in 2>stderr &&
295
+ test-tool progress <in 2>stderr &&
282
296
283
297
show_cr <stderr >out &&
284
298
test_cmp expect out
285
299
'
286
300
287
301
test_expect_success ' progress generates traces' '
288
302
cat >in <<-\EOF &&
303
+ start 40
289
304
throughput 102400 1000
290
305
update
291
306
progress 10
@@ -298,10 +313,11 @@ test_expect_success 'progress generates traces' '
298
313
throughput 409600 4000
299
314
update
300
315
progress 40
316
+ stop
301
317
EOF
302
318
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 &&
305
321
306
322
# t0212/parse_events.perl intentionally omits regions and data.
307
323
test_region progress "Working hard" trace.event &&
0 commit comments