mirror of
https://github.com/brl/mutter.git
synced 2025-04-17 07:39:39 +00:00
context/test: Add flag to test runner helper
This will later be used to allow skipping tests. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2151>
This commit is contained in:
parent
124a1582e1
commit
51368227f2
@ -176,5 +176,6 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
init_tests ();
|
init_tests ();
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,8 @@ run_tests_idle (gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
meta_context_test_run_tests (MetaContextTest *context_test)
|
meta_context_test_run_tests (MetaContextTest *context_test,
|
||||||
|
MetaTestRunFlags flags)
|
||||||
{
|
{
|
||||||
MetaContext *context = META_CONTEXT (context_test);
|
MetaContext *context = META_CONTEXT (context_test);
|
||||||
g_autoptr (GError) error = NULL;
|
g_autoptr (GError) error = NULL;
|
||||||
|
@ -37,6 +37,11 @@ typedef enum _MetaContextTestFlag
|
|||||||
META_CONTEXT_TEST_FLAG_NO_X11 = 1 << 1,
|
META_CONTEXT_TEST_FLAG_NO_X11 = 1 << 1,
|
||||||
} MetaContextTestFlag;
|
} MetaContextTestFlag;
|
||||||
|
|
||||||
|
typedef enum _MetaTestRunFlags
|
||||||
|
{
|
||||||
|
META_TEST_RUN_FLAG_NONE = 0,
|
||||||
|
} MetaTestRunFlags;
|
||||||
|
|
||||||
#define META_TYPE_CONTEXT_TEST (meta_context_test_get_type ())
|
#define META_TYPE_CONTEXT_TEST (meta_context_test_get_type ())
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
G_DECLARE_DERIVABLE_TYPE (MetaContextTest, meta_context_test,
|
G_DECLARE_DERIVABLE_TYPE (MetaContextTest, meta_context_test,
|
||||||
@ -48,7 +53,8 @@ MetaContext * meta_create_test_context (MetaContextTestType type,
|
|||||||
MetaContextTestFlag flags);
|
MetaContextTestFlag flags);
|
||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
int meta_context_test_run_tests (MetaContextTest *context_test);
|
int meta_context_test_run_tests (MetaContextTest *context_test,
|
||||||
|
MetaTestRunFlags flags);
|
||||||
|
|
||||||
META_EXPORT
|
META_EXPORT
|
||||||
void meta_context_test_wait_for_x11_display (MetaContextTest *context_test);
|
void meta_context_test_wait_for_x11_display (MetaContextTest *context_test);
|
||||||
|
@ -43,5 +43,6 @@ main (int argc,
|
|||||||
|
|
||||||
init_tests ();
|
init_tests ();
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -144,5 +144,6 @@ main (int argc,
|
|||||||
g_signal_connect (context, "after-tests",
|
g_signal_connect (context, "after-tests",
|
||||||
G_CALLBACK (tear_down_test_environment), NULL);
|
G_CALLBACK (tear_down_test_environment), NULL);
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -1356,5 +1356,6 @@ main (int argc, char *argv[])
|
|||||||
|
|
||||||
init_tests ();
|
init_tests ();
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -1270,5 +1270,6 @@ main (int argc, char **argv)
|
|||||||
info.n_tests = tests->len;
|
info.n_tests = tests->len;
|
||||||
g_signal_connect (context, "run-tests", G_CALLBACK (run_tests), &info);
|
g_signal_connect (context, "run-tests", G_CALLBACK (run_tests), &info);
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -255,5 +255,6 @@ main (int argc, char *argv[])
|
|||||||
g_signal_connect (context, "after-tests",
|
g_signal_connect (context, "after-tests",
|
||||||
G_CALLBACK (finish_monitor_tests), NULL);
|
G_CALLBACK (finish_monitor_tests), NULL);
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
@ -516,5 +516,6 @@ main (int argc,
|
|||||||
g_signal_connect (context, "after-tests",
|
g_signal_connect (context, "after-tests",
|
||||||
G_CALLBACK (on_after_tests), NULL);
|
G_CALLBACK (on_after_tests), NULL);
|
||||||
|
|
||||||
return meta_context_test_run_tests (META_CONTEXT_TEST (context));
|
return meta_context_test_run_tests (META_CONTEXT_TEST (context),
|
||||||
|
META_TEST_RUN_FLAG_NONE);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user