summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2022-04-24 10:50:19 +0100
committerSimon McVittie <smcv@debian.org>2022-10-24 16:12:14 +0100
commit435be4da1435315d69bbd837f77bf9f6a0c888f9 (patch)
tree097d0c05b7f55f446661ef47d41b850d62a3406e /tests
parentd98b745d4365a1375c1148fda0d8e1811881a481 (diff)
downloadflatpak-435be4da1435315d69bbd837f77bf9f6a0c888f9.tar.gz
meson: Depend on Meson 0.50.0
This sacrifices compatibility with Debian 10 to let us simplify how tests are set up. Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build77
-rw-r--r--tests/test-keyring/meson.build13
-rw-r--r--tests/test-keyring2/meson.build13
3 files changed, 25 insertions, 78 deletions
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