~ubuntu-branches/ubuntu/quantal/colord/quantal-proposed

« back to all changes in this revision

Viewing changes to libcolord/cd-self-test.c

  • Committer: Package Import Robot
  • Author(s): Sjoerd Simons
  • Date: 2011-10-25 16:21:20 UTC
  • mto: (2.1.1 sid) (1.1.2)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: package-import@ubuntu.com-20111025162120-0aypjqn1zx9n6vgf
Tags: upstream-0.1.13
ImportĀ upstreamĀ versionĀ 0.1.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "cd-sensor-sync.h"
40
40
#include "cd-version.h"
41
41
 
 
42
static gboolean has_colord_process = FALSE;
 
43
 
42
44
/** ver:1.0 ***********************************************************/
43
45
static GMainLoop *_test_loop = NULL;
44
46
static guint _test_loop_timeout_id = 0;
114
116
        _g_test_loop_quit ();
115
117
}
116
118
 
 
119
static gchar *
 
120
colord_get_random_device_id (void)
 
121
{
 
122
        guint32 key;
 
123
        key = g_random_int_range (0x00, 0xffff);
 
124
        return g_strdup_printf ("self-test-%04x", key);
 
125
}
 
126
 
117
127
static void
118
128
colord_client_random_func (void)
119
129
{
148
158
        const gchar *qualifier3[] = {"*.*.*",
149
159
                                     NULL};
150
160
 
 
161
        /* no running colord to use */
 
162
        if (!has_colord_process) {
 
163
                g_print ("[DISABLED] ");
 
164
                return;
 
165
        }
 
166
 
151
167
        key = g_random_int_range (0x00, 0xffff);
152
168
        g_debug ("using random key %04x", key);
153
169
        profile_id = g_strdup_printf ("profile-self-test-%04x", key);
697
713
        CdProfile *profile;
698
714
        CdClient *client;
699
715
 
 
716
        /* no running colord to use */
 
717
        if (!has_colord_process) {
 
718
                g_print ("[DISABLED] ");
 
719
                return;
 
720
        }
 
721
 
700
722
        /* create */
701
723
        client = cd_client_new ();
702
724
        g_assert (client != NULL);
792
814
        CdColorXYZ *values;
793
815
//      gdouble ambient = -2.0f;
794
816
 
 
817
        /* no running colord to use */
 
818
        if (!has_colord_process) {
 
819
                g_print ("[DISABLED] ");
 
820
                return;
 
821
        }
 
822
 
795
823
        client = cd_client_new ();
796
824
        ret = cd_client_connect_sync (client, NULL, &error);
797
825
        g_assert_no_error (error);
960
988
        g_assert_no_error (error);
961
989
        g_assert (ret);
962
990
 
 
991
        /* is there a running colord instance? */
 
992
        has_colord_process = cd_client_get_has_server (client);
 
993
 
963
994
        version = cd_client_get_daemon_version (client);
964
995
        version_str = g_strdup_printf ("%i.%i.%i",
965
996
                                       CD_MAJOR_VERSION,
985
1016
        gchar *profile_id1;
986
1017
        gchar *profile_id2;
987
1018
 
 
1019
        /* no running colord to use */
 
1020
        if (!has_colord_process) {
 
1021
                g_print ("[DISABLED] ");
 
1022
                return;
 
1023
        }
 
1024
 
988
1025
        key = g_random_int_range (0x00, 0xffff);
989
1026
        g_debug ("using random key %04x", key);
990
1027
        profile_id1 = g_strdup_printf ("profile-mapping-%04x_1", key);
1162
1199
        GError *error = NULL;
1163
1200
        gchar full_path[PATH_MAX];
1164
1201
 
 
1202
        /* no running colord to use */
 
1203
        if (!has_colord_process) {
 
1204
                g_print ("[DISABLED] ");
 
1205
                return;
 
1206
        }
 
1207
 
1165
1208
        /* create */
1166
1209
        client = cd_client_new ();
1167
1210
        g_assert (client != NULL);
1192
1235
        g_object_unref (client);
1193
1236
}
1194
1237
 
 
1238
/**
 
1239
 * colord_get_profile_destination:
 
1240
 **/
 
1241
static GFile *
 
1242
colord_get_profile_destination (GFile *file)
 
1243
{
 
1244
        gchar *basename;
 
1245
        gchar *destination;
 
1246
        GFile *dest;
 
1247
 
 
1248
        g_return_val_if_fail (file != NULL, NULL);
 
1249
 
 
1250
        /* get destination filename for this source file */
 
1251
        basename = g_file_get_basename (file);
 
1252
        destination = g_build_filename (g_get_user_data_dir (), "icc", basename, NULL);
 
1253
        dest = g_file_new_for_path (destination);
 
1254
 
 
1255
        g_free (basename);
 
1256
        g_free (destination);
 
1257
        return dest;
 
1258
}
 
1259
 
 
1260
static void
 
1261
colord_client_import_func (void)
 
1262
{
 
1263
        CdClient *client;
 
1264
        CdProfile *profile;
 
1265
        CdProfile *profile2;
 
1266
        gboolean ret;
 
1267
        GFile *file;
 
1268
        GFile *invalid_file;
 
1269
        GFile *dest;
 
1270
        GError *error = NULL;
 
1271
        gchar full_path[PATH_MAX];
 
1272
        gchar *dest_path;
 
1273
 
 
1274
        /* no running colord to use */
 
1275
        if (!has_colord_process) {
 
1276
                g_print ("[DISABLED] ");
 
1277
                return;
 
1278
        }
 
1279
 
 
1280
        /* create */
 
1281
        client = cd_client_new ();
 
1282
        g_assert (client != NULL);
 
1283
 
 
1284
        /* connect */
 
1285
        ret = cd_client_connect_sync (client, NULL, &error);
 
1286
        g_assert_no_error (error);
 
1287
        g_assert (ret);
 
1288
 
 
1289
        /* check we can't import random files */
 
1290
        realpath (TESTDATADIR "/Makefile.am", full_path);
 
1291
        invalid_file = g_file_new_for_path (full_path);
 
1292
        profile2 = cd_client_import_profile_sync (client,
 
1293
                                                  invalid_file,
 
1294
                                                  NULL,
 
1295
                                                  &error);
 
1296
        g_assert_error (error,
 
1297
                        CD_CLIENT_ERROR,
 
1298
                        CD_CLIENT_ERROR_FILE_INVALID);
 
1299
        g_assert (profile2 == NULL);
 
1300
        g_clear_error (&error);
 
1301
 
 
1302
        /* create extra profile */
 
1303
        realpath (TESTDATADIR "/ibm-t61.icc", full_path);
 
1304
        file = g_file_new_for_path (full_path);
 
1305
 
 
1306
        /* ensure it's deleted */
 
1307
        dest = colord_get_profile_destination (file);
 
1308
        if (g_file_query_exists (dest, NULL)) {
 
1309
                ret = g_file_delete (dest, NULL, &error);
 
1310
                g_assert_no_error (error);
 
1311
                g_assert (ret);
 
1312
 
 
1313
                /* wait for daemon to DTRT */
 
1314
                _g_test_loop_run_with_timeout (2000);
 
1315
        }
 
1316
 
 
1317
        /* import it */
 
1318
        profile = cd_client_import_profile_sync (client,
 
1319
                                                 file,
 
1320
                                                 NULL,
 
1321
                                                 &error);
 
1322
        g_assert_no_error (error);
 
1323
        g_assert (profile != NULL);
 
1324
 
 
1325
        /* connect */
 
1326
        ret = cd_profile_connect_sync (profile, NULL, &error);
 
1327
        g_assert_no_error (error);
 
1328
        g_assert (ret);
 
1329
 
 
1330
        /* make sure it's now installed in the right place */
 
1331
        dest_path = g_file_get_path (dest);
 
1332
        g_assert_cmpstr (cd_profile_get_filename (profile), ==, dest_path);
 
1333
 
 
1334
        /* make sure we can't import it again */
 
1335
        profile2 = cd_client_import_profile_sync (client,
 
1336
                                                  file,
 
1337
                                                  NULL,
 
1338
                                                  &error);
 
1339
        g_assert_error (error, CD_CLIENT_ERROR, CD_CLIENT_ERROR_ALREADY_EXISTS);
 
1340
        g_assert (profile2 == NULL);
 
1341
        g_clear_error (&error);
 
1342
 
 
1343
        /* delete it */
 
1344
        ret = g_file_delete (dest, NULL, &error);
 
1345
        g_assert_no_error (error);
 
1346
        g_assert (ret);
 
1347
 
 
1348
        g_free (dest_path);
 
1349
        g_object_unref (invalid_file);
 
1350
        g_object_unref (file);
 
1351
        g_object_unref (dest);
 
1352
        g_object_unref (profile);
 
1353
        g_object_unref (client);
 
1354
}
 
1355
 
1195
1356
static void
1196
1357
colord_delete_profile_good_cb (GObject *object, GAsyncResult *res, gpointer user_data)
1197
1358
{
1228
1389
        CdClient *client;
1229
1390
        CdProfile *profile;
1230
1391
 
 
1392
        /* no running colord to use */
 
1393
        if (!has_colord_process) {
 
1394
                g_print ("[DISABLED] ");
 
1395
                return;
 
1396
        }
 
1397
 
1231
1398
        client = cd_client_new ();
1232
1399
 
1233
1400
        /* connect */
1286
1453
        CdDevice *device;
1287
1454
        CdDevice *device_tmp;
1288
1455
 
 
1456
        /* no running colord to use */
 
1457
        if (!has_colord_process) {
 
1458
                g_print ("[DISABLED] ");
 
1459
                return;
 
1460
        }
 
1461
 
1289
1462
        client = cd_client_new ();
1290
1463
 
1291
1464
        /* connect */
1342
1515
        GError *error = NULL;
1343
1516
        gchar full_path[PATH_MAX];
1344
1517
 
 
1518
        /* no running colord to use */
 
1519
        if (!has_colord_process) {
 
1520
                g_print ("[DISABLED] ");
 
1521
                return;
 
1522
        }
 
1523
 
1345
1524
        /* create */
1346
1525
        client = cd_client_new ();
1347
1526
        g_assert (client != NULL);
1386
1565
}
1387
1566
 
1388
1567
static void
 
1568
colord_device_func (void)
 
1569
{
 
1570
        CdDevice *device;
 
1571
        gboolean ret;
 
1572
        GError *error = NULL;
 
1573
 
 
1574
        /* create a device with an invlid object path */
 
1575
        device = cd_device_new_with_object_path ("/garbage");
 
1576
        g_assert (device != NULL);
 
1577
 
 
1578
        /* connect */
 
1579
        ret = cd_device_connect_sync (device, NULL, &error);
 
1580
        g_assert_error (error, CD_DEVICE_ERROR, CD_DEVICE_ERROR_FAILED);
 
1581
        g_assert (!ret);
 
1582
        g_clear_error (&error);
 
1583
 
 
1584
        g_object_unref (device);
 
1585
}
 
1586
 
 
1587
static void
1389
1588
colord_device_modified_func (void)
1390
1589
{
1391
1590
        CdClient *client;
1398
1597
        gchar full_path[PATH_MAX];
1399
1598
        GPtrArray *array;
1400
1599
 
 
1600
        /* no running colord to use */
 
1601
        if (!has_colord_process) {
 
1602
                g_print ("[DISABLED] ");
 
1603
                return;
 
1604
        }
 
1605
 
1401
1606
        /* create */
1402
1607
        client = cd_client_new ();
1403
1608
        g_assert (client != NULL);
1492
1697
        g_object_unref (client);
1493
1698
}
1494
1699
 
 
1700
/* when we re-add profiles, ensure they are sorted so the newest
 
1701
 * assigned profile is first, not the newest-added */
 
1702
static void
 
1703
colord_profile_ordering_func (void)
 
1704
{
 
1705
        CdClient *client;
 
1706
        CdDevice *device;
 
1707
        CdProfile *profile_tmp;
 
1708
        CdProfile *profile1;
 
1709
        CdProfile *profile2;
 
1710
        gboolean ret;
 
1711
        GError *error = NULL;
 
1712
        GPtrArray *array;
 
1713
        gchar *device_id;
 
1714
 
 
1715
        /* no running colord to use */
 
1716
        if (!has_colord_process) {
 
1717
                g_print ("[DISABLED] ");
 
1718
                return;
 
1719
        }
 
1720
 
 
1721
        /* create */
 
1722
        client = cd_client_new ();
 
1723
        g_assert (client != NULL);
 
1724
 
 
1725
        /* create device */
 
1726
        device_id = colord_get_random_device_id ();
 
1727
        device = cd_client_create_device_sync (client,
 
1728
                                               device_id,
 
1729
                                               CD_OBJECT_SCOPE_TEMP,
 
1730
                                               NULL,
 
1731
                                               NULL,
 
1732
                                               &error);
 
1733
        g_assert_no_error (error);
 
1734
        g_assert (device != NULL);
 
1735
 
 
1736
        /* connect */
 
1737
        ret = cd_device_connect_sync (device, NULL, &error);
 
1738
        g_assert_no_error (error);
 
1739
        g_assert (ret);
 
1740
 
 
1741
        g_assert_cmpstr (cd_device_get_id (device), ==, device_id);
 
1742
 
 
1743
        /* get new number of profiles */
 
1744
        array = cd_device_get_profiles (device);
 
1745
        g_assert (array != NULL);
 
1746
        g_assert_cmpint (array->len, ==, 0);
 
1747
        g_ptr_array_unref (array);
 
1748
 
 
1749
        /* create older profile */
 
1750
        profile2 = cd_client_create_profile_sync (client,
 
1751
                                                  "profile2",
 
1752
                                                  CD_OBJECT_SCOPE_TEMP,
 
1753
                                                  NULL,
 
1754
                                                  NULL,
 
1755
                                                  &error);
 
1756
        g_assert_no_error (error);
 
1757
        g_assert (profile2 != NULL);
 
1758
 
 
1759
        /* assign profile to device */
 
1760
        ret = cd_device_add_profile_sync (device,
 
1761
                                          CD_DEVICE_RELATION_HARD,
 
1762
                                          profile2,
 
1763
                                          NULL,
 
1764
                                          &error);
 
1765
        g_assert_no_error (error);
 
1766
        g_assert (ret);
 
1767
 
 
1768
        /* create newer profile */
 
1769
        profile1 = cd_client_create_profile_sync (client,
 
1770
                                                  "profile1",
 
1771
                                                  CD_OBJECT_SCOPE_TEMP,
 
1772
                                                  NULL,
 
1773
                                                  NULL,
 
1774
                                                  &error);
 
1775
        g_assert_no_error (error);
 
1776
        g_assert (profile1 != NULL);
 
1777
 
 
1778
        /* assign profile to device */
 
1779
        ret = cd_device_add_profile_sync (device,
 
1780
                                          CD_DEVICE_RELATION_HARD,
 
1781
                                          profile1,
 
1782
                                          NULL,
 
1783
                                          &error);
 
1784
        g_assert_no_error (error);
 
1785
        g_assert (ret);
 
1786
 
 
1787
        /* wait for daemon */
 
1788
        _g_test_loop_run_with_timeout (50);
 
1789
        _g_test_loop_quit ();
 
1790
 
 
1791
        /* get new number of profiles */
 
1792
        array = cd_device_get_profiles (device);
 
1793
        g_assert (array != NULL);
 
1794
        g_assert_cmpint (array->len, ==, 2);
 
1795
        profile_tmp = CD_PROFILE (g_ptr_array_index (array, 0));
 
1796
        g_assert_cmpstr (cd_profile_get_object_path (profile_tmp),
 
1797
                         ==,
 
1798
                         "/org/freedesktop/ColorManager/profiles/profile1");
 
1799
        profile_tmp = CD_PROFILE (g_ptr_array_index (array, 1));
 
1800
        g_assert_cmpstr (cd_profile_get_object_path (profile_tmp),
 
1801
                         ==,
 
1802
                         "/org/freedesktop/ColorManager/profiles/profile2");
 
1803
        g_ptr_array_unref (array);
 
1804
 
 
1805
        /* delete profiles */
 
1806
        ret = cd_client_delete_profile_sync (client, profile1, NULL, &error);
 
1807
        g_assert_no_error (error);
 
1808
        g_assert (ret);
 
1809
        ret = cd_client_delete_profile_sync (client, profile2, NULL, &error);
 
1810
        g_assert_no_error (error);
 
1811
        g_assert (ret);
 
1812
 
 
1813
        /* wait for daemon */
 
1814
        _g_test_loop_run_with_timeout (50);
 
1815
        _g_test_loop_quit ();
 
1816
 
 
1817
        /* get new number of profiles */
 
1818
        array = cd_device_get_profiles (device);
 
1819
        g_assert (array != NULL);
 
1820
        g_assert_cmpint (array->len, ==, 0);
 
1821
        g_ptr_array_unref (array);
 
1822
 
 
1823
        /* done with profiles */
 
1824
        g_object_unref (profile1);
 
1825
        g_object_unref (profile2);
 
1826
 
 
1827
        /* create newer profile */
 
1828
        profile1 = cd_client_create_profile_sync (client,
 
1829
                                                  "profile1",
 
1830
                                                  CD_OBJECT_SCOPE_TEMP,
 
1831
                                                  NULL,
 
1832
                                                  NULL,
 
1833
                                                  &error);
 
1834
        g_assert_no_error (error);
 
1835
        g_assert (profile1 != NULL);
 
1836
 
 
1837
        /* wait for daemon */
 
1838
        _g_test_loop_run_with_timeout (50);
 
1839
        _g_test_loop_quit ();
 
1840
 
 
1841
        /* get new number of profiles */
 
1842
        array = cd_device_get_profiles (device);
 
1843
        g_assert (array != NULL);
 
1844
        g_assert_cmpint (array->len, ==, 1);
 
1845
        profile_tmp = CD_PROFILE (g_ptr_array_index (array, 0));
 
1846
        g_assert_cmpstr (cd_profile_get_object_path (profile_tmp),
 
1847
                         ==,
 
1848
                         "/org/freedesktop/ColorManager/profiles/profile1");
 
1849
        g_ptr_array_unref (array);
 
1850
 
 
1851
        /* create older profile */
 
1852
        profile2 = cd_client_create_profile_sync (client,
 
1853
                                                  "profile2",
 
1854
                                                  CD_OBJECT_SCOPE_TEMP,
 
1855
                                                  NULL,
 
1856
                                                  NULL,
 
1857
                                                  &error);
 
1858
        g_assert_no_error (error);
 
1859
        g_assert (profile2 != NULL);
 
1860
 
 
1861
        /* wait for daemon */
 
1862
        _g_test_loop_run_with_timeout (50);
 
1863
        _g_test_loop_quit ();
 
1864
 
 
1865
        /* get new number of profiles */
 
1866
        array = cd_device_get_profiles (device);
 
1867
        g_assert (array != NULL);
 
1868
        g_assert_cmpint (array->len, ==, 2);
 
1869
        profile_tmp = CD_PROFILE (g_ptr_array_index (array, 0));
 
1870
        g_assert_cmpstr (cd_profile_get_object_path (profile_tmp),
 
1871
                         ==,
 
1872
                         "/org/freedesktop/ColorManager/profiles/profile1");
 
1873
        profile_tmp = CD_PROFILE (g_ptr_array_index (array, 1));
 
1874
        g_assert_cmpstr (cd_profile_get_object_path (profile_tmp),
 
1875
                         ==,
 
1876
                         "/org/freedesktop/ColorManager/profiles/profile2");
 
1877
        g_ptr_array_unref (array);
 
1878
 
 
1879
        g_free (device_id);
 
1880
        g_object_unref (profile1);
 
1881
        g_object_unref (profile2);
 
1882
        g_object_unref (device);
 
1883
        g_object_unref (client);
 
1884
}
 
1885
 
 
1886
/* ensure duplicate profiles have the correct error code */
 
1887
static void
 
1888
colord_profile_duplicate_func (void)
 
1889
{
 
1890
        CdClient *client;
 
1891
        CdProfile *profile1;
 
1892
        CdProfile *profile2;
 
1893
        gboolean ret;
 
1894
        gchar full_path[PATH_MAX];
 
1895
        GError *error = NULL;
 
1896
        GHashTable *profile_props;
 
1897
 
 
1898
        /* no running colord to use */
 
1899
        if (!has_colord_process) {
 
1900
                g_print ("[DISABLED] ");
 
1901
                return;
 
1902
        }
 
1903
 
 
1904
        /* create */
 
1905
        client = cd_client_new ();
 
1906
        g_assert (client != NULL);
 
1907
 
 
1908
        /* create extra profile */
 
1909
        realpath (TESTDATADIR "/ibm-t61.icc", full_path);
 
1910
        profile_props = g_hash_table_new_full (g_str_hash, g_str_equal,
 
1911
                                               g_free, g_free);
 
1912
        g_hash_table_insert (profile_props,
 
1913
                             g_strdup ("Filename"),
 
1914
                             g_strdup (full_path));
 
1915
 
 
1916
        /* create profile */
 
1917
        profile2 = cd_client_create_profile_sync (client,
 
1918
                                                  "profile_duplicate",
 
1919
                                                  CD_OBJECT_SCOPE_TEMP,
 
1920
                                                  profile_props,
 
1921
                                                  NULL,
 
1922
                                                  &error);
 
1923
        g_assert_no_error (error);
 
1924
        g_assert (profile2 != NULL);
 
1925
 
 
1926
        /* create same profile */
 
1927
        profile1 = cd_client_create_profile_sync (client,
 
1928
                                                  "profile_duplicate",
 
1929
                                                  CD_OBJECT_SCOPE_TEMP,
 
1930
                                                  profile_props,
 
1931
                                                  NULL,
 
1932
                                                  &error);
 
1933
        g_assert_error (error,
 
1934
                        CD_CLIENT_ERROR,
 
1935
                        CD_CLIENT_ERROR_ALREADY_EXISTS);
 
1936
        g_assert (profile1 == NULL);
 
1937
        g_clear_error (&error);
 
1938
 
 
1939
        /* delete profile */
 
1940
        ret = cd_client_delete_profile_sync (client,
 
1941
                                             profile2,
 
1942
                                             NULL,
 
1943
                                             &error);
 
1944
        g_assert_no_error (error);
 
1945
        g_assert (ret);
 
1946
 
 
1947
        g_hash_table_unref (profile_props);
 
1948
        g_object_unref (profile2);
 
1949
        g_object_unref (client);
 
1950
}
 
1951
 
 
1952
static void
 
1953
colord_device_duplicate_func (void)
 
1954
{
 
1955
        CdClient *client;
 
1956
        CdDevice *device1;
 
1957
        CdDevice *device2;
 
1958
        GError *error = NULL;
 
1959
        gchar *device_id;
 
1960
 
 
1961
        /* no running colord to use */
 
1962
        if (!has_colord_process) {
 
1963
                g_print ("[DISABLED] ");
 
1964
                return;
 
1965
        }
 
1966
 
 
1967
        /* create */
 
1968
        client = cd_client_new ();
 
1969
        g_assert (client != NULL);
 
1970
 
 
1971
        /* create device */
 
1972
        device_id = colord_get_random_device_id ();
 
1973
        device1 = cd_client_create_device_sync (client,
 
1974
                                                device_id,
 
1975
                                                CD_OBJECT_SCOPE_TEMP,
 
1976
                                                NULL,
 
1977
                                                NULL,
 
1978
                                                &error);
 
1979
        g_assert_no_error (error);
 
1980
        g_assert (device1 != NULL);
 
1981
 
 
1982
        /* create duplicate device */
 
1983
        device2 = cd_client_create_device_sync (client,
 
1984
                                                device_id,
 
1985
                                                CD_OBJECT_SCOPE_TEMP,
 
1986
                                                NULL,
 
1987
                                                NULL,
 
1988
                                                &error);
 
1989
        g_assert_error (error,
 
1990
                        CD_CLIENT_ERROR,
 
1991
                        CD_CLIENT_ERROR_ALREADY_EXISTS);
 
1992
        g_assert (device2 == NULL);
 
1993
        g_clear_error (&error);
 
1994
 
 
1995
        g_free (device_id);
 
1996
        g_object_unref (device1);
 
1997
        g_object_unref (client);
 
1998
}
 
1999
 
1495
2000
int
1496
2001
main (int argc, char **argv)
1497
2002
{
1504
2009
 
1505
2010
        /* tests go here */
1506
2011
        g_test_add_func ("/colord/color", colord_color_func);
 
2012
        g_test_add_func ("/colord/device", colord_device_func);
1507
2013
        g_test_add_func ("/colord/client", colord_client_func);
 
2014
        g_test_add_func ("/colord/device-duplicate", colord_device_duplicate_func);
1508
2015
        g_test_add_func ("/colord/profile-metadata", colord_icc_meta_dict_func);
 
2016
        g_test_add_func ("/colord/profile-ordering", colord_profile_ordering_func);
 
2017
        g_test_add_func ("/colord/profile-duplicate", colord_profile_duplicate_func);
1509
2018
        g_test_add_func ("/colord/device-mapping", colord_device_mapping_func);
1510
2019
        g_test_add_func ("/colord/client-random", colord_client_random_func);
1511
2020
        g_test_add_func ("/colord/sensor", colord_sensor_func);
1515
2024
        if (g_test_thorough ())
1516
2025
                g_test_add_func ("/colord/client-systemwide", colord_client_systemwide_func);
1517
2026
        g_test_add_func ("/colord/client-fd-pass", colord_client_fd_pass_func);
 
2027
        g_test_add_func ("/colord/client-import", colord_client_import_func);
1518
2028
        return g_test_run ();
1519
2029
}
1520
2030