summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2022-08-08 13:06:46 +0200
committerBastien Nocera <hadess@hadess.net>2022-08-08 13:31:26 +0200
commit19f8fb13736adc9aba00a57632d68d5a6fe4913c (patch)
tree44a4637abde8348614fefbfbdd3877d97ad3b7ac
parent1743789f6dfe7dd69bac345ee2a5e23a2f98279b (diff)
downloadgeocode-glib-19f8fb13736adc9aba00a57632d68d5a6fe4913c.tar.gz
build: Install binaries in libexecdir
Closes: #29
-rw-r--r--geocode-glib/tests/meson.build8
-rw-r--r--geocode-glib/tests/test-template.test.in2
2 files changed, 6 insertions, 4 deletions
diff --git a/geocode-glib/tests/meson.build b/geocode-glib/tests/meson.build
index 4e94a64..5cd1fca 100644
--- a/geocode-glib/tests/meson.build
+++ b/geocode-glib/tests/meson.build
@@ -1,10 +1,11 @@
install_dir = get_option('prefix') / get_option('datadir') / 'installed-tests' / library_name
+install_bindir = get_option('prefix') / get_option('libexecdir') / library_name
e = executable('geo-uri',
'geo-uri.c',
dependencies: geocode_glib_dep,
install: get_option('enable-installed-tests'),
- install_dir: install_dir)
+ install_dir: install_bindir)
test('Geo URI', e)
tests = ['geo-uri']
@@ -14,7 +15,7 @@ e = executable('geocode-glib',
'geocode-glib.c',
dependencies: geocode_glib_dep,
install: get_option('enable-installed-tests'),
- install_dir: install_dir)
+ install_dir: install_bindir)
env = ['G_TEST_SRCDIR=' + meson.current_source_dir()]
test('API test', e, env: env)
tests += ['geocode-glib']
@@ -23,7 +24,7 @@ e = executable('mock-backend',
'mock-backend.c',
dependencies: geocode_glib_dep,
install: get_option('enable-installed-tests'),
- install_dir: install_dir)
+ install_dir: install_bindir)
test('Test mock backend', e)
tests += ['mock-backend']
@@ -31,6 +32,7 @@ if get_option('enable-installed-tests')
foreach test_name: tests
conf_data = configuration_data()
conf_data.set('PATH', install_dir)
+ conf_data.set('BINPATH', install_bindir)
conf_data.set('NAME', test_name)
test_file = configure_file(
configuration: conf_data,
diff --git a/geocode-glib/tests/test-template.test.in b/geocode-glib/tests/test-template.test.in
index ce4bf60..24f4e67 100644
--- a/geocode-glib/tests/test-template.test.in
+++ b/geocode-glib/tests/test-template.test.in
@@ -1,5 +1,5 @@
[Test]
Description=@NAME@
-Exec=@PATH@/@NAME@
+Exec=sh -c "G_TEST_SRCDIR=@PATH@ @BINPATH@/@NAME@"
Type=session
Output=TAP