From 500c13ab6f3a3be97e913d5baa39450539070921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 9 Nov 2017 17:25:07 +0800 Subject: [PATCH] monitor-unit-tests: Always reset CRTC transform ability Changing the test monitor managers ability to rotate CRTCs in one test affected the next test. Avoid leaking such state by resetting it before each test. To continue passing, some tests needed to be updated regarding to still pass. https://bugzilla.gnome.org/show_bug.cgi?id=788915 --- src/tests/monitor-unit-tests.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c index 06178287e..16a95fb48 100644 --- a/src/tests/monitor-unit-tests.c +++ b/src/tests/monitor-unit-tests.c @@ -5265,6 +5265,7 @@ meta_test_monitor_migrated_rotated (void) .crtcs = { { .current_mode = 0, + .transform = META_MONITOR_TRANSFORM_270 } }, .n_crtcs = 1, @@ -5549,6 +5550,7 @@ meta_test_monitor_migrated_wiggle (void) .crtcs = { { .current_mode = 0, + .transform = META_MONITOR_TRANSFORM_90 } }, .n_crtcs = 1, @@ -5622,8 +5624,12 @@ test_case_setup (void **fixture, MetaBackend *backend = meta_get_backend (); MetaMonitorManager *monitor_manager = meta_backend_get_monitor_manager (backend); + MetaMonitorManagerTest *monitor_manager_test = + META_MONITOR_MANAGER_TEST (monitor_manager); MetaMonitorConfigManager *config_manager = monitor_manager->config_manager; + meta_monitor_manager_test_set_handles_transforms (monitor_manager_test, + TRUE); meta_monitor_config_manager_set_current (config_manager, NULL); meta_monitor_config_manager_clear_history (config_manager); }