diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-19 10:47:47 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-06-19 10:47:47 -0400 |
commit | ea952966b41e1ffb72304d317b76848f74fc8d15 (patch) | |
tree | 17d874888de4f0852e9daf18e7f595058752c927 | |
parent | 28835cce71dc370c1e0089242ff5ba3016a9e6f0 (diff) | |
download | meson-ea952966b41e1ffb72304d317b76848f74fc8d15.zip meson-ea952966b41e1ffb72304d317b76848f74fc8d15.tar.gz meson-ea952966b41e1ffb72304d317b76848f74fc8d15.tar.bz2 |
update gnome test to cover built gresource files
Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r-- | test cases/frameworks/7 gnome/resources/generated/meson.build | 4 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/resources/meson.build | 27 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/test.json | 2 |
3 files changed, 29 insertions, 4 deletions
diff --git a/test cases/frameworks/7 gnome/resources/generated/meson.build b/test cases/frameworks/7 gnome/resources/generated/meson.build new file mode 100644 index 0000000..9805c66 --- /dev/null +++ b/test cases/frameworks/7 gnome/resources/generated/meson.build @@ -0,0 +1,4 @@ +ct_simple_gresource = custom_target( + input : '../simple.gresource.xml', + output : 'simple-ct.gresource.xml', + command : [copyfile, '@INPUT@', '@OUTPUT@']) diff --git a/test cases/frameworks/7 gnome/resources/meson.build b/test cases/frameworks/7 gnome/resources/meson.build index b945cda..180b338 100644 --- a/test cases/frameworks/7 gnome/resources/meson.build +++ b/test cases/frameworks/7 gnome/resources/meson.build @@ -30,10 +30,10 @@ gnome.compile_resources('simple-resources', test('simple resource test (gresource)', find_program('resources.py')) if not pretend_glib_old and glib.version() >= '2.52.0' - # This test cannot pass if GLib version is older than 9.99.9. - # Meson will raise an error if the user tries to use the 'dependencies' - # argument and the version of GLib is too old for generated resource - # dependencies to work correctly. + # This test cannot pass if GLib version is too old. Generated resource + # dependencies do not work correctly and Meson will raise an error if the + # user tries to use either the 'dependencies' kwarg or a gresource file that + # is itself generated. generated_resources = gnome.compile_resources('generated-resources', 'generated.gresource.xml', source_dir : '../resources-data', @@ -44,6 +44,25 @@ if not pretend_glib_old and glib.version() >= '2.52.0' 'generated-main.c', generated_resources, dependencies: gio) test('generated resource test', generated_res_exe) + + # Test with a CustomTarget + subdir('generated') + + ct_resources = gnome.compile_resources( + 'ct-resources', + ct_simple_gresource, + install_header : true, + export : true, + source_dir : '../resources-data', + c_name : 'simple_resources') + + cti_resources = gnome.compile_resources( + 'cti-resources', + ct_simple_gresource[0], + install_header : true, + export : true, + source_dir : '../resources-data', + c_name : 'simple_resources') endif # Test build_by_default diff --git a/test cases/frameworks/7 gnome/test.json b/test cases/frameworks/7 gnome/test.json index 0d17384..28ce9fe 100644 --- a/test cases/frameworks/7 gnome/test.json +++ b/test cases/frameworks/7 gnome/test.json @@ -1,5 +1,7 @@ { "installed": [ + {"type": "file", "file": "usr/include/ct-resources.h"}, + {"type": "file", "file": "usr/include/cti-resources.h"}, {"type": "file", "file": "usr/include/enums.h"}, {"type": "file", "file": "usr/include/enums2.h"}, {"type": "file", "file": "usr/include/enums3.h"}, |