Go to the documentation of this file.
36 return strcmp(
a->task_name,
b->task_name);
40 const char*
fmt(
double d) {
41 static char buf[1024];
51 return "<buffer too small>";
67 if (
v) *--
p =
'0' + (
v % 10),
v /= 10;
68 if (
v) *--
p =
'0' + (
v % 10),
v /= 10;
69 if (
v) *--
p =
'0' + (
v % 10),
v /= 10;
91 for (task =
TASKS; task->
main; task++, actual++) {
98 skip = (actual > 0 && 0 == strcmp(
TASKS[0].task_name,
"platform_output"));
132 const char* directive;
143 directive =
" # SKIP ";
152 reason_length = strlen(reason);
153 if (reason_length > 0 && reason[reason_length - 1] ==
'\n')
154 reason[reason_length - 1] =
'\0';
165 int benchmark_output,
167 char errmsg[1024] =
"";
171 int timeout_multiplier;
212 "Process `%s` failed to start.",
236 "Process `%s` failed to start.",
246 if (main_proc == NULL) {
249 "No test with that name: %s",
254 timeout_multiplier = 1;
259 var =
getenv(
"UV_TEST_TIMEOUT_MULTIPLIER");
263 timeout_multiplier = atoi(var);
264 if (timeout_multiplier <= 0)
265 timeout_multiplier = 1;
271 FATAL(
"process_wait failed");
272 }
else if (
result == -2) {
289 if (benchmark_output) {
296 for (
i = 0;
i < process_count - 1;
i++) {
300 if (process_count > 0 &&
302 FATAL(
"process_wait failed");
309 if (strlen(errmsg) > 0)
310 fprintf(
stderr,
"# %s\n", errmsg);
314 for (
i = 0;
i < process_count;
i++) {
317 fprintf(
stderr,
"Output from process `%s`: (unavailable)\n",
323 fprintf(
stderr,
"Output from process `%s`: (no output)\n",
337 }
else if (benchmark_output) {
350 for (
i = 0;
i < process_count;
i++) {
358 for (
i = 0;
i < process_count;
i++) {
381 fprintf(
stderr,
"No test part with that name: %s:%s\n",
test, part);
393 for (n_helpers = 0, helper =
TASKS; helper->
main; helper++) {
411 for (n_tasks = 0, task =
TASKS; task->
main; n_tasks++, task++);
422 for (
i = 0;
i < n_helpers;
i++) {
423 printf(
" %s", helpers[
i]->process_name);
int process_copy_output(process_info_t *p, FILE *stream)
int process_reap(process_info_t *p)
static int find_helpers(const task_entry_t *task, const task_entry_t **helpers)
int run_test_part(const char *test, const char *part)
_Use_decl_annotations_ int __cdecl printf(const char *_Format,...)
int run_test(const char *test, int benchmark_output, int test_count)
char executable_path[sizeof(executable_path)]
static int compare_task(const void *va, const void *vb)
void print_tests(FILE *stream)
void process_cleanup(process_info_t *p)
int run_tests(int benchmark_output)
int process_wait(process_info_t *vec, int n, int timeout)
int process_start(char *name, char *part, process_info_t *p, int is_helper)
static uv_process_t process
unsigned __int64 uint64_t
UV_EXTERN void uv_sleep(unsigned int msec)
void qsort(void *a, size_t n, size_t es, int(*cmp)(const void *, const void *))
void print_lines(const char *buffer, size_t size, FILE *stream)
int process_read_last_line(process_info_t *p, char *buffer, size_t buffer_len)
int process_terminate(process_info_t *p)
long int process_output_size(process_info_t *p)
char * process_get_name(process_info_t *p)
void log_tap_result(int test_count, const char *test, int status, process_info_t *process)
const char * fmt(double d)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:14