Merge lp:~compiz-team/compiz/compiz.ccs_gsettings_conformance_test into lp:compiz/0.9.8
- compiz.ccs_gsettings_conformance_test
- Merge into 0.9.8
Status: | Superseded |
---|---|
Proposed branch: | lp:~compiz-team/compiz/compiz.ccs_gsettings_conformance_test |
Merge into: | lp:compiz/0.9.8 |
Prerequisite: | lp:~compiz-team/compiz/compiz.ccs_split_gsettings_rw_funcs |
Diff against target: |
885 lines (+607/-69) 10 files modified
compizconfig/compizconfig-python/tests/compiz_config_test.py (+4/-1) compizconfig/gsettings/gsettings_backend_shared/gsettings_util.c (+24/-9) compizconfig/gsettings/gsettings_backend_shared/gsettings_util.h (+2/-3) compizconfig/gsettings/src/gsettings.c (+3/-0) compizconfig/gsettings/tests/CMakeLists.txt (+19/-3) compizconfig/gsettings/tests/backend-conformance-config.h.in (+1/-0) compizconfig/gsettings/tests/org.compiz.mock.gschema.xml (+0/-53) compizconfig/gsettings/tests/test_gsettings_conformance.cpp (+548/-0) compizconfig/libcompizconfig/config/CMakeLists.txt (+3/-0) compizconfig/libcompizconfig/config/config_test (+3/-0) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.ccs_gsettings_conformance_test |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Compiz Maintainers | Pending | ||
Review via email: mp+118492@code.launchpad.net |
This proposal supersedes a proposal from 2012-08-07.
Commit message
Description of the change
Instantiate the GSettings backend in a test harness and run the conformance tests on it.
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal | # |
- 3549. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3550. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3551. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3552. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3553. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3554. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3555. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3556. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3557. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3558. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3559. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3560. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3561. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3562. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3563. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3564. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3565. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3566. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3567. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3568. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3569. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3570. By Sam Spilsbury
-
Merge
- 3571. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3572. By Sam Spilsbury
-
Started on a separate GNOME integration object, so we can re-use the logic etc
- 3573. By Sam Spilsbury
-
Fix typo
- 3574. By Sam Spilsbury
-
Tests using the pluggable integration backends mostly passing
- 3575. By Sam Spilsbury
-
Always update the current profile when we need to get a list of existing profiles -
it may have changed - 3576. By Sam Spilsbury
-
Refactor gconf-integration a bit more, make it less coupled with the gsettings backend
- 3577. By Sam Spilsbury
-
Put code back into the right place, make GMock shut up
- 3578. By Sam Spilsbury
-
Added a "null" integration backend, this can be used when building without GConf
integration support - 3579. By Sam Spilsbury
-
Remove useless stuff from header files
- 3580. By Sam Spilsbury
-
Remove unused registerGConfClient
- 3581. By Sam Spilsbury
-
CCSIntegrationB
ackend -> CCSIntegration - 3582. By Sam Spilsbury
-
Merge
- 3583. By Sam Spilsbury
-
Remove public definition of private data
- 3584. By Sam Spilsbury
-
Merge
- 3585. By Sam Spilsbury
-
Fix merge markers...
- 3586. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3587. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3588. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3589. By Sam Spilsbury
-
Merge
- 3590. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3591. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3592. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3593. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3594. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3595. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3596. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3597. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3598. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3599. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3600. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3601. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3602. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3603. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3604. By Sam Spilsbury
-
Merge
- 3605. By Sam Spilsbury
-
Remove cruft
- 3606. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3607. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3608. By Sam Spilsbury
-
Merge
- 3609. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3610. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3611. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3612. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3613. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3614. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3615. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3616. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3617. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3618. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3619. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3620. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3621. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3622. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3623. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3624. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3625. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3626. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3627. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3628. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3629. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3630. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3631. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3632. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3633. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3634. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3635. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3636. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3637. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3638. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3639. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3640. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3641. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3642. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3643. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3644. By Sam Spilsbury
-
Merge
- 3645. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3646. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3647. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3648. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3649. By Sam Spilsbury
-
Simplify AutoDestroy
- 3650. By Sam Spilsbury
-
Remove autodestroy
- 3651. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3652. By Sam Spilsbury
-
Split up some of the interface
- 3653. By Sam Spilsbury
-
Split out the mock backend key value storage from the mock backend
- 3654. By Sam Spilsbury
-
Split out the gsettings write/read harness from the backend harness
- 3655. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3656. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3657. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3658. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3659. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test. - 3660. By Sam Spilsbury
-
Merged compiz.
ccs_gsettings_ additional_ test_coverage into compiz. ccs_gsettings_ conformance_ test.
Unmerged revisions
Preview Diff
1 | === modified file 'compizconfig/compizconfig-python/tests/compiz_config_test.py' | |||
2 | --- compizconfig/compizconfig-python/tests/compiz_config_test.py 2012-07-07 05:53:00 +0000 | |||
3 | +++ compizconfig/compizconfig-python/tests/compiz_config_test.py 2012-08-07 06:57:01 +0000 | |||
4 | @@ -5,10 +5,13 @@ | |||
5 | 5 | arch = subprocess.Popen (["uname", "-p"], stdout=subprocess.PIPE).communicate ()[0][:-1] | 5 | arch = subprocess.Popen (["uname", "-p"], stdout=subprocess.PIPE).communicate ()[0][:-1] |
6 | 6 | 6 | ||
7 | 7 | os.environ["COMPIZ_METADATA_PATH"] = "generated/" | 7 | os.environ["COMPIZ_METADATA_PATH"] = "generated/" |
8 | 8 | os.environ["COMPIZ_CONFIG_PROFILE"] = "" | ||
9 | 9 | os.environ["XDG_CONFIG_HOME"] = "compizconfig/libcompizconfig/config" | ||
10 | 8 | os.environ["LIBCOMPIZCONFIG_BACKEND_PATH"] = "compizconfig/libcompizconfig/backend/" | 10 | os.environ["LIBCOMPIZCONFIG_BACKEND_PATH"] = "compizconfig/libcompizconfig/backend/" |
11 | 9 | os.environ["XDG_DATA_DIRS"] = "generated/" | 11 | os.environ["XDG_DATA_DIRS"] = "generated/" |
12 | 10 | 12 | ||
14 | 11 | sys.path.append ("compizconfig/compizconfig-python/build/lib.linux-" + arch + "-" + str (sys.version_info[0]) + "." + str (sys.version_info[1]) + "/") | 13 | # TODO: does this really work ? |
15 | 14 | sys.path[0] = "compizconfig/compizconfig-python/build/lib.linux-" + arch + "-" + str (sys.version_info[0]) + "." + str (sys.version_info[1]) + "/" | ||
16 | 12 | 15 | ||
17 | 13 | import unittest | 16 | import unittest |
18 | 14 | import compizconfig | 17 | import compizconfig |
19 | 15 | 18 | ||
20 | === modified file 'compizconfig/gsettings/gsettings_backend_shared/gsettings_util.c' | |||
21 | --- compizconfig/gsettings/gsettings_backend_shared/gsettings_util.c 2012-08-07 06:57:00 +0000 | |||
22 | +++ compizconfig/gsettings/gsettings_backend_shared/gsettings_util.c 2012-08-07 06:57:01 +0000 | |||
23 | @@ -944,13 +944,21 @@ | |||
24 | 944 | const char *item; | 944 | const char *item; |
25 | 945 | } FindItemInVariantData; | 945 | } FindItemInVariantData; |
26 | 946 | 946 | ||
27 | 947 | typedef struct _InsertIfNotEqualData | ||
28 | 948 | { | ||
29 | 949 | gboolean skipped; | ||
30 | 950 | const char *item; | ||
31 | 951 | } InsertIfNotEqualData; | ||
32 | 952 | |||
33 | 947 | static void | 953 | static void |
34 | 948 | insertIfNotEqual (GVariantBuilder *builder, const char *item, void *userData) | 954 | insertIfNotEqual (GVariantBuilder *builder, const char *item, void *userData) |
35 | 949 | { | 955 | { |
37 | 950 | const char *cmp = (const char *) userData; | 956 | InsertIfNotEqualData *data = (InsertIfNotEqualData *) userData; |
38 | 951 | 957 | ||
40 | 952 | if (g_strcmp0 (item, cmp)) | 958 | if (g_strcmp0 (item, data->item)) |
41 | 953 | g_variant_builder_add (builder, "s", item); | 959 | g_variant_builder_add (builder, "s", item); |
42 | 960 | else | ||
43 | 961 | data->skipped = TRUE; | ||
44 | 954 | } | 962 | } |
45 | 955 | 963 | ||
46 | 956 | static void | 964 | static void |
47 | @@ -1003,18 +1011,25 @@ | |||
48 | 1003 | return !findItemData.found; | 1011 | return !findItemData.found; |
49 | 1004 | } | 1012 | } |
50 | 1005 | 1013 | ||
54 | 1006 | void | 1014 | gboolean removeItemFromVariant (GVariant **variant, |
55 | 1007 | removeItemFromVariant (GVariant **variant, | 1015 | const char *string) |
53 | 1008 | const char *string) | ||
56 | 1009 | { | 1016 | { |
57 | 1010 | GVariantBuilder newVariantBuilder; | 1017 | GVariantBuilder newVariantBuilder; |
58 | 1011 | 1018 | ||
59 | 1019 | InsertIfNotEqualData data = | ||
60 | 1020 | { | ||
61 | 1021 | FALSE, | ||
62 | 1022 | string | ||
63 | 1023 | }; | ||
64 | 1024 | |||
65 | 1012 | g_variant_builder_init (&newVariantBuilder, G_VARIANT_TYPE ("as")); | 1025 | g_variant_builder_init (&newVariantBuilder, G_VARIANT_TYPE ("as")); |
66 | 1013 | 1026 | ||
68 | 1014 | rebuildVariant (&newVariantBuilder, *variant, insertIfNotEqual, (void *) string); | 1027 | rebuildVariant (&newVariantBuilder, *variant, insertIfNotEqual, (void *) &data); |
69 | 1015 | 1028 | ||
70 | 1016 | g_variant_unref (*variant); | 1029 | g_variant_unref (*variant); |
71 | 1017 | *variant = g_variant_builder_end (&newVariantBuilder); | 1030 | *variant = g_variant_builder_end (&newVariantBuilder); |
72 | 1031 | |||
73 | 1032 | return data.skipped; | ||
74 | 1018 | } | 1033 | } |
75 | 1019 | 1034 | ||
76 | 1020 | void | 1035 | void |
77 | @@ -1109,6 +1124,7 @@ | |||
78 | 1109 | GVariant *plugins; | 1124 | GVariant *plugins; |
79 | 1110 | GVariant *profiles; | 1125 | GVariant *profiles; |
80 | 1111 | const char *currentProfile = ccsGSettingsBackendGetCurrentProfile (backend); | 1126 | const char *currentProfile = ccsGSettingsBackendGetCurrentProfile (backend); |
81 | 1127 | gboolean ret = FALSE; | ||
82 | 1112 | 1128 | ||
83 | 1113 | plugins = ccsGSettingsBackendGetPluginsWithSetKeys (backend); | 1129 | plugins = ccsGSettingsBackendGetPluginsWithSetKeys (backend); |
84 | 1114 | profiles = ccsGSettingsBackendGetExistingProfiles (backend); | 1130 | profiles = ccsGSettingsBackendGetExistingProfiles (backend); |
85 | @@ -1116,18 +1132,17 @@ | |||
86 | 1116 | ccsGSettingsBackendUnsetAllChangedPluginKeysInProfile (backend, context, plugins, currentProfile); | 1132 | ccsGSettingsBackendUnsetAllChangedPluginKeysInProfile (backend, context, plugins, currentProfile); |
87 | 1117 | ccsGSettingsBackendClearPluginsWithSetKeys (backend); | 1133 | ccsGSettingsBackendClearPluginsWithSetKeys (backend); |
88 | 1118 | 1134 | ||
90 | 1119 | removeItemFromVariant (&profiles, profile); | 1135 | ret = removeItemFromVariant (&profiles, profile); |
91 | 1120 | 1136 | ||
92 | 1121 | /* Remove the profile from existing-profiles */ | 1137 | /* Remove the profile from existing-profiles */ |
93 | 1122 | ccsGSettingsBackendSetExistingProfiles (backend, profiles); | 1138 | ccsGSettingsBackendSetExistingProfiles (backend, profiles); |
94 | 1123 | |||
95 | 1124 | ccsGSettingsBackendUpdateProfile (backend, context); | 1139 | ccsGSettingsBackendUpdateProfile (backend, context); |
96 | 1125 | 1140 | ||
97 | 1126 | /* Since we do not call g_settings_set_value on | 1141 | /* Since we do not call g_settings_set_value on |
98 | 1127 | * plugins, we must also unref the variant */ | 1142 | * plugins, we must also unref the variant */ |
99 | 1128 | g_variant_unref (plugins); | 1143 | g_variant_unref (plugins); |
100 | 1129 | 1144 | ||
102 | 1130 | return TRUE; | 1145 | return ret; |
103 | 1131 | } | 1146 | } |
104 | 1132 | 1147 | ||
105 | 1133 | void | 1148 | void |
106 | 1134 | 1149 | ||
107 | === modified file 'compizconfig/gsettings/gsettings_backend_shared/gsettings_util.h' | |||
108 | --- compizconfig/gsettings/gsettings_backend_shared/gsettings_util.h 2012-08-07 06:57:00 +0000 | |||
109 | +++ compizconfig/gsettings/gsettings_backend_shared/gsettings_util.h 2012-08-07 06:57:01 +0000 | |||
110 | @@ -203,9 +203,8 @@ | |||
111 | 203 | appendStringToVariantIfUnique (GVariant **variant, | 203 | appendStringToVariantIfUnique (GVariant **variant, |
112 | 204 | const char *string); | 204 | const char *string); |
113 | 205 | 205 | ||
117 | 206 | void | 206 | gboolean removeItemFromVariant (GVariant **variant, |
118 | 207 | removeItemFromVariant (GVariant **variant, | 207 | const char *string); |
116 | 208 | const char *string); | ||
119 | 209 | 208 | ||
120 | 210 | CCSSettingValueList | 209 | CCSSettingValueList |
121 | 211 | readBoolListValue (GVariantIter *iter, guint nItems, CCSSetting *setting, CCSObjectAllocationInterface *allocator); | 210 | readBoolListValue (GVariantIter *iter, guint nItems, CCSSetting *setting, CCSObjectAllocationInterface *allocator); |
122 | 212 | 211 | ||
123 | === modified file 'compizconfig/gsettings/src/gsettings.c' | |||
124 | --- compizconfig/gsettings/src/gsettings.c 2012-08-07 06:57:00 +0000 | |||
125 | +++ compizconfig/gsettings/src/gsettings.c 2012-08-07 06:57:01 +0000 | |||
126 | @@ -776,6 +776,9 @@ | |||
127 | 776 | 776 | ||
128 | 777 | CCSGSettingsBackendPrivate *priv = (CCSGSettingsBackendPrivate *) ccsObjectGetPrivate (backend); | 777 | CCSGSettingsBackendPrivate *priv = (CCSGSettingsBackendPrivate *) ccsObjectGetPrivate (backend); |
129 | 778 | 778 | ||
130 | 779 | /* Update the current profile in case it was changed compizconfig side */ | ||
131 | 780 | ccsGSettingsBackendUpdateProfile (backend, context); | ||
132 | 781 | |||
133 | 779 | value = ccsGSettingsWrapperGetValue (priv->compizconfigSettings, "existing-profiles"); | 782 | value = ccsGSettingsWrapperGetValue (priv->compizconfigSettings, "existing-profiles"); |
134 | 780 | g_variant_iter_init (&iter, value); | 783 | g_variant_iter_init (&iter, value); |
135 | 781 | while (g_variant_iter_loop (&iter, "s", &profile)) | 784 | while (g_variant_iter_loop (&iter, "s", &profile)) |
136 | 782 | 785 | ||
137 | === modified file 'compizconfig/gsettings/tests/CMakeLists.txt' | |||
138 | --- compizconfig/gsettings/tests/CMakeLists.txt 2012-08-07 06:57:00 +0000 | |||
139 | +++ compizconfig/gsettings/tests/CMakeLists.txt 2012-08-07 06:57:01 +0000 | |||
140 | @@ -10,6 +10,8 @@ | |||
141 | 10 | 10 | ||
142 | 11 | pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS libcompizconfig) | 11 | pkg_check_modules (COMPIZCONFIG_TEST_GSETTINGS libcompizconfig) |
143 | 12 | 12 | ||
144 | 13 | link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests) | ||
145 | 14 | |||
146 | 13 | add_library (compizconfig_ccs_gsettings_wrapper_mock STATIC | 15 | add_library (compizconfig_ccs_gsettings_wrapper_mock STATIC |
147 | 14 | ${CMAKE_CURRENT_SOURCE_DIR}/ccs_gsettings_wrapper_mock.cpp | 16 | ${CMAKE_CURRENT_SOURCE_DIR}/ccs_gsettings_wrapper_mock.cpp |
148 | 15 | ${CMAKE_CURRENT_SOURCE_DIR}/ccs_gsettings_wrapper_mock.h) | 17 | ${CMAKE_CURRENT_SOURCE_DIR}/ccs_gsettings_wrapper_mock.h) |
149 | @@ -24,7 +26,8 @@ | |||
150 | 24 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp | 26 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings.cpp |
151 | 25 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h) | 27 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_tests.h) |
152 | 26 | 28 | ||
154 | 27 | link_directories (${CMAKE_CURRENT_BINARY_DIR}/../../libcompizconfig/tests) | 29 | add_executable (compizconfig_test_gsettings_conformance |
155 | 30 | ${CMAKE_CURRENT_SOURCE_DIR}/test_gsettings_conformance.cpp) | ||
156 | 28 | 31 | ||
157 | 29 | target_link_libraries (compizconfig_test_gsettings | 32 | target_link_libraries (compizconfig_test_gsettings |
158 | 30 | gsettings_backend_shared | 33 | gsettings_backend_shared |
159 | @@ -37,6 +40,9 @@ | |||
160 | 37 | ${GTEST_BOTH_LIBRARIES} | 40 | ${GTEST_BOTH_LIBRARIES} |
161 | 38 | ${GMOCK_MAIN_LIBRARY}) | 41 | ${GMOCK_MAIN_LIBRARY}) |
162 | 39 | 42 | ||
163 | 43 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in | ||
164 | 44 | ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h) | ||
165 | 45 | |||
166 | 40 | add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml | 46 | add_custom_command (OUTPUT ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml |
167 | 41 | COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml | 47 | COMMAND cp -r ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml ${CMAKE_BINARY_DIR}/generated/glib-2.0/schemas/org.compiz.mock.gschema.xml |
168 | 42 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml | 48 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/org.compiz.mock.gschema.xml |
169 | @@ -47,7 +53,17 @@ | |||
170 | 47 | 53 | ||
171 | 48 | add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema) | 54 | add_gsettings_schema_to_recompilation_list (compiz_gsettings_mock_schema) |
172 | 49 | 55 | ||
175 | 50 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/gsettings-mock-schemas-config.h.in | 56 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/backend-conformance-config.h.in |
176 | 51 | ${CMAKE_CURRENT_BINARY_DIR}/gsettings-mock-schemas-config.h) | 57 | ${CMAKE_CURRENT_BINARY_DIR}/backend-conformance-config.h) |
177 | 58 | |||
178 | 59 | target_link_libraries (compizconfig_test_gsettings_conformance | ||
179 | 60 | gsettings_backend_shared | ||
180 | 61 | compizconfig_ccs_setting_mock | ||
181 | 62 | compizconfig_ccs_plugin_mock | ||
182 | 63 | compizconfig_ccs_context_mock | ||
183 | 64 | ${COMPIZCONFIG_TEST_GSETTINGS_LIBRARIES} | ||
184 | 65 | ${GTEST_BOTH_LIBRARIES} | ||
185 | 66 | ${GMOCK_MAIN_LIBRARY}) | ||
186 | 52 | 67 | ||
187 | 53 | compiz_discover_tests (compizconfig_test_gsettings COVERAGE gsettings_backend_shared) | 68 | compiz_discover_tests (compizconfig_test_gsettings COVERAGE gsettings_backend_shared) |
188 | 69 | compiz_discover_tests (compizconfig_test_gsettings_conformance COVERAGE gsettings_backend_shared gsettings) | ||
189 | 54 | 70 | ||
190 | === added file 'compizconfig/gsettings/tests/backend-conformance-config.h.in' | |||
191 | --- compizconfig/gsettings/tests/backend-conformance-config.h.in 1970-01-01 00:00:00 +0000 | |||
192 | +++ compizconfig/gsettings/tests/backend-conformance-config.h.in 2012-08-07 06:57:01 +0000 | |||
193 | @@ -0,0 +1,1 @@ | |||
194 | 1 | #define BACKEND_BINARY_PATH "@CMAKE_BINARY_DIR@/compizconfig/gsettings" | ||
195 | 0 | 2 | ||
196 | === added file 'compizconfig/gsettings/tests/org.compiz.mock.gschema.xml' | |||
197 | --- compizconfig/gsettings/tests/org.compiz.mock.gschema.xml 1970-01-01 00:00:00 +0000 | |||
198 | +++ compizconfig/gsettings/tests/org.compiz.mock.gschema.xml 2012-08-07 06:57:01 +0000 | |||
199 | @@ -0,0 +1,53 @@ | |||
200 | 1 | <?xml version="1.0"?> | ||
201 | 2 | <schemalist> | ||
202 | 3 | <schema id="org.compiz.mock" gettext-domain="compiz"> | ||
203 | 4 | <key type="i" name="integer-setting"> | ||
204 | 5 | <default>0</default> | ||
205 | 6 | </key> | ||
206 | 7 | <key type="b" name="boolean-setting"> | ||
207 | 8 | <default>false</default> | ||
208 | 9 | </key> | ||
209 | 10 | <key type="d" name="float-setting"> | ||
210 | 11 | <default>0.0</default> | ||
211 | 12 | </key> | ||
212 | 13 | <key type="s" name="string-setting"> | ||
213 | 14 | <default>""</default> | ||
214 | 15 | </key> | ||
215 | 16 | <key type="s" name="match-setting"> | ||
216 | 17 | <default>""</default> | ||
217 | 18 | </key> | ||
218 | 19 | <key type="b" name="bell-setting"> | ||
219 | 20 | <default>false</default> | ||
220 | 21 | </key> | ||
221 | 22 | <key type="s" name="color-setting"> | ||
222 | 23 | <default>""</default> | ||
223 | 24 | </key> | ||
224 | 25 | <key type="s" name="key-setting"> | ||
225 | 26 | <default>""</default> | ||
226 | 27 | </key> | ||
227 | 28 | <key type="s" name="button-setting"> | ||
228 | 29 | <default>""</default> | ||
229 | 30 | </key> | ||
230 | 31 | <key type="s" name="edge-setting"> | ||
231 | 32 | <default>""</default> | ||
232 | 33 | </key> | ||
233 | 34 | <key type="ai" name="int-list-setting"> | ||
234 | 35 | <default>[0]</default> | ||
235 | 36 | </key> | ||
236 | 37 | <key type="ad" name="float-list-setting"> | ||
237 | 38 | <default>[0.0]</default> | ||
238 | 39 | </key> | ||
239 | 40 | <key type="ab" name="bool-list-setting"> | ||
240 | 41 | <default>[true]</default> | ||
241 | 42 | </key> | ||
242 | 43 | <key type="as" name="string-list-setting"> | ||
243 | 44 | <default>[""]</default> | ||
244 | 45 | </key> | ||
245 | 46 | <key type="as" name="match-list-setting"> | ||
246 | 47 | <default>[""]</default> | ||
247 | 48 | </key> | ||
248 | 49 | <key type="as" name="color-list-setting"> | ||
249 | 50 | <default>[""]</default> | ||
250 | 51 | </key> | ||
251 | 52 | </schema> | ||
252 | 53 | </schemalist> | ||
253 | 0 | 54 | ||
254 | === removed file 'compizconfig/gsettings/tests/org.compiz.mock.gschema.xml' | |||
255 | --- compizconfig/gsettings/tests/org.compiz.mock.gschema.xml 2012-08-07 06:57:00 +0000 | |||
256 | +++ compizconfig/gsettings/tests/org.compiz.mock.gschema.xml 1970-01-01 00:00:00 +0000 | |||
257 | @@ -1,53 +0,0 @@ | |||
258 | 1 | <?xml version="1.0"?> | ||
259 | 2 | <schemalist> | ||
260 | 3 | <schema id="org.compiz.mock" gettext-domain="compiz"> | ||
261 | 4 | <key type="i" name="integer-setting"> | ||
262 | 5 | <default>0</default> | ||
263 | 6 | </key> | ||
264 | 7 | <key type="b" name="boolean-setting"> | ||
265 | 8 | <default>false</default> | ||
266 | 9 | </key> | ||
267 | 10 | <key type="d" name="float-setting"> | ||
268 | 11 | <default>0.0</default> | ||
269 | 12 | </key> | ||
270 | 13 | <key type="s" name="string-setting"> | ||
271 | 14 | <default>""</default> | ||
272 | 15 | </key> | ||
273 | 16 | <key type="s" name="match-setting"> | ||
274 | 17 | <default>""</default> | ||
275 | 18 | </key> | ||
276 | 19 | <key type="b" name="bell-setting"> | ||
277 | 20 | <default>false</default> | ||
278 | 21 | </key> | ||
279 | 22 | <key type="s" name="color-setting"> | ||
280 | 23 | <default>""</default> | ||
281 | 24 | </key> | ||
282 | 25 | <key type="s" name="key-setting"> | ||
283 | 26 | <default>""</default> | ||
284 | 27 | </key> | ||
285 | 28 | <key type="s" name="button-setting"> | ||
286 | 29 | <default>""</default> | ||
287 | 30 | </key> | ||
288 | 31 | <key type="s" name="edge-setting"> | ||
289 | 32 | <default>""</default> | ||
290 | 33 | </key> | ||
291 | 34 | <key type="ai" name="int-list-setting"> | ||
292 | 35 | <default>[0]</default> | ||
293 | 36 | </key> | ||
294 | 37 | <key type="ad" name="float-list-setting"> | ||
295 | 38 | <default>[0.0]</default> | ||
296 | 39 | </key> | ||
297 | 40 | <key type="ab" name="bool-list-setting"> | ||
298 | 41 | <default>[true]</default> | ||
299 | 42 | </key> | ||
300 | 43 | <key type="as" name="string-list-setting"> | ||
301 | 44 | <default>[""]</default> | ||
302 | 45 | </key> | ||
303 | 46 | <key type="as" name="match-list-setting"> | ||
304 | 47 | <default>[""]</default> | ||
305 | 48 | </key> | ||
306 | 49 | <key type="as" name="color-list-setting"> | ||
307 | 50 | <default>[""]</default> | ||
308 | 51 | </key> | ||
309 | 52 | </schema> | ||
310 | 53 | </schemalist> | ||
311 | 54 | 0 | ||
312 | === added file 'compizconfig/gsettings/tests/test_gsettings_conformance.cpp' | |||
313 | --- compizconfig/gsettings/tests/test_gsettings_conformance.cpp 1970-01-01 00:00:00 +0000 | |||
314 | +++ compizconfig/gsettings/tests/test_gsettings_conformance.cpp 2012-08-07 06:57:01 +0000 | |||
315 | @@ -0,0 +1,548 @@ | |||
316 | 1 | #include <gtest/gtest.h> | ||
317 | 2 | #include <gmock/gmock.h> | ||
318 | 3 | |||
319 | 4 | #include <gsettings_util.h> | ||
320 | 5 | |||
321 | 6 | #include <gio/gio.h> | ||
322 | 7 | |||
323 | 8 | #include "backend-conformance-config.h" | ||
324 | 9 | #include "gsettings-mock-schemas-config.h" | ||
325 | 10 | |||
326 | 11 | #include <ccs.h> | ||
327 | 12 | #include <compizconfig_backend_concept_test.h> | ||
328 | 13 | |||
329 | 14 | #include <iostream> | ||
330 | 15 | |||
331 | 16 | using ::testing::AtLeast; | ||
332 | 17 | using ::testing::Pointee; | ||
333 | 18 | using ::testing::ReturnNull; | ||
334 | 19 | |||
335 | 20 | namespace | ||
336 | 21 | { | ||
337 | 22 | template <typename T> | ||
338 | 23 | class AutoDestroyHelper | ||
339 | 24 | { | ||
340 | 25 | public: | ||
341 | 26 | |||
342 | 27 | typedef void (*SimpleDestructor) (T *); | ||
343 | 28 | typedef boost::shared_ptr <T> TPtr; | ||
344 | 29 | |||
345 | 30 | AutoDestroyHelper (T *t, | ||
346 | 31 | SimpleDestructor d) : | ||
347 | 32 | mShared (t, boost::bind (d, _1)) | ||
348 | 33 | { | ||
349 | 34 | } | ||
350 | 35 | |||
351 | 36 | operator const TPtr & () | ||
352 | 37 | { | ||
353 | 38 | return mShared; | ||
354 | 39 | } | ||
355 | 40 | |||
356 | 41 | private: | ||
357 | 42 | |||
358 | 43 | TPtr mShared; | ||
359 | 44 | }; | ||
360 | 45 | } | ||
361 | 46 | |||
362 | 47 | class CCSGSettingsBackendEnv : | ||
363 | 48 | public CCSBackendConceptTestEnvironmentInterface | ||
364 | 49 | { | ||
365 | 50 | public: | ||
366 | 51 | |||
367 | 52 | typedef boost::shared_ptr <GVariant> GVariantShared; | ||
368 | 53 | |||
369 | 54 | CCSGSettingsBackendEnv () : | ||
370 | 55 | pluginToMatch ("mock") | ||
371 | 56 | { | ||
372 | 57 | g_type_init (); | ||
373 | 58 | } | ||
374 | 59 | |||
375 | 60 | /* A wrapper to prevent signals from being added */ | ||
376 | 61 | static void connectToSignalWrapper (CCSBackend *backend, CCSGSettingsWrapper *wrapper) | ||
377 | 62 | { | ||
378 | 63 | }; | ||
379 | 64 | |||
380 | 65 | static void registerGConfClientWrapper (CCSBackend *backend) | ||
381 | 66 | { | ||
382 | 67 | } | ||
383 | 68 | |||
384 | 69 | static void unregisterGConfClientWrapper (CCSBackend *backend) | ||
385 | 70 | { | ||
386 | 71 | } | ||
387 | 72 | |||
388 | 73 | const CCSBackendInfo * GetInfo () | ||
389 | 74 | { | ||
390 | 75 | return &gsettingsBackendInfo; | ||
391 | 76 | } | ||
392 | 77 | |||
393 | 78 | CCSBackend * SetUp (CCSContext *context, CCSContextGMock *gmockContext) | ||
394 | 79 | { | ||
395 | 80 | CCSGSettingsBackendInterface *overloadedInterface = NULL; | ||
396 | 81 | |||
397 | 82 | g_setenv ("GSETTINGS_SCHEMA_DIR", MOCK_PATH.c_str (), true); | ||
398 | 83 | g_setenv ("GSETTINGS_BACKEND", "memory", true); | ||
399 | 84 | g_setenv ("LIBCOMPIZCONFIG_BACKEND_PATH", BACKEND_BINARY_PATH, true); | ||
400 | 85 | |||
401 | 86 | mContext = context; | ||
402 | 87 | |||
403 | 88 | std::string path ("gsettings"); | ||
404 | 89 | |||
405 | 90 | mBackend = reinterpret_cast <CCSDynamicBackend *> (ccsOpenBackend (&ccsDefaultInterfaceTable, mContext, path.c_str ())); | ||
406 | 91 | |||
407 | 92 | EXPECT_TRUE (mBackend); | ||
408 | 93 | |||
409 | 94 | mGSettingsBackend = ccsDynamicBackendGetRawBackend (mBackend); | ||
410 | 95 | |||
411 | 96 | CCSBackendInitFunc backendInit = (GET_INTERFACE (CCSBackendInterface, mBackend))->backendInit; | ||
412 | 97 | |||
413 | 98 | if (backendInit) | ||
414 | 99 | (*backendInit) ((CCSBackend *) mBackend, mContext); | ||
415 | 100 | |||
416 | 101 | overloadedInterface = GET_INTERFACE (CCSGSettingsBackendInterface, mGSettingsBackend); | ||
417 | 102 | overloadedInterface->gsettingsBackendConnectToChangedSignal = CCSGSettingsBackendEnv::connectToSignalWrapper; | ||
418 | 103 | overloadedInterface->gsettingsBackendRegisterGConfClient = CCSGSettingsBackendEnv::registerGConfClientWrapper; | ||
419 | 104 | overloadedInterface->gsettingsBackendUnregisterGConfClient = CCSGSettingsBackendEnv::unregisterGConfClientWrapper; | ||
420 | 105 | |||
421 | 106 | mSettings = ccsGSettingsGetSettingsObjectForPluginWithPath (mGSettingsBackend, "mock", | ||
422 | 107 | CharacterWrapper (makeCompizPluginPath (profileName.c_str (), "mock")), | ||
423 | 108 | mContext); | ||
424 | 109 | |||
425 | 110 | ON_CALL (*gmockContext, getProfile ()).WillByDefault (Return (profileName.c_str ())); | ||
426 | 111 | |||
427 | 112 | return (CCSBackend *) mBackend; | ||
428 | 113 | } | ||
429 | 114 | |||
430 | 115 | void TearDown (CCSBackend *) | ||
431 | 116 | { | ||
432 | 117 | g_unsetenv ("GSETTINGS_SCHEMA_DIR"); | ||
433 | 118 | g_unsetenv ("GSETTINGS_BACKEND"); | ||
434 | 119 | g_unsetenv ("LIBCOMPIZCONFIG_BACKEND_PATH"); | ||
435 | 120 | |||
436 | 121 | GVariantBuilder noProfilesBuilder; | ||
437 | 122 | g_variant_builder_init (&noProfilesBuilder, G_VARIANT_TYPE ("as")); | ||
438 | 123 | g_variant_builder_add (&noProfilesBuilder, "s", "Default"); | ||
439 | 124 | GVariant *noProfiles = g_variant_builder_end (&noProfilesBuilder); | ||
440 | 125 | |||
441 | 126 | GVariantBuilder pluginKeysBuilder; | ||
442 | 127 | g_variant_builder_init (&pluginKeysBuilder, G_VARIANT_TYPE ("as")); | ||
443 | 128 | g_variant_builder_add (&pluginKeysBuilder, "s", "mock"); | ||
444 | 129 | GVariant *pluginKeys = g_variant_builder_end (&pluginKeysBuilder); | ||
445 | 130 | |||
446 | 131 | ccsGSettingsBackendUnsetAllChangedPluginKeysInProfile (mGSettingsBackend, | ||
447 | 132 | mContext, | ||
448 | 133 | pluginKeys, | ||
449 | 134 | ccsGSettingsBackendGetCurrentProfile ( | ||
450 | 135 | mGSettingsBackend)); | ||
451 | 136 | ccsGSettingsBackendClearPluginsWithSetKeys (mGSettingsBackend); | ||
452 | 137 | ccsGSettingsBackendSetExistingProfiles (mGSettingsBackend, noProfiles); | ||
453 | 138 | ccsGSettingsBackendSetCurrentProfile (mGSettingsBackend, "Default"); | ||
454 | 139 | |||
455 | 140 | ccsFreeDynamicBackend (mBackend); | ||
456 | 141 | |||
457 | 142 | g_variant_unref (pluginKeys); | ||
458 | 143 | } | ||
459 | 144 | |||
460 | 145 | void AddProfile (const std::string &profile) | ||
461 | 146 | { | ||
462 | 147 | ccsGSettingsBackendAddProfile (mGSettingsBackend, profile.c_str ()); | ||
463 | 148 | } | ||
464 | 149 | |||
465 | 150 | void SetGetExistingProfilesExpectation (CCSContext *context, | ||
466 | 151 | CCSContextGMock *gmockContext) | ||
467 | 152 | { | ||
468 | 153 | EXPECT_CALL (*gmockContext, getProfile ()).Times (AtLeast (1)); | ||
469 | 154 | } | ||
470 | 155 | |||
471 | 156 | void SetDeleteProfileExpectation (const std::string &profileToDelete, | ||
472 | 157 | CCSContext *context, | ||
473 | 158 | CCSContextGMock *gmockContext) | ||
474 | 159 | { | ||
475 | 160 | EXPECT_CALL (*gmockContext, getProfile ()).Times (AtLeast (1)); | ||
476 | 161 | } | ||
477 | 162 | |||
478 | 163 | void SetReadInitExpectation (CCSContext *context, | ||
479 | 164 | CCSContextGMock *gmockContext) | ||
480 | 165 | { | ||
481 | 166 | EXPECT_CALL (*gmockContext, getProfile ()).WillOnce (Return (profileName.c_str ())); | ||
482 | 167 | } | ||
483 | 168 | |||
484 | 169 | void SetReadDoneExpectation (CCSContext *context, | ||
485 | 170 | CCSContextGMock *gmockContext) | ||
486 | 171 | { | ||
487 | 172 | } | ||
488 | 173 | |||
489 | 174 | void SetWriteInitExpectation (CCSContext *context, | ||
490 | 175 | CCSContextGMock *gmockContext) | ||
491 | 176 | { | ||
492 | 177 | EXPECT_CALL (*gmockContext, getProfile ()).WillOnce (Return (profileName.c_str ())); | ||
493 | 178 | } | ||
494 | 179 | |||
495 | 180 | void SetWriteDoneExpectation (CCSContext *context, | ||
496 | 181 | CCSContextGMock *gmockContext) | ||
497 | 182 | { | ||
498 | 183 | } | ||
499 | 184 | |||
500 | 185 | void PreWrite (CCSContextGMock *gmockContext, | ||
501 | 186 | CCSPluginGMock *gmockPlugin, | ||
502 | 187 | CCSSettingGMock *gmockSetting, | ||
503 | 188 | CCSSettingType type) | ||
504 | 189 | { | ||
505 | 190 | EXPECT_CALL (*gmockContext, getIntegrationEnabled ()).WillRepeatedly (Return (FALSE)); | ||
506 | 191 | EXPECT_CALL (*gmockPlugin, getContext ()).Times (AtLeast (1)); | ||
507 | 192 | EXPECT_CALL (*gmockPlugin, getName ()).Times (AtLeast (1)); | ||
508 | 193 | EXPECT_CALL (*gmockSetting, getType ()).Times (AtLeast (1)); | ||
509 | 194 | EXPECT_CALL (*gmockSetting, getName ()).Times (AtLeast (1)); | ||
510 | 195 | EXPECT_CALL (*gmockSetting, getParent ()).Times (AtLeast (1)); | ||
511 | 196 | EXPECT_CALL (*gmockSetting, getIsDefault ()).WillRepeatedly (Return (FALSE)); | ||
512 | 197 | |||
513 | 198 | if (type == TypeList) | ||
514 | 199 | EXPECT_CALL (*gmockSetting, getDefaultValue ()).WillRepeatedly (ReturnNull ()); | ||
515 | 200 | } | ||
516 | 201 | |||
517 | 202 | void PostWrite (CCSContextGMock *gmockContext, | ||
518 | 203 | CCSPluginGMock *gmockPlugin, | ||
519 | 204 | CCSSettingGMock *gmockSetting, | ||
520 | 205 | CCSSettingType type) {} | ||
521 | 206 | |||
522 | 207 | void WriteBoolAtKey (const std::string &plugin, | ||
523 | 208 | const std::string &key, | ||
524 | 209 | const VariantTypes &value) | ||
525 | 210 | { | ||
526 | 211 | GVariant *variant = NULL; | ||
527 | 212 | if (writeBoolToVariant (boolToBool (boost::get <bool> (value)), &variant)) | ||
528 | 213 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
529 | 214 | else | ||
530 | 215 | throw std::exception (); | ||
531 | 216 | } | ||
532 | 217 | |||
533 | 218 | void WriteIntegerAtKey (const std::string &plugin, | ||
534 | 219 | const std::string &key, | ||
535 | 220 | const VariantTypes &value) | ||
536 | 221 | { | ||
537 | 222 | GVariant *variant = NULL; | ||
538 | 223 | if (writeIntToVariant (boost::get <int> (value), &variant)) | ||
539 | 224 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
540 | 225 | else | ||
541 | 226 | throw std::exception (); | ||
542 | 227 | } | ||
543 | 228 | |||
544 | 229 | void WriteFloatAtKey (const std::string &plugin, | ||
545 | 230 | const std::string &key, | ||
546 | 231 | const VariantTypes &value) | ||
547 | 232 | { | ||
548 | 233 | GVariant *variant = NULL; | ||
549 | 234 | if (writeFloatToVariant (boost::get <float> (value), &variant)) | ||
550 | 235 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
551 | 236 | else | ||
552 | 237 | throw std::exception (); | ||
553 | 238 | } | ||
554 | 239 | |||
555 | 240 | void WriteStringAtKey (const std::string &plugin, | ||
556 | 241 | const std::string &key, | ||
557 | 242 | const VariantTypes &value) | ||
558 | 243 | { | ||
559 | 244 | GVariant *variant = NULL; | ||
560 | 245 | if (writeStringToVariant (boost::get <const char *> (value), &variant)) | ||
561 | 246 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
562 | 247 | else | ||
563 | 248 | throw std::exception (); | ||
564 | 249 | } | ||
565 | 250 | |||
566 | 251 | void WriteColorAtKey (const std::string &plugin, | ||
567 | 252 | const std::string &key, | ||
568 | 253 | const VariantTypes &value) | ||
569 | 254 | { | ||
570 | 255 | GVariant *variant = NULL; | ||
571 | 256 | if (writeColorToVariant (boost::get <CCSSettingColorValue> (value), &variant)) | ||
572 | 257 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
573 | 258 | else | ||
574 | 259 | throw std::exception (); | ||
575 | 260 | } | ||
576 | 261 | |||
577 | 262 | void WriteKeyAtKey (const std::string &plugin, | ||
578 | 263 | const std::string &key, | ||
579 | 264 | const VariantTypes &value) | ||
580 | 265 | { | ||
581 | 266 | GVariant *variant = NULL; | ||
582 | 267 | if (writeKeyToVariant (boost::get <CCSSettingKeyValue> (value), &variant)) | ||
583 | 268 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
584 | 269 | else | ||
585 | 270 | throw std::exception (); | ||
586 | 271 | } | ||
587 | 272 | |||
588 | 273 | void WriteButtonAtKey (const std::string &plugin, | ||
589 | 274 | const std::string &key, | ||
590 | 275 | const VariantTypes &value) | ||
591 | 276 | { | ||
592 | 277 | GVariant *variant = NULL; | ||
593 | 278 | if (writeButtonToVariant (boost::get <CCSSettingButtonValue> (value), &variant)) | ||
594 | 279 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
595 | 280 | else | ||
596 | 281 | throw std::exception (); | ||
597 | 282 | } | ||
598 | 283 | |||
599 | 284 | void WriteEdgeAtKey (const std::string &plugin, | ||
600 | 285 | const std::string &key, | ||
601 | 286 | const VariantTypes &value) | ||
602 | 287 | { | ||
603 | 288 | GVariant *variant = NULL; | ||
604 | 289 | if (writeEdgeToVariant (boost::get <unsigned int> (value), &variant)) | ||
605 | 290 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
606 | 291 | else | ||
607 | 292 | throw std::exception (); | ||
608 | 293 | } | ||
609 | 294 | |||
610 | 295 | void WriteMatchAtKey (const std::string &plugin, | ||
611 | 296 | const std::string &key, | ||
612 | 297 | const VariantTypes &value) | ||
613 | 298 | { | ||
614 | 299 | GVariant *variant = NULL; | ||
615 | 300 | if (writeStringToVariant (boost::get <const char *> (value), &variant)) | ||
616 | 301 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
617 | 302 | else | ||
618 | 303 | throw std::exception (); | ||
619 | 304 | } | ||
620 | 305 | |||
621 | 306 | void WriteBellAtKey (const std::string &plugin, | ||
622 | 307 | const std::string &key, | ||
623 | 308 | const VariantTypes &value) | ||
624 | 309 | { | ||
625 | 310 | GVariant *variant = NULL; | ||
626 | 311 | if (writeBoolToVariant (boolToBool (boost::get <bool> (value)), &variant)) | ||
627 | 312 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
628 | 313 | else | ||
629 | 314 | throw std::exception (); | ||
630 | 315 | } | ||
631 | 316 | |||
632 | 317 | void WriteListAtKey (const std::string &plugin, | ||
633 | 318 | const std::string &key, | ||
634 | 319 | const VariantTypes &value) | ||
635 | 320 | { | ||
636 | 321 | GVariant *variant = NULL; | ||
637 | 322 | |||
638 | 323 | const CCSListWrapper::Ptr &lw (boost::get <CCSListWrapper::Ptr> (value)); | ||
639 | 324 | |||
640 | 325 | if (writeListValue (*lw, lw->type (), &variant)) | ||
641 | 326 | writeVariantToKey (mSettings, CharacterWrapper (translateKeyForGSettings (key.c_str ())), variant); | ||
642 | 327 | else | ||
643 | 328 | throw std::exception (); | ||
644 | 329 | } | ||
645 | 330 | |||
646 | 331 | void PreRead (CCSContextGMock *gmockContext, | ||
647 | 332 | CCSPluginGMock *gmockPlugin, | ||
648 | 333 | CCSSettingGMock *gmockSetting, | ||
649 | 334 | CCSSettingType type) | ||
650 | 335 | { | ||
651 | 336 | EXPECT_CALL (*gmockContext, getIntegrationEnabled ()).WillOnce (Return (FALSE)); | ||
652 | 337 | EXPECT_CALL (*gmockPlugin, getContext ()).Times (AtLeast (1)); | ||
653 | 338 | EXPECT_CALL (*gmockPlugin, getName ()).Times (AtLeast (1)); | ||
654 | 339 | EXPECT_CALL (*gmockSetting, getType ()).Times (AtLeast (1)); | ||
655 | 340 | EXPECT_CALL (*gmockSetting, getName ()).Times (AtLeast (1)); | ||
656 | 341 | EXPECT_CALL (*gmockSetting, getParent ()).Times (AtLeast (1)); | ||
657 | 342 | EXPECT_CALL (*gmockSetting, isReadOnly ()).WillRepeatedly (Return (FALSE)); | ||
658 | 343 | |||
659 | 344 | if (type == TypeList) | ||
660 | 345 | { | ||
661 | 346 | EXPECT_CALL (*gmockSetting, getInfo ()).Times (AtLeast (1)); | ||
662 | 347 | EXPECT_CALL (*gmockSetting, getDefaultValue ()).WillRepeatedly (ReturnNull ()); | ||
663 | 348 | } | ||
664 | 349 | } | ||
665 | 350 | |||
666 | 351 | void PostRead (CCSContextGMock *gmockContext, | ||
667 | 352 | CCSPluginGMock *gmockPlugin, | ||
668 | 353 | CCSSettingGMock *gmockSetting, | ||
669 | 354 | CCSSettingType type) {} | ||
670 | 355 | |||
671 | 356 | Bool ReadBoolAtKey (const std::string &plugin, | ||
672 | 357 | const std::string &key) | ||
673 | 358 | { | ||
674 | 359 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
675 | 360 | key, | ||
676 | 361 | TypeBool)); | ||
677 | 362 | return readBoolFromVariant (variant.get ()); | ||
678 | 363 | } | ||
679 | 364 | |||
680 | 365 | int ReadIntegerAtKey (const std::string &plugin, | ||
681 | 366 | const std::string &key) | ||
682 | 367 | { | ||
683 | 368 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
684 | 369 | key, | ||
685 | 370 | TypeInt)); | ||
686 | 371 | return readIntFromVariant (variant.get ()); | ||
687 | 372 | } | ||
688 | 373 | |||
689 | 374 | float ReadFloatAtKey (const std::string &plugin, | ||
690 | 375 | const std::string &key) | ||
691 | 376 | { | ||
692 | 377 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
693 | 378 | key, | ||
694 | 379 | TypeFloat)); | ||
695 | 380 | return readFloatFromVariant (variant.get ()); | ||
696 | 381 | } | ||
697 | 382 | |||
698 | 383 | const char * ReadStringAtKey (const std::string &plugin, | ||
699 | 384 | const std::string &key) | ||
700 | 385 | { | ||
701 | 386 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
702 | 387 | key, | ||
703 | 388 | TypeString)); | ||
704 | 389 | return readStringFromVariant (variant.get ()); | ||
705 | 390 | } | ||
706 | 391 | |||
707 | 392 | CCSSettingColorValue ReadColorAtKey (const std::string &plugin, | ||
708 | 393 | const std::string &key) | ||
709 | 394 | { | ||
710 | 395 | Bool success = FALSE; | ||
711 | 396 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
712 | 397 | key, | ||
713 | 398 | TypeColor)); | ||
714 | 399 | CCSSettingColorValue value = readColorFromVariant (variant.get (), &success); | ||
715 | 400 | EXPECT_TRUE (success); | ||
716 | 401 | return value; | ||
717 | 402 | } | ||
718 | 403 | |||
719 | 404 | CCSSettingKeyValue ReadKeyAtKey (const std::string &plugin, | ||
720 | 405 | const std::string &key) | ||
721 | 406 | { | ||
722 | 407 | Bool success = FALSE; | ||
723 | 408 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
724 | 409 | key, | ||
725 | 410 | TypeKey)); | ||
726 | 411 | CCSSettingKeyValue value = readKeyFromVariant (variant.get (), &success); | ||
727 | 412 | EXPECT_TRUE (success); | ||
728 | 413 | return value; | ||
729 | 414 | } | ||
730 | 415 | |||
731 | 416 | CCSSettingButtonValue ReadButtonAtKey (const std::string &plugin, | ||
732 | 417 | const std::string &key) | ||
733 | 418 | { | ||
734 | 419 | Bool success = FALSE; | ||
735 | 420 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
736 | 421 | key, | ||
737 | 422 | TypeButton)); | ||
738 | 423 | CCSSettingButtonValue value = readButtonFromVariant (variant.get (), &success); | ||
739 | 424 | EXPECT_TRUE (success); | ||
740 | 425 | return value; | ||
741 | 426 | } | ||
742 | 427 | |||
743 | 428 | unsigned int ReadEdgeAtKey (const std::string &plugin, | ||
744 | 429 | const std::string &key) | ||
745 | 430 | { | ||
746 | 431 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
747 | 432 | key, | ||
748 | 433 | TypeEdge)); | ||
749 | 434 | return readEdgeFromVariant (variant.get ()); | ||
750 | 435 | } | ||
751 | 436 | |||
752 | 437 | const char * ReadMatchAtKey (const std::string &plugin, | ||
753 | 438 | const std::string &key) | ||
754 | 439 | { | ||
755 | 440 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
756 | 441 | key, | ||
757 | 442 | TypeMatch)); | ||
758 | 443 | return readStringFromVariant (variant.get ()); | ||
759 | 444 | } | ||
760 | 445 | |||
761 | 446 | Bool ReadBellAtKey (const std::string &plugin, | ||
762 | 447 | const std::string &key) | ||
763 | 448 | { | ||
764 | 449 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
765 | 450 | key, | ||
766 | 451 | TypeBell)); | ||
767 | 452 | return readBoolFromVariant (variant.get ()); | ||
768 | 453 | } | ||
769 | 454 | |||
770 | 455 | CCSSettingValueList ReadListAtKey (const std::string &plugin, | ||
771 | 456 | const std::string &key, | ||
772 | 457 | CCSSetting *setting) | ||
773 | 458 | { | ||
774 | 459 | GVariantShared variant (ReadVariantAtKeyToShared (plugin, | ||
775 | 460 | key, | ||
776 | 461 | TypeList)); | ||
777 | 462 | return readListValue (variant.get (), setting, &ccsDefaultObjectAllocator); | ||
778 | 463 | } | ||
779 | 464 | |||
780 | 465 | void PreUpdate (CCSContextGMock *gmockContext, | ||
781 | 466 | CCSPluginGMock *gmockPlugin, | ||
782 | 467 | CCSSettingGMock *gmockSetting, | ||
783 | 468 | CCSSettingType type) | ||
784 | 469 | { | ||
785 | 470 | EXPECT_CALL (*gmockContext, getIntegrationEnabled ()).WillOnce (Return (FALSE)); | ||
786 | 471 | EXPECT_CALL (*gmockPlugin, getContext ()).Times (AtLeast (1)); | ||
787 | 472 | EXPECT_CALL (*gmockPlugin, getName ()).Times (AtLeast (1)); | ||
788 | 473 | EXPECT_CALL (*gmockSetting, getType ()).Times (AtLeast (1)); | ||
789 | 474 | EXPECT_CALL (*gmockSetting, getName ()).Times (AtLeast (1)); | ||
790 | 475 | EXPECT_CALL (*gmockSetting, getParent ()).Times (AtLeast (1)); | ||
791 | 476 | EXPECT_CALL (*gmockSetting, isReadOnly ()).WillRepeatedly (Return (FALSE)); | ||
792 | 477 | |||
793 | 478 | if (type == TypeList) | ||
794 | 479 | { | ||
795 | 480 | EXPECT_CALL (*gmockSetting, getInfo ()).Times (AtLeast (1)); | ||
796 | 481 | EXPECT_CALL (*gmockSetting, getDefaultValue ()).WillRepeatedly (ReturnNull ()); | ||
797 | 482 | } | ||
798 | 483 | |||
799 | 484 | EXPECT_CALL (*gmockContext, getProfile ()); | ||
800 | 485 | } | ||
801 | 486 | |||
802 | 487 | void PostUpdate (CCSContextGMock *gmockContext, | ||
803 | 488 | CCSPluginGMock *gmockPlugin, | ||
804 | 489 | CCSSettingGMock *gmockSetting, | ||
805 | 490 | CCSSettingType type) {} | ||
806 | 491 | |||
807 | 492 | bool UpdateSettingAtKey (const std::string &plugin, | ||
808 | 493 | const std::string &setting) | ||
809 | 494 | { | ||
810 | 495 | CharacterWrapper keyName (translateKeyForGSettings (setting.c_str ())); | ||
811 | 496 | |||
812 | 497 | if (updateSettingWithGSettingsKeyName (reinterpret_cast <CCSBackend *> (mGSettingsBackend), mSettings, keyName, ccsBackendUpdateSetting)) | ||
813 | 498 | return true; | ||
814 | 499 | |||
815 | 500 | return false; | ||
816 | 501 | } | ||
817 | 502 | |||
818 | 503 | private: | ||
819 | 504 | |||
820 | 505 | GVariantShared | ||
821 | 506 | ReadVariantAtKeyToShared (const std::string &plugin, | ||
822 | 507 | const std::string &key, | ||
823 | 508 | CCSSettingType type) | ||
824 | 509 | { | ||
825 | 510 | CharacterWrapper translatedKey (translateKeyForGSettings (key.c_str ())); | ||
826 | 511 | CharacterWrapper pluginPath (makeCompizPluginPath (profileName.c_str (), | ||
827 | 512 | plugin.c_str ())); | ||
828 | 513 | |||
829 | 514 | GVariant *rawVariant = getVariantAtKey (mSettings, | ||
830 | 515 | translatedKey, | ||
831 | 516 | pluginPath, | ||
832 | 517 | type); | ||
833 | 518 | |||
834 | 519 | GVariantShared shared (AutoDestroyHelper <GVariant> (rawVariant, | ||
835 | 520 | g_variant_unref)); | ||
836 | 521 | |||
837 | 522 | |||
838 | 523 | |||
839 | 524 | return shared; | ||
840 | 525 | } | ||
841 | 526 | |||
842 | 527 | CCSGSettingsWrapper *mSettings; | ||
843 | 528 | CCSContext *mContext; | ||
844 | 529 | CCSDynamicBackend *mBackend; | ||
845 | 530 | CCSBackend *mGSettingsBackend; | ||
846 | 531 | std::string pluginToMatch; | ||
847 | 532 | |||
848 | 533 | static const std::string profileName; | ||
849 | 534 | }; | ||
850 | 535 | |||
851 | 536 | const std::string CCSGSettingsBackendEnv::profileName = "mock"; | ||
852 | 537 | |||
853 | 538 | INSTANTIATE_TEST_CASE_P (CCSGSettingsBackendConcept, CCSBackendConformanceTestReadWrite, | ||
854 | 539 | compizconfig::test::GenerateTestingParametersForBackendInterface <CCSGSettingsBackendEnv> ()); | ||
855 | 540 | |||
856 | 541 | INSTANTIATE_TEST_CASE_P (CCSGSettingsBackendConcept, CCSBackendConformanceTestInfo, | ||
857 | 542 | compizconfig::test::GenerateTestingEnvFactoryBackendInterface <CCSGSettingsBackendEnv> ()); | ||
858 | 543 | |||
859 | 544 | INSTANTIATE_TEST_CASE_P (CCSGSettingsBackendConcept, CCSBackendConformanceTestInitFiniFuncs, | ||
860 | 545 | compizconfig::test::GenerateTestingEnvFactoryBackendInterface <CCSGSettingsBackendEnv> ()); | ||
861 | 546 | |||
862 | 547 | INSTANTIATE_TEST_CASE_P (CCSGSettingsBackendConcept, CCSBackendConformanceTestProfileHandling, | ||
863 | 548 | compizconfig::test::GenerateTestingEnvFactoryBackendInterface <CCSGSettingsBackendEnv> ()); | ||
864 | 0 | 549 | ||
865 | === modified file 'compizconfig/libcompizconfig/config/CMakeLists.txt' | |||
866 | --- compizconfig/libcompizconfig/config/CMakeLists.txt 2012-05-24 06:48:55 +0000 | |||
867 | +++ compizconfig/libcompizconfig/config/CMakeLists.txt 2012-08-07 06:57:01 +0000 | |||
868 | @@ -1,6 +1,9 @@ | |||
869 | 1 | set (_config_file | 1 | set (_config_file |
870 | 2 | config) | 2 | config) |
871 | 3 | 3 | ||
872 | 4 | configure_file (${CMAKE_CURRENT_SOURCE_DIR}/config_test | ||
873 | 5 | ${CMAKE_CURRENT_BINARY_DIR}/compiz-1/compizconfig/config) | ||
874 | 6 | |||
875 | 4 | compiz_opt_install_file (${CMAKE_CURRENT_SOURCE_DIR}/${_config_file} ${COMPIZ_SYSCONFDIR}/compizconfig/${_config_file}) | 7 | compiz_opt_install_file (${CMAKE_CURRENT_SOURCE_DIR}/${_config_file} ${COMPIZ_SYSCONFDIR}/compizconfig/${_config_file}) |
876 | 5 | 8 | ||
877 | 6 | add_custom_target ( | 9 | add_custom_target ( |
878 | 7 | 10 | ||
879 | === added file 'compizconfig/libcompizconfig/config/config_test' | |||
880 | --- compizconfig/libcompizconfig/config/config_test 1970-01-01 00:00:00 +0000 | |||
881 | +++ compizconfig/libcompizconfig/config/config_test 2012-08-07 06:57:01 +0000 | |||
882 | @@ -0,0 +1,3 @@ | |||
883 | 1 | [general] | ||
884 | 2 | backend = ini | ||
885 | 3 | plugin_list_autosort = true |
CI doesn't seem to care ... WIP ...