monitor-unit-tests: Add way for test case setup to specify output serial
This is needed to avoid migration tests to avoid the best-effort tiling monitor detection paths. https://bugzilla.gnome.org/show_bug.cgi?id=787629
This commit is contained in:
parent
ea4dbd14bc
commit
efdbeb7c1b
@ -109,6 +109,7 @@ typedef struct _MonitorTestCaseOutput
|
|||||||
float scale;
|
float scale;
|
||||||
gboolean is_laptop_panel;
|
gboolean is_laptop_panel;
|
||||||
gboolean is_underscanning;
|
gboolean is_underscanning;
|
||||||
|
const char *serial;
|
||||||
} MonitorTestCaseOutput;
|
} MonitorTestCaseOutput;
|
||||||
|
|
||||||
typedef struct _MonitorTestCaseCrtc
|
typedef struct _MonitorTestCaseCrtc
|
||||||
@ -907,6 +908,7 @@ create_monitor_test_setup (MonitorTestCase *test_case,
|
|||||||
int n_possible_crtcs;
|
int n_possible_crtcs;
|
||||||
int scale;
|
int scale;
|
||||||
gboolean is_laptop_panel;
|
gboolean is_laptop_panel;
|
||||||
|
const char *serial;
|
||||||
|
|
||||||
crtc_index = test_case->setup.outputs[i].crtc;
|
crtc_index = test_case->setup.outputs[i].crtc;
|
||||||
if (crtc_index == -1)
|
if (crtc_index == -1)
|
||||||
@ -952,6 +954,10 @@ create_monitor_test_setup (MonitorTestCase *test_case,
|
|||||||
|
|
||||||
is_laptop_panel = test_case->setup.outputs[i].is_laptop_panel;
|
is_laptop_panel = test_case->setup.outputs[i].is_laptop_panel;
|
||||||
|
|
||||||
|
serial = test_case->setup.outputs[i].serial;
|
||||||
|
if (!serial)
|
||||||
|
serial = "0x123456";
|
||||||
|
|
||||||
test_setup->outputs[i] = (MetaOutput) {
|
test_setup->outputs[i] = (MetaOutput) {
|
||||||
.crtc = crtc,
|
.crtc = crtc,
|
||||||
.winsys_id = i,
|
.winsys_id = i,
|
||||||
@ -961,7 +967,7 @@ create_monitor_test_setup (MonitorTestCase *test_case,
|
|||||||
++n_normal_panels)),
|
++n_normal_panels)),
|
||||||
.vendor = g_strdup ("MetaProduct's Inc."),
|
.vendor = g_strdup ("MetaProduct's Inc."),
|
||||||
.product = g_strdup ("MetaMonitor"),
|
.product = g_strdup ("MetaMonitor"),
|
||||||
.serial = g_strdup ("0x123456"),
|
.serial = g_strdup (serial),
|
||||||
.suggested_x = -1,
|
.suggested_x = -1,
|
||||||
.suggested_y = -1,
|
.suggested_y = -1,
|
||||||
.hotplug_mode_update = hotplug_mode_update,
|
.hotplug_mode_update = hotplug_mode_update,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user