File tree Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Expand file tree Collapse file tree 3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,11 @@ appropriately before running "make".
211
211
'.stress-<nr>' suffix, and the trash directory of the failed
212
212
test job is renamed to end with a '.stress-failed' suffix.
213
213
214
+ --stress-limit=<N>::
215
+ When combined with --stress run the test script repeatedly
216
+ this many times in each of the parallel jobs or until one of
217
+ them fails, whichever comes first.
218
+
214
219
You can also set the GIT_TEST_INSTALLED environment variable to
215
220
the bindir of an existing git installation to test that installation.
216
221
You still need to have built this git sandbox, from which various
Original file line number Diff line number Diff line change @@ -1289,7 +1289,7 @@ test_set_port () {
1289
1289
port=$(( $port + 10000 ))
1290
1290
fi
1291
1291
;;
1292
- * [^ 0-9]* |0* )
1292
+ * [! 0-9]* |0* )
1293
1293
error >&7 " invalid port number: $port "
1294
1294
;;
1295
1295
* )
Original file line number Diff line number Diff line change 149
149
--stress=* )
150
150
stress=${opt# --* =}
151
151
case " $stress " in
152
- * [^ 0-9]* |0* |" " )
152
+ * [! 0-9]* |0* |" " )
153
153
echo " error: --stress=<N> requires the number of jobs to run" >&2
154
154
exit 1
155
155
;;
156
156
* ) # Good.
157
157
;;
158
158
esac
159
159
;;
160
+ --stress-limit=* )
161
+ stress_limit=${opt# --* =}
162
+ case " $stress_limit " in
163
+ * [!0-9]* |0* |" " )
164
+ echo " error: --stress-limit=<N> requires the number of repetitions" >&2
165
+ exit 1
166
+ ;;
167
+ * ) # Good.
168
+ ;;
169
+ esac
170
+ ;;
160
171
* )
161
172
echo " error: unknown test option '$opt '" >&2 ; exit 1 ;;
162
173
esac
@@ -242,8 +253,10 @@ then
242
253
exit 1
243
254
' TERM INT
244
255
245
- cnt=0
246
- while ! test -e " $stressfail "
256
+ cnt=1
257
+ while ! test -e " $stressfail " &&
258
+ { test -z " $stress_limit " ||
259
+ test $cnt -le $stress_limit ; }
247
260
do
248
261
$TEST_SHELL_PATH " $0 " " $@ " > " $TEST_RESULTS_BASE .stress-$job_nr .out" 2>&1 &
249
262
test_pid=$!
266
279
267
280
if test -f " $stressfail "
268
281
then
282
+ stress_exit=1
269
283
echo " Log(s) of failed test run(s):"
270
284
for failed_job_nr in $( sort -n " $stressfail " )
271
285
do
You can’t perform that action at this time.
0 commit comments