Skip to content

Commit 88255bb

Browse files
committed
Merge branch 'js/stress-test-ui-tweak'
Dev support. * js/stress-test-ui-tweak: tests: introduce --stress-jobs=<N> tests: let --stress-limit=<N> imply --stress
2 parents 9fbcc3d + f545737 commit 88255bb

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

t/README

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,10 @@ appropriately before running "make".
196196
variable to "1" or "0", respectively.
197197

198198
--stress::
199-
--stress=<N>::
200199
Run the test script repeatedly in multiple parallel jobs until
201200
one of them fails. Useful for reproducing rare failures in
202201
flaky tests. The number of parallel jobs is, in order of
203-
precedence: <N>, or the value of the GIT_TEST_STRESS_LOAD
202+
precedence: the value of the GIT_TEST_STRESS_LOAD
204203
environment variable, or twice the number of available
205204
processors (as shown by the 'getconf' utility), or 8.
206205
Implies `--verbose -x --immediate` to get the most information
@@ -211,10 +210,13 @@ appropriately before running "make".
211210
'.stress-<nr>' suffix, and the trash directory of the failed
212211
test job is renamed to end with a '.stress-failed' suffix.
213212

213+
--stress-jobs=<N>::
214+
Override the number of parallel jobs. Implies `--stress`.
215+
214216
--stress-limit=<N>::
215217
When combined with --stress run the test script repeatedly
216218
this many times in each of the parallel jobs or until one of
217-
them fails, whichever comes first.
219+
them fails, whichever comes first. Implies `--stress`.
218220

219221
You can also set the GIT_TEST_INSTALLED environment variable to
220222
the bindir of an existing git installation to test that installation.

t/test-lib.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,24 @@ do
147147
--stress)
148148
stress=t ;;
149149
--stress=*)
150+
echo "error: --stress does not accept an argument: '$opt'" >&2
151+
echo "did you mean --stress-jobs=${opt#*=} or --stress-limit=${opt#*=}?" >&2
152+
exit 1
153+
;;
154+
--stress-jobs=*)
155+
stress=t;
150156
stress=${opt#--*=}
151157
case "$stress" in
152158
*[!0-9]*|0*|"")
153-
echo "error: --stress=<N> requires the number of jobs to run" >&2
159+
echo "error: --stress-jobs=<N> requires the number of jobs to run" >&2
154160
exit 1
155161
;;
156162
*) # Good.
157163
;;
158164
esac
159165
;;
160166
--stress-limit=*)
167+
stress=t;
161168
stress_limit=${opt#--*=}
162169
case "$stress_limit" in
163170
*[!0-9]*|0*|"")

0 commit comments

Comments
 (0)