mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
tests: Move out KMS utils unit tests to its own executable
Better to split things up a bit, so one can with more ease run a specific test. In the KMS utils case, we don't even need a mutter context, making it much lighter. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1927>
This commit is contained in:
@ -18,9 +18,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "tests/kms-utils-unit-tests.h"
|
||||
#include <glib.h>
|
||||
|
||||
#include "tests/test-utils.h"
|
||||
#include "backends/native/meta-kms-utils.h"
|
||||
|
||||
typedef struct {
|
||||
@ -121,7 +120,7 @@ static const ModeInfoTestCase test_cases[] = {
|
||||
};
|
||||
|
||||
static void
|
||||
refresh_rate (void)
|
||||
meta_test_kms_refresh_rate (void)
|
||||
{
|
||||
size_t index;
|
||||
|
||||
@ -138,8 +137,18 @@ refresh_rate (void)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
init_kms_utils_tests (void)
|
||||
{
|
||||
g_test_add_func ("/kms-utils/refresh-rate", refresh_rate);
|
||||
g_test_add_func ("/backends/native/kms/refresh-rate",
|
||||
meta_test_kms_refresh_rate);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc,
|
||||
char **argv)
|
||||
{
|
||||
g_test_init (&argc, &argv, NULL);
|
||||
init_kms_utils_tests ();
|
||||
return g_test_run ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user