[mutter/benzea/ignore-monitor-connector: 187/189] tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/benzea/ignore-monitor-connector: 187/189] tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
- Date: Wed, 12 Feb 2020 13:04:19 +0000 (UTC)
commit c85643a0f783db49d1dfe7d17a662111e5fd2b4c
Author: Benjamin Berg <bberg redhat com>
Date: Wed Feb 12 13:43:46 2020 +0100
tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
The external and internal monitor in the lid switch test had the
identical EDID information. This is at odds with the change to ignore
the connector if possible, as each of the monitors can be present
independently.
Avoid the problem by updating the test and setting a different serial
number in the EDID data of the external monitor.
https://gitlab.gnome.org/GNOME/mutter/issues/932
src/tests/monitor-configs/lid-switch.xml | 4 ++--
src/tests/monitor-unit-tests.c | 6 ++++++
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/tests/monitor-configs/lid-switch.xml b/src/tests/monitor-configs/lid-switch.xml
index fe5144660..95d629e9b 100644
--- a/src/tests/monitor-configs/lid-switch.xml
+++ b/src/tests/monitor-configs/lid-switch.xml
@@ -30,7 +30,7 @@
<connector>DP-1</connector>
<vendor>MetaProduct's Inc.</vendor>
<product>MetaMonitor</product>
- <serial>0x123456</serial>
+ <serial>0x654321</serial>
</monitorspec>
<mode>
<width>1024</width>
@@ -54,7 +54,7 @@
<connector>DP-1</connector>
<vendor>MetaProduct's Inc.</vendor>
<product>MetaMonitor</product>
- <serial>0x123456</serial>
+ <serial>0x654321</serial>
</monitorspec>
<mode>
<width>1024</width>
diff --git a/src/tests/monitor-unit-tests.c b/src/tests/monitor-unit-tests.c
index b498d899f..683f366a3 100644
--- a/src/tests/monitor-unit-tests.c
+++ b/src/tests/monitor-unit-tests.c
@@ -5310,6 +5310,7 @@ meta_test_monitor_custom_lid_switch_config (void)
.crtc = -1,
.modes = { 0 },
.n_modes = 1,
+ .serial = "0x654321",
.preferred_mode = 0,
.possible_crtcs = { 1 },
.n_possible_crtcs = 1,
@@ -5410,6 +5411,8 @@ meta_test_monitor_custom_lid_switch_config (void)
MetaMonitorTestSetup *test_setup;
MetaBackend *backend = meta_get_backend ();
+ g_debug ("Initial configuration (only internal screen)");
+
test_setup = create_monitor_test_setup (&test_case,
MONITOR_TEST_FLAG_NONE);
set_custom_monitor_config ("lid-switch.xml");
@@ -5417,6 +5420,7 @@ meta_test_monitor_custom_lid_switch_config (void)
check_monitor_configuration (&test_case);
/* External monitor connected */
+ g_debug ("External monitor connected");
test_case.setup.n_outputs = 2;
test_case.expect.n_monitors = 2;
@@ -5437,6 +5441,7 @@ meta_test_monitor_custom_lid_switch_config (void)
check_monitor_configuration (&test_case);
/* Lid was closed */
+ g_debug ("Closing lid");
test_case.expect.crtcs[0].current_mode = -1;
test_case.expect.crtcs[1].transform = META_MONITOR_TRANSFORM_90;
@@ -5455,6 +5460,7 @@ meta_test_monitor_custom_lid_switch_config (void)
check_monitor_configuration (&test_case);
/* Lid was opened */
+ g_debug ("Opening lid");
test_case.expect.crtcs[0].current_mode = 0;
test_case.expect.crtcs[0].transform = META_MONITOR_TRANSFORM_NORMAL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]