283
286
gboolean loop_pending;
286
if (pipe (report_pipe) < 0)
289
if (!g_unix_open_pipe (report_pipe, FD_CLOEXEC, &error))
288
291
if (subtest_mode_fatal)
289
g_error ("Failed to open pipe for test binary: %s: %s", binary, g_strerror (errno));
292
g_error ("Failed to open pipe for test binary: %s: %s", binary, error->message);
291
g_warning ("Failed to open pipe for test binary: %s: %s", binary, g_strerror (errno));
294
g_warning ("Failed to open pipe for test binary: %s: %s", binary, error->message);
295
g_clear_error (&error);
474
478
g_print ("gtester version %d.%d.%d\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
477
g_print ("Usage: gtester [OPTIONS] testprogram...\n");
481
g_print ("Usage:\n");
482
g_print ("gtester [OPTIONS] testprogram...\n\n");
478
483
/* 12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
479
g_print ("Options:\n");
480
g_print (" -h, --help show this help message\n");
481
g_print (" -v, --version print version informations\n");
482
g_print (" --g-fatal-warnings make warnings fatal (abort)\n");
483
g_print (" -k, --keep-going continue running after tests failed\n");
484
g_print (" -l list paths of available test cases\n");
485
g_print (" -m=perf, -m=slow, -m=quick -m=thorough\n");
486
g_print (" run test cases in mode perf, slow/thorough or quick (default)\n");
487
g_print (" -m=no-undefined don't run test cases that provoke assertions\n");
488
g_print (" -p=TESTPATH only start test cases matching TESTPATH\n");
489
g_print (" -s=TESTPATH skip test cases matching TESTPATH\n");
490
g_print (" --seed=SEEDSTRING start all tests with random number seed SEEDSTRING\n");
491
g_print (" -o=LOGFILE write the test log to LOGFILE\n");
492
g_print (" -q, --quiet suppress per test binary output\n");
493
g_print (" --verbose report success per testcase\n");
484
g_print ("Help Options:\n");
485
g_print (" -h, --help Show this help message\n\n");
486
g_print ("Utility Options:\n");
487
g_print (" -v, --version Print version informations\n");
488
g_print (" --g-fatal-warnings Make warnings fatal (abort)\n");
489
g_print (" -k, --keep-going Continue running after tests failed\n");
490
g_print (" -l List paths of available test cases\n");
491
g_print (" -m {perf|slow|thorough|quick} Run test cases according to mode\n");
492
g_print (" -m {undefined|no-undefined} Run test cases according to mode\n");
493
g_print (" -p=TESTPATH Only start test cases matching TESTPATH\n");
494
g_print (" -s=TESTPATH Skip test cases matching TESTPATH\n");
495
g_print (" --seed=SEEDSTRING Start tests with random seed SEEDSTRING\n");
496
g_print (" -o=LOGFILE Write the test log to LOGFILE\n");
497
g_print (" -q, --quiet Suppress per test binary output\n");
498
g_print (" --verbose Report success per testcase\n");