[gnome-settings-daemon/benzea/misc-fixes: 172/172] color: Disable vendor check in JHBuild



commit a0525eddb54b60a6b850fa7d45b57bdd2aa51874
Author: Benjamin Berg <bberg redhat com>
Date:   Tue Apr 16 10:45:43 2019 +0200

    color: Disable vendor check in JHBuild
    
    I keep running into the issue that the vendor lookup fails in my jhbuild
    environment. This is kind of annoying, and I suspect it may also affect
    other people.
    
    Disable the test locally, it will be still be run in the CI environment
    so that this shouldn't create corner cases that are missed.

 plugins/color/gcm-self-test.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/color/gcm-self-test.c b/plugins/color/gcm-self-test.c
index 5cdcf987..55411fd5 100644
--- a/plugins/color/gcm-self-test.c
+++ b/plugins/color/gcm-self-test.c
@@ -252,7 +252,9 @@ gcm_test_edid_func (void)
         g_assert (ret);
 
         g_assert_cmpstr (gcm_edid_get_monitor_name (edid), ==, "L225W");
-        g_assert_true (gcm_vendor_is_goldstar (gcm_edid_get_vendor_name (edid)));
+        /* JHBuild environments are often broken with regard to the hwdb lookup */
+        if (g_strcmp0 (g_getenv ("UNDER_JHBUILD"), "true") != 0)
+                g_assert_true (gcm_vendor_is_goldstar (gcm_edid_get_vendor_name (edid)));
         g_assert_cmpstr (gcm_edid_get_serial_number (edid), ==, "34398");
         g_assert_cmpstr (gcm_edid_get_eisa_id (edid), ==, NULL);
         g_assert_cmpstr (gcm_edid_get_checksum (edid), ==, "0bb44865bb29984a4bae620656c31368");
@@ -273,7 +275,9 @@ gcm_test_edid_func (void)
         g_assert (ret);
 
         g_assert_cmpstr (gcm_edid_get_monitor_name (edid), ==, NULL);
-        g_assert_cmpstr (gcm_edid_get_vendor_name (edid), ==, "IBM Brasil");
+        /* JHBuild environments are often broken with regard to the hwdb lookup */
+        if (g_strcmp0 (g_getenv ("UNDER_JHBUILD"), "true") != 0)
+                g_assert_cmpstr (gcm_edid_get_vendor_name (edid), ==, "IBM Brasil");
         g_assert_cmpstr (gcm_edid_get_serial_number (edid), ==, NULL);
         g_assert_cmpstr (gcm_edid_get_eisa_id (edid), ==, "LTN154P2-L05");
         g_assert_cmpstr (gcm_edid_get_checksum (edid), ==, "e1865128c7cd5e5ed49ecfc8102f6f9c");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]