Skip to content

Commit 348e12c

Browse files
committed
Modify test for GSettings environment variable
1 parent 9f3f88f commit 348e12c

File tree

3 files changed

+4
-26
lines changed

3 files changed

+4
-26
lines changed

test cases/frameworks/7 gnome/meson.build

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ if not glib.found()
1010
error('MESON_SKIP_TEST glib not found.')
1111
endif
1212

13-
gir = dependency('gobject-introspection-1.0', required: false)
14-
if not gir.found()
15-
error('MESON_SKIP_TEST gobject-introspection not found.')
16-
endif
17-
1813
python3 = import('python3')
1914
py3 = python3.find_python()
2015
if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0
@@ -45,28 +40,15 @@ endif
4540

4641
gnome = import('gnome')
4742
gio = dependency('gio-2.0')
48-
giounix = dependency('gio-unix-2.0')
4943
glib = dependency('glib-2.0')
5044
gobj = dependency('gobject-2.0')
51-
gir = dependency('gobject-introspection-1.0')
5245
gmod = dependency('gmodule-2.0')
5346

54-
# GLib >= 2.76 removed slice allocator which causes a leak in g-i to now be
55-
# visible to asan. The leak should be fixed in g-i >= 1.76.2:
56-
# https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/411
57-
if get_option('b_sanitize') != 'none' and \
58-
gir.version().version_compare('<=1.76.1') and \
59-
glib.version().version_compare('>=2.76')
60-
error('MESON_SKIP_TEST gobject-introspection >=1.76.2 is required with address sanitizer.')
61-
endif
62-
6347
# Test that static deps don't error out when static libraries aren't found
6448
glib_static = dependency('glib-2.0', static : true)
6549

6650
subdir('resources-data')
6751
subdir('resources')
68-
subdir('gir')
6952
subdir('schemas')
70-
subdir('gdbus')
7153
subdir('mkenums')
7254
subdir('genmarshal')

test cases/frameworks/7 gnome/schemas/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ compiled = gnome.compile_schemas(build_by_default: true)
33
install_data('com.github.meson.gschema.xml',
44
install_dir : 'share/glib-2.0/schemas')
55

6-
schemaexe = executable('schemaprog', 'schemaprog.c', dependencies : gio)
6+
schemaexe = executable('schemaprog', 'schemaprog.c', dependencies : gio, install: true)
77
test('schema test', schemaexe)

test cases/frameworks/7 gnome/schemas/schemaprog.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@ int main(int argc, char **argv) {
88
GSettings *settings;
99
GVariant *value;
1010

11-
GError *error = NULL;
12-
src = g_settings_schema_source_new_from_directory("schemas",
13-
g_settings_schema_source_get_default(), TRUE, &error);
14-
if(error) {
15-
fprintf(stderr, "Fail: %s\n", error->message);
16-
g_error_free(error);
11+
src = g_settings_schema_source_get_default();
12+
if(src == NULL) {
13+
fprintf(stderr, "Failed to get default schema source\n");
1714
return 1;
1815
}
1916

@@ -42,6 +39,5 @@ int main(int argc, char **argv) {
4239
g_variant_unref(value);
4340
g_object_unref(settings);
4441
g_settings_schema_unref(schema);
45-
g_settings_schema_source_unref(src);
4642
return 0;
4743
}

0 commit comments

Comments
 (0)