[json-glib] build: Clean up installed tests rules
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] build: Clean up installed tests rules
- Date: Sat, 3 Jun 2017 11:41:47 +0000 (UTC)
commit 5c631b7c435066f13684a8a28faf7c3609a2d020
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Apr 13 11:34:15 2017 +0100
build: Clean up installed tests rules
Use variables for common values, instead of duplicating them.
json-glib/tests/meson.build | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/json-glib/tests/meson.build b/json-glib/tests/meson.build
index eaa81a3..25cb3da 100644
--- a/json-glib/tests/meson.build
+++ b/json-glib/tests/meson.build
@@ -22,28 +22,30 @@ test_data = [
'stream-load.json',
]
-installed_test_dir = join_paths(json_libexecdir, 'installed-tests', 'json-glib-1.0')
+installed_test_bindir = join_paths(json_libexecdir, 'installed-tests', 'json-glib-1.0')
+installed_test_datadir = join_paths(json_datadir, 'installed-tests', 'json-glib-1.0')
-install_data(test_data, install_dir: installed_test_dir)
+install_data(test_data, install_dir: installed_test_bindir)
foreach t: tests
- data = custom_target('@0@.test'.format(t),
- output: '@0@.test'.format(t),
+ installed_test = '@0@.test'.format(t)
+ data = custom_target(installed_test,
+ output: installed_test,
command: [
python3,
gen_installed_test,
- '--testdir=@0@'.format(installed_test_dir),
+ '--testdir=@0@'.format(installed_test_bindir),
'--testname=@0@'.format(t),
'--outdir=@OUTDIR@',
- '--outfile=@0@.test'.format(t),
+ '--outfile=@0@'.format(installed_test),
],
install: true,
- install_dir: join_paths(json_datadir, 'installed-tests', 'json-glib-1.0'))
+ install_dir: installed_test_datadir)
exe = executable(t, '@0@.c'.format(t),
c_args: json_c_args,
install: true,
- install_dir: installed_test_dir,
+ install_dir: installed_test_bindir,
dependencies: [ json_glib_dep, ])
test(t, exe,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]