diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-02-19 23:06:37 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-02-20 19:26:16 +0200 |
commit | 0c1c387703c04c8052161b7506c07f216329b232 (patch) | |
tree | 21c7c7a5213adac5e702be14f4d2f43fed053f56 /test cases | |
parent | 79865474c72b6b7ac32586b683644b78adfff778 (diff) | |
download | meson-0c1c387703c04c8052161b7506c07f216329b232.zip meson-0c1c387703c04c8052161b7506c07f216329b232.tar.gz meson-0c1c387703c04c8052161b7506c07f216329b232.tar.bz2 |
gnome: Fix depend_files listing for compile_resources
Also add a unit test that will test all codepaths for old Glib tools
versions.
Closes https://github.com/mesonbuild/meson/issues/2860
Diffstat (limited to 'test cases')
-rw-r--r-- | test cases/frameworks/7 gnome/meson.build | 13 | ||||
-rw-r--r-- | test cases/frameworks/7 gnome/resources/meson.build | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/test cases/frameworks/7 gnome/meson.build b/test cases/frameworks/7 gnome/meson.build index c75c049..bb9d09f 100644 --- a/test cases/frameworks/7 gnome/meson.build +++ b/test cases/frameworks/7 gnome/meson.build @@ -9,6 +9,19 @@ if cc.get_id() == 'intel' add_global_arguments('-wd2282', language : 'c') endif +py3 = import('python3').find_python() +pycode = '''import os, sys +if "MESON_UNIT_TEST_PRETEND_GLIB_OLD" in os.environ: + sys.exit(0) +sys.exit(1) +''' + +pretend_glib_old = false +res = run_command(py3, '-c', pycode) +if res.returncode() == 0 + pretend_glib_old = true +endif + gnome = import('gnome') gio = dependency('gio-2.0') giounix = dependency('gio-unix-2.0') diff --git a/test cases/frameworks/7 gnome/resources/meson.build b/test cases/frameworks/7 gnome/resources/meson.build index 3ebb2f5..b945cda 100644 --- a/test cases/frameworks/7 gnome/resources/meson.build +++ b/test cases/frameworks/7 gnome/resources/meson.build @@ -29,7 +29,7 @@ gnome.compile_resources('simple-resources', ) test('simple resource test (gresource)', find_program('resources.py')) -if glib.version() >= '2.52.0' +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 |