MCPcopy Create free account
hub / github.com/git/git / next_test

Function next_test

t/helper/test-run-command.c:117–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117static int next_test(struct child_process *cp, struct strbuf *err, void *cb,
118 void **task_cb)
119{
120 struct testsuite *suite = cb;
121 const char *test;
122 if (suite->next >= suite->tests.nr)
123 return 0;
124
125 test = suite->tests.items[suite->next++].string;
126 if (suite->shell_path)
127 strvec_push(&cp->args, suite->shell_path);
128 strvec_push(&cp->args, test);
129 if (suite->quiet)
130 strvec_push(&cp->args, "--quiet");
131 if (suite->immediate)
132 strvec_push(&cp->args, "-i");
133 if (suite->verbose)
134 strvec_push(&cp->args, "-v");
135 if (suite->verbose_log)
136 strvec_push(&cp->args, "-V");
137 if (suite->trace)
138 strvec_push(&cp->args, "-x");
139 if (suite->write_junit_xml)
140 strvec_push(&cp->args, "--write-junit-xml");
141
142 strbuf_addf(err, "Output of '%s':\n", test);
143 *task_cb = (void *)test;
144
145 return 1;
146}
147
148static int test_finished(int result, struct strbuf *err, void *cb,
149 void *task_cb)

Callers

nothing calls this directly

Calls 2

strvec_pushFunction · 0.85
strbuf_addfFunction · 0.85

Tested by

no test coverage detected