diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-12-08 05:54:15 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-12-08 05:54:15 +0100 |
commit | b7611c4bcb5e728db5dba63f46aa71e4473dc23e (patch) | |
tree | 148d46220a6c8cc68bbe5616212ca2b5a5eab2dd | |
parent | 7e168dca2438f73cfb8534bb126e799a2185aa5d (diff) | |
download | gdk-pixbuf-b7611c4bcb5e728db5dba63f46aa71e4473dc23e.tar.gz |
build: Do not install .test files when test is skippedwip/jtojnar/no-install-skipped-test
The skipping prevented the executable from being installed but not the .test file that referenced it.
This caused installed tests to fail:
Running test: gdk-pixbuf/pixbuf-pixdata.test
Caught exception during testing: Failed to execute child process ?/nix/store/kqmj2776mw24qxyswfbqlmybpws4g4yn-gdk-pixbuf-2.42.0-installedTests/libexec/installed-tests/gdk-pixbuf/pixbuf-pixdata? (No such file or directory)
-rw-r--r-- | tests/meson.build | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/tests/meson.build b/tests/meson.build index c9cf25c6e..4368c6bae 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -174,6 +174,9 @@ foreach test_name, test_data: installed_tests test_sources += [ resources_c, resources_h ] endif skip_if_true = test_data.get('skip', false) + if skip_if_true + continue + endif custom_target(test_name + '.test', output: test_name + '.test', @@ -187,30 +190,28 @@ foreach test_name, test_data: installed_tests install_dir: installed_test_datadir, ) - if not skip_if_true - test_bin = executable(test_name, test_sources, - dependencies: test_deps, - include_directories: [ root_inc, gdk_pixbuf_inc, ], - c_args: common_cflags, - install: get_option('installed_tests'), - install_dir: installed_test_bindir, - ) - - # Two particularly slow tests - if test_suites.contains('slow') - timeout = 300 - else - timeout = 30 - endif + test_bin = executable(test_name, test_sources, + dependencies: test_deps, + include_directories: [ root_inc, gdk_pixbuf_inc, ], + c_args: common_cflags, + install: get_option('installed_tests'), + install_dir: installed_test_bindir, + ) - test(test_name, test_bin, - suite: test_suites, - args: test_args, - env: test_env, - timeout: timeout, - protocol: 'tap', - ) + # Two particularly slow tests + if test_suites.contains('slow') + timeout = 300 + else + timeout = 30 endif + + test(test_name, test_bin, + suite: test_suites, + args: test_args, + env: test_env, + timeout: timeout, + protocol: 'tap', + ) endforeach executable('pixbuf-read', |