diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2017-08-11 11:45:48 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2017-10-31 18:20:11 +0100 |
commit | 899e2a934553b5d97f04d2268421eae3cf8a0197 (patch) | |
tree | 57fbcdaf28c79ebeb203232b28783f6786845654 /test | |
parent | 5db165178a2528802edbe2eaf34ea2a63a78cc02 (diff) | |
download | gvfs-899e2a934553b5d97f04d2268421eae3cf8a0197.tar.gz |
build: Port to meson build system
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
https://bugzilla.gnome.org/show_bug.cgi?id=786149
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/gvfs-all-tests.in | 4 | ||||
-rw-r--r-- | test/meson.build | 79 |
3 files changed, 85 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am index 3c169e66..3142ce1e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -119,4 +119,6 @@ EXTRA_DIST += \ files/testcert.pem \ files/powershot.ioctl \ files/powershot.umockdev \ + meson.build \ + gvfs-all-tests.in \ $(NULL) diff --git a/test/gvfs-all-tests.in b/test/gvfs-all-tests.in new file mode 100644 index 00000000..357b5d64 --- /dev/null +++ b/test/gvfs-all-tests.in @@ -0,0 +1,4 @@ +[Test] +Type=session +Exec=@testdir@/gvfs-test +Output=TAP diff --git a/test/meson.build b/test/meson.build new file mode 100644 index 00000000..f323c1b0 --- /dev/null +++ b/test/meson.build @@ -0,0 +1,79 @@ +if enable_installed_tests + installed_tests_execdir = join_paths(gvfs_libexecdir, 'installed-tests', gvfs_name) + installed_tests_metadir = join_paths(gvfs_datadir, 'installed-tests', gvfs_name) + + tests_conf = configuration_data() + tests_conf.set('testdir', installed_tests_execdir) + + session = 'session.conf' + + configure_file( + input: session + '.in', + output: session, + install: true, + install_dir: installed_tests_execdir, + configuration: tests_conf + ) + + all_tests = 'gvfs-all-tests' + + configure_file( + input: all_tests + '.in', + output: all_tests + '.test', + install: true, + install_dir: installed_tests_metadir, + configuration: tests_conf + ) + + install_subdir( + 'files', + install_dir: installed_tests_execdir + ) + + gvfs_test = files('gvfs-test') + + test_data = gvfs_test + [ + daemon_service, + metadata_service + ] + + if enable_afc + test_data += [afc_monitor, afc_service] + endif + + if enable_gdu + test_data += [gdu_monitor, gdu_service] + endif + + if enable_gphoto2 + test_data += [gphoto2_monitor, gphoto2_service] + endif + + if enable_udisks2 + test_data += [udisks2_monitor, udisks2_service] + endif + + install_data( + test_data, + install_dir: installed_tests_execdir + ) +endif + +if enable_devel_utils + tests = [ + 'benchmark-gvfs-big-files', + 'benchmark-gvfs-small-files', + 'benchmark-posix-big-files', + 'benchmark-posix-small-files', + 'test-query-info-stream' + ] + + foreach test: tests + executable( + test, + test + '.c', + include_directories: top_inc, + dependencies: glib_deps + ) + endforeach +endif |