diff options
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | tests/meson.build | 77 | ||||
-rw-r--r-- | tests/test-keyring/meson.build | 13 | ||||
-rw-r--r-- | tests/test-keyring2/meson.build | 13 |
4 files changed, 26 insertions, 79 deletions
diff --git a/meson.build b/meson.build index 8b94682a..a28c0af4 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,7 @@ project( default_options: [ 'warning_level=2', ], - meson_version : '>=0.49.0', + meson_version : '>=0.50.0', ) flatpak_major_version = 1 diff --git a/tests/meson.build b/tests/meson.build index 044cb03e..4e6f639d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -45,17 +45,6 @@ tap_test = find_program( files(project_source_root / 'buildutil/tap-test'), ) -# TODO: When we depend on Meson 0.50.0, we can use -# install : get_option('installed_tests') -# install_dir : installed_testdir -# instead of -# install_dir : maybe_installed_testdir -if get_option('installed_tests') - maybe_installed_testdir = installed_testdir -else - maybe_installed_testdir = false -endif - if can_run_host_binaries runtime_repo = custom_target( 'runtime-repo', @@ -159,27 +148,15 @@ foreach testcase : c_tests endif if can_run_host_binaries - if meson.version().version_compare('>=0.50.0') - test( - name, - tap_test, - args : [exe], - depends : runtime_repo, - env : tests_environment, - protocol : 'tap', - timeout : options.get('timeout', 30), - ) - else - # Fall back to using exit status rather than TAP - test( - name, - tap_test, - args : [exe], - depends : runtime_repo, - env : tests_environment, - timeout : options.get('timeout', 30), - ) - endif + test( + name, + tap_test, + args : [exe], + depends : runtime_repo, + env : tests_environment, + protocol : 'tap', + timeout : options.get('timeout', 30), + ) endif endforeach @@ -299,7 +276,8 @@ configure_file( configuration : { 'PACKAGE_VERSION' : meson.project_version(), }, - install_dir : maybe_installed_testdir, + install : get_option('installed_tests'), + install_dir : installed_testdir, ) if get_option('installed_tests') @@ -388,28 +366,15 @@ foreach testcase : wrapped_tests endif if can_run_host_binaries - if meson.version().version_compare('>=0.50.0') - test( - name, - tap_test, - args : [meson.current_source_dir() / name], - depends : runtime_repo, - env : tests_environment, - is_parallel : is_parallel, - protocol : 'tap', - timeout : timeout, - ) - else - # Fall back to using exit status rather than TAP - test( - name, - tap_test, - args : [meson.current_source_dir() / name], - depends : runtime_repo, - env : tests_environment, - is_parallel : is_parallel, - timeout : timeout, - ) - endif + test( + name, + tap_test, + args : [meson.current_source_dir() / name], + depends : runtime_repo, + env : tests_environment, + is_parallel : is_parallel, + protocol : 'tap', + timeout : timeout, + ) endif endforeach diff --git a/tests/test-keyring/meson.build b/tests/test-keyring/meson.build index fb1c47a3..b0f4851e 100644 --- a/tests/test-keyring/meson.build +++ b/tests/test-keyring/meson.build @@ -1,26 +1,17 @@ # Copyright 2022 Collabora Ltd. # SPDX-License-Identifier: LGPL-2.1-or-later -if get_option('installed_tests') - install_sub = installed_testdir / 'test-keyring' -else - install_sub = false -endif - foreach file : [ 'README', 'pubring.gpg', 'secring.gpg', ] - # TODO: When we depend on Meson 0.50.0, we can use - # install : get_option('installed_tests') - # instead of - # install_dir : false configure_file( input : file, output : file, copy : true, - install_dir : install_sub, + install : get_option('installed_tests'), + install_dir : installed_testdir / 'test-keyring', install_mode : 'rw-r--r--', ) endforeach diff --git a/tests/test-keyring2/meson.build b/tests/test-keyring2/meson.build index 9715c4cc..0c653a08 100644 --- a/tests/test-keyring2/meson.build +++ b/tests/test-keyring2/meson.build @@ -1,26 +1,17 @@ # Copyright 2022 Collabora Ltd. # SPDX-License-Identifier: LGPL-2.1-or-later -if get_option('installed_tests') - install_sub = installed_testdir / 'test-keyring2' -else - install_sub = false -endif - foreach file : [ 'README', 'pubring.gpg', 'secring.gpg', ] - # TODO: When we depend on Meson 0.50.0, we can use - # install : get_option('installed_tests') - # instead of - # install_dir : false configure_file( input : file, output : file, copy : true, - install_dir : install_sub, + install : get_option('installed_tests'), + install_dir : installed_testdir / 'test-keyring2', install_mode : 'rw-r--r--', ) endforeach |