diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-06-30 14:33:10 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-06-30 14:33:10 +0200 |
commit | 66d688799256a6b9c895c7955e33a3746ad1774d (patch) | |
tree | 53ba6baade91a2c8c5f0a94e9aa5bdd2e4e93951 | |
parent | 7c2bdb88fa6d27ce0d834a41f79850080a7dc79b (diff) | |
download | geocode-glib-66d688799256a6b9c895c7955e33a3746ad1774d.tar.gz |
tests: Install .test file as required for installed-tests
See https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
Closes: #21
-rw-r--r-- | geocode-glib/tests/meson.build | 16 | ||||
-rw-r--r-- | geocode-glib/tests/test-template.test.in | 5 |
2 files changed, 21 insertions, 0 deletions
diff --git a/geocode-glib/tests/meson.build b/geocode-glib/tests/meson.build index e1311ca..51571b6 100644 --- a/geocode-glib/tests/meson.build +++ b/geocode-glib/tests/meson.build @@ -6,6 +6,7 @@ e = executable('geo-uri', install: get_option('enable-installed-tests'), install_dir: install_dir) test('Geo URI', e) +tests = ['geo-uri'] e = executable('geocode-glib', 'geocode-nominatim-test.h', @@ -16,6 +17,7 @@ e = executable('geocode-glib', install_dir: install_dir) env = ['G_TEST_SRCDIR=' + meson.current_source_dir()] test('API test', e, env: env) +tests += ['geocode-glib'] e = executable('mock-backend', 'mock-backend.c', @@ -23,8 +25,22 @@ e = executable('mock-backend', install: get_option('enable-installed-tests'), install_dir: install_dir) test('Test mock backend', e) +tests += ['mock-backend'] if get_option('enable-installed-tests') + foreach test_name: tests + conf_data = configuration_data() + conf_data.set('PATH', install_dir) + conf_data.set('NAME', test_name) + test_file = configure_file( + configuration: conf_data, + input: 'test-template.test.in', + output: test_name + '.test', + ) + + install_data(test_file, + install_dir: install_dir) + endforeach install_data('locale_format.json', 'locale_name.json', 'nominatim-area.json', diff --git a/geocode-glib/tests/test-template.test.in b/geocode-glib/tests/test-template.test.in new file mode 100644 index 0000000..ce4bf60 --- /dev/null +++ b/geocode-glib/tests/test-template.test.in @@ -0,0 +1,5 @@ +[Test] +Description=@NAME@ +Exec=@PATH@/@NAME@ +Type=session +Output=TAP |