summaryrefslogtreecommitdiff
path: root/t/helper/test-run-command.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-09-19 21:46:31 (GMT)
committerJohannes Schindelin <johannes.schindelin@gmx.de>2019-12-05 14:37:06 (GMT)
commit7530a6287e20a74b9fe6d4ca3a66df0f0f5cc52c (patch)
tree194192c2af82cf6899d13c2c6d7a9434d71d4952 /t/helper/test-run-command.c
parent55953c77c0bfcb727ffd7e293e4661b7a24b791b (diff)
downloadgit-7530a6287e20a74b9fe6d4ca3a66df0f0f5cc52c.zip
git-7530a6287e20a74b9fe6d4ca3a66df0f0f5cc52c.tar.gz
git-7530a6287e20a74b9fe6d4ca3a66df0f0f5cc52c.tar.bz2
quote-stress-test: allow skipping some trials
When the, say, 93rd trial run fails, it is a good idea to have a way to skip the first 92 trials and dig directly into the 93rd in a debugger. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 't/helper/test-run-command.c')
-rw-r--r--t/helper/test-run-command.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index bdbc5ec..07989f7 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -67,11 +67,12 @@ static int quote_stress_test(int argc, const char **argv)
* were passed in.
*/
char special[] = ".?*\\^_\"'`{}()[]<>@~&+:;$%"; // \t\r\n\a";
- int i, j, k, trials = 100;
+ int i, j, k, trials = 100, skip = 0;
struct strbuf out = STRBUF_INIT;
struct argv_array args = ARGV_ARRAY_INIT;
struct option options[] = {
OPT_INTEGER('n', "trials", &trials, "Number of trials"),
+ OPT_INTEGER('s', "skip", &skip, "Skip <n> trials"),
OPT_END()
};
const char * const usage[] = {
@@ -113,6 +114,9 @@ static int quote_stress_test(int argc, const char **argv)
}
}
+ if (i < skip)
+ continue;
+
cp.argv = args.argv;
strbuf_reset(&out);
if (pipe_command(&cp, NULL, 0, &out, 0, NULL, 0) < 0)