mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-05 00:46:16 +01:00
Add start/stop suite log messages
These will be used in the following commits, when implementing support for TAP as an alternative test driver protocol. https://bugzilla.gnome.org/show_bug.cgi?id=692125
This commit is contained in:
parent
de9cf58f65
commit
8253f98a18
@ -130,6 +130,8 @@ test_log_msg (GTestLogMsg *msg)
|
||||
guint i;
|
||||
gchar **strv;
|
||||
case G_TEST_LOG_NONE:
|
||||
case G_TEST_LOG_START_SUITE:
|
||||
case G_TEST_LOG_STOP_SUITE:
|
||||
break;
|
||||
case G_TEST_LOG_ERROR:
|
||||
strv = g_strsplit (msg->strings[0], "\n", -1);
|
||||
|
@ -595,6 +595,8 @@ g_test_log_type_name (GTestLogType log_type)
|
||||
case G_TEST_LOG_MIN_RESULT: return "minperf";
|
||||
case G_TEST_LOG_MAX_RESULT: return "maxperf";
|
||||
case G_TEST_LOG_MESSAGE: return "message";
|
||||
case G_TEST_LOG_START_SUITE: return "start suite";
|
||||
case G_TEST_LOG_STOP_SUITE: return "stop suite";
|
||||
}
|
||||
return "???";
|
||||
}
|
||||
@ -660,6 +662,10 @@ g_test_log (GTestLogType lbit,
|
||||
if (g_test_verbose())
|
||||
g_print ("GTest: random seed: %s\n", string2);
|
||||
break;
|
||||
case G_TEST_LOG_START_SUITE:
|
||||
break;
|
||||
case G_TEST_LOG_STOP_SUITE:
|
||||
break;
|
||||
case G_TEST_LOG_STOP_CASE:
|
||||
if (g_test_verbose())
|
||||
g_print ("GTest: result: %s\n", fail ? "FAIL" : "OK");
|
||||
@ -1911,6 +1917,8 @@ g_test_run_suite_internal (GTestSuite *suite,
|
||||
|
||||
g_return_val_if_fail (suite != NULL, -1);
|
||||
|
||||
g_test_log (G_TEST_LOG_START_SUITE, suite->name, NULL, 0, NULL);
|
||||
|
||||
while (path[0] == '/')
|
||||
path++;
|
||||
l = strlen (path);
|
||||
@ -1941,6 +1949,8 @@ g_test_run_suite_internal (GTestSuite *suite,
|
||||
g_free (test_run_name);
|
||||
test_run_name = old_name;
|
||||
|
||||
g_test_log (G_TEST_LOG_STOP_SUITE, suite->name, NULL, 0, NULL);
|
||||
|
||||
return n_bad;
|
||||
}
|
||||
|
||||
|
@ -309,7 +309,9 @@ typedef enum {
|
||||
G_TEST_LOG_STOP_CASE, /* d:status d:nforks d:elapsed */
|
||||
G_TEST_LOG_MIN_RESULT, /* s:blurb d:result */
|
||||
G_TEST_LOG_MAX_RESULT, /* s:blurb d:result */
|
||||
G_TEST_LOG_MESSAGE /* s:blurb */
|
||||
G_TEST_LOG_MESSAGE, /* s:blurb */
|
||||
G_TEST_LOG_START_SUITE,
|
||||
G_TEST_LOG_STOP_SUITE
|
||||
} GTestLogType;
|
||||
|
||||
typedef struct {
|
||||
|
@ -193,6 +193,8 @@ test_message (void)
|
||||
{
|
||||
case G_TEST_LOG_START_BINARY:
|
||||
case G_TEST_LOG_START_CASE:
|
||||
case G_TEST_LOG_START_SUITE:
|
||||
case G_TEST_LOG_STOP_SUITE:
|
||||
/* ignore */
|
||||
break;
|
||||
case G_TEST_LOG_STOP_CASE:
|
||||
@ -302,6 +304,8 @@ test_error (void)
|
||||
{
|
||||
case G_TEST_LOG_START_BINARY:
|
||||
case G_TEST_LOG_START_CASE:
|
||||
case G_TEST_LOG_START_SUITE:
|
||||
case G_TEST_LOG_STOP_SUITE:
|
||||
/* ignore */
|
||||
break;
|
||||
case G_TEST_LOG_STOP_CASE:
|
||||
|
Loading…
Reference in New Issue
Block a user