[geocode-glib/wip/hadess/fix-bin-in-share] build: Install binaries in libexecdir




commit 19f8fb13736adc9aba00a57632d68d5a6fe4913c
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Aug 8 13:06:46 2022 +0200

    build: Install binaries in libexecdir
    
    Closes: #29

 geocode-glib/tests/meson.build           | 8 +++++---
 geocode-glib/tests/test-template.test.in | 2 +-
 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]