summaryrefslogtreecommitdiffstats
path: root/src/libsystemd/meson.build
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-07 06:19:09 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-04-24 03:47:26 +0200
commit69e96427a2a77a4d1061ab9c54b9fd3dd1deafca (patch)
tree8e1150780b55b01e19b4c8f89d7f73376ee20705 /src/libsystemd/meson.build
parentmeson: add TAGS target (diff)
downloadsystemd-69e96427a2a77a4d1061ab9c54b9fd3dd1deafca.tar.xz
systemd-69e96427a2a77a4d1061ab9c54b9fd3dd1deafca.zip
meson: define tests
Tests can be run with 'ninja-build test' or using 'mesontest'. '-Dtests=unsafe' can be used to include the "unsafe" tests in the test suite, same as with autotools. v2: - use more conf.get guards are optional components - declare deps on generated headers for test-{af,arphrd,cap}-list v3: - define environment for tests Most test don't need this, but to be consistent with autotools-based build, and to avoid questions which tests need it and which don't, set the same environment for all tests. v4: - rework test generation Use a list of lists to define each test. This way we can reduce the boilerplate somewhat, although the test listings are still pretty verbose. We can also move the definitions of the tests to the subdirs. Unfortunately some subdirs are included earlier than some of the libraries that test binaries are linked to. So just dump all definitions of all tests that cannot be defined earlier into src/test. The `executable` definitions are still at the top level, so the binaries are compiled into the build root. v5: - tag test-dnssec-complex as manual v6: - fix HAVE_LIBZ typo - add missing libgobject/libgio defs - mark test-qcow2 as manual
Diffstat (limited to 'src/libsystemd/meson.build')
-rw-r--r--src/libsystemd/meson.build92
1 files changed, 92 insertions, 0 deletions
diff --git a/src/libsystemd/meson.build b/src/libsystemd/meson.build
index e46b57ae68..9c6e494b93 100644
--- a/src/libsystemd/meson.build
+++ b/src/libsystemd/meson.build
@@ -96,3 +96,95 @@ libsystemd_pc = configure_file(
configuration : substs)
install_data(libsystemd_pc,
install_dir : pkgconfiglibdir)
+
+tests += [
+ [['src/libsystemd/sd-bus/test-bus-marshal.c'],
+ [],
+ [libglib,
+ libgobject,
+ libgio,
+ libdbus]],
+
+ [['src/libsystemd/sd-bus/test-bus-signature.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-chat.c'],
+ [],
+ [threads]],
+
+ [['src/libsystemd/sd-bus/test-bus-cleanup.c'],
+ [],
+ [libseccomp]],
+
+ [['src/libsystemd/sd-bus/test-bus-track.c'],
+ [],
+ [libseccomp]],
+
+ [['src/libsystemd/sd-bus/test-bus-server.c'],
+ [],
+ [threads]],
+
+ [['src/libsystemd/sd-bus/test-bus-objects.c'],
+ [],
+ [threads]],
+
+ [['src/libsystemd/sd-bus/test-bus-error.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-gvariant.c'],
+ [],
+ [libglib,
+ libgobject,
+ libgio]],
+
+ [['src/libsystemd/sd-bus/test-bus-creds.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-match.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-kernel.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-kernel-bloom.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-benchmark.c'],
+ [],
+ [threads]],
+
+ [['src/libsystemd/sd-bus/test-bus-zero-copy.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-bus/test-bus-introspect.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-event/test-event.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-netlink/test-netlink.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-netlink/test-local-addresses.c'],
+ [],
+ []],
+
+ [['src/libsystemd/sd-resolve/test-resolve.c'],
+ [],
+ [threads]],
+
+ [['src/libsystemd/sd-login/test-login.c'],
+ [],
+ [],
+ '', 'manual'],
+ ]