]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
meson: Use dicts for test definitions
authorJan Janssen <medhefgo@web.de>
Wed, 25 Jan 2023 16:19:52 +0000 (17:19 +0100)
committerJan Janssen <medhefgo@web.de>
Tue, 21 Feb 2023 14:10:26 +0000 (15:10 +0100)
Although this slightly more verbose it makes it much easier to reason
about. The code that produces the tests heavily benefits from this.

Test lists are also now sorted by test name.

24 files changed:
meson.build
src/analyze/meson.build
src/boot/efi/meson.build
src/busctl/meson.build
src/core/meson.build
src/coredump/meson.build
src/import/meson.build
src/journal/meson.build
src/libsystemd-network/meson.build
src/libsystemd/meson.build
src/libudev/meson.build
src/locale/meson.build
src/login/meson.build
src/machine/meson.build
src/network/meson.build
src/nspawn/meson.build
src/oom/meson.build
src/resolve/meson.build
src/shutdown/meson.build
src/test/meson.build
src/timesync/meson.build
src/tmpfiles/meson.build
src/udev/meson.build
src/xdg-autostart-generator/meson.build

index 8a397e7c4d76389c6719056937377872c970aaeb..d8ab43ba6cff459c5043df81a72657cbf3830a03 100644 (file)
@@ -4078,60 +4078,50 @@ if '-O2' in c_args and '-flto=auto' in c_args
 endif
 
 foreach test : simple_tests
-        tests += [ [[test]] ]
+        tests += { 'sources' : [test] }
 endforeach
 
-foreach tuple : tests
-        sources = tuple[0]
-        link_with = tuple.length() > 1 and tuple[1].length() > 0 ? tuple[1] : [libshared]
-        dependencies = tuple.length() > 2 ? tuple[2] : []
-        incs = tuple.length() > 3 and tuple[3].length() > 0 ? tuple[3] : includes
-        condition = tuple.length() > 4 ? tuple[4] : ''
-        type = tuple.length() > 5 ? tuple[5] : ''
-        defs = tuple.length() > 6 ? tuple[6] : []
-        defs += test_cflags
-        parallel = tuple.length() > 7 ? tuple[7] : true
-        timeout = 30
+foreach test : tests
+        sources = test.get('sources')
+        condition = test.get('condition', '')
+        type = test.get('type', '')
+        base = test.get('base', {})
 
         # FIXME: Use fs.stem() with meson >= 0.54.0
         name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
-        if type.startswith('timeout=')
-                timeout = type.split('=')[1].to_int()
-                type = ''
-        endif
 
         suite = fs.name(fs.parent('@0@'.format(sources[0])))
         # FIXME: Use str.replace() with meson >= 0.58.0
         suite = suite.split('sd-')[-1]
 
-        if condition == '' or conf.get(condition) == 1
-                exe = executable(
-                        name,
-                        sources,
-                        include_directories : incs,
-                        link_with : link_with,
-                        dependencies : [versiondep,
-                                        dependencies],
-                        c_args : defs,
-                        build_by_default : want_tests != 'false',
-                        install_rpath : rootpkglibdir,
-                        install : install_tests,
-                        install_dir : testsdir / type,
-                        link_depends : runtest_env)
-
-                if type == 'manual'
-                        message('@0@ is a manual test'.format(name))
-                elif type == 'unsafe' and want_tests != 'unsafe'
-                        message('@0@ is an unsafe test'.format(name))
-                elif want_tests != 'false'
-                        test(name, exe,
-                             env : test_env,
-                             timeout : timeout,
-                             suite : suite,
-                             is_parallel : parallel)
-                endif
-        else
+        if condition != '' and conf.get(condition) == 0
                 message('Not compiling @0@ because @1@ is not true'.format(name, condition))
+                continue
+        endif
+
+        exe = executable(
+                name,
+                sources,
+                include_directories : [base.get('includes', []), test.get('includes', includes)],
+                link_with : [base.get('link_with', []), test.get('link_with', libshared)],
+                dependencies : [versiondep, base.get('dependencies', []), test.get('dependencies', [])],
+                c_args : [test_cflags, test.get('c_args', [])],
+                build_by_default : want_tests != 'false',
+                install_rpath : rootpkglibdir,
+                install : install_tests,
+                install_dir : testsdir / type,
+                link_depends : runtest_env)
+
+        if type == 'manual'
+                message('@0@ is a manual test'.format(name))
+        elif type == 'unsafe' and want_tests != 'unsafe'
+                message('@0@ is an unsafe test'.format(name))
+        elif want_tests != 'false'
+                test(name, exe,
+                        env : test_env,
+                        timeout : test.get('timeout', 30),
+                        suite : suite,
+                        is_parallel : test.get('parallel', true))
         endif
 endforeach
 
index 55b805b68e7077969690529d8dd1fe4824245fbb..6493cb2e995ef312c9ee2a30daf130b81652d3ad 100644 (file)
@@ -30,11 +30,11 @@ systemd_analyze_sources = files(
 )
 
 tests += [
-        [files('test-verify.c',
-               'analyze-verify-util.c',
-               'analyze-verify-util.h'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
+        {
+                'sources' : files(
+                        'test-verify.c',
+                        'analyze-verify-util.c',
+                ),
+                'base' : test_core_base,
+        },
 ]
index 380177449f4737319fc2334a07a78e310a65b122..80061a559bb1d8dfec875428b0cf838f8432392e 100644 (file)
@@ -389,18 +389,26 @@ if efi_arch[1] in ['ia32', 'x86_64']
 endif
 
 tests += [
-        [files('test-efi-string.c', 'efi-string.c')],
+        {
+                'sources' : files(
+                        'test-efi-string.c',
+                        'efi-string.c',
+                )
+        },
 ]
 
 # BCD parser only makes sense on arches that Windows supports.
 if efi_arch[1] in ['ia32', 'x86_64', 'arm', 'aarch64']
         systemd_boot_sources += files('bcd.c')
         tests += [
-                [files('test-bcd.c', 'efi-string.c'),
-                 [],
-                 [libzstd],
-                 [],
-                 'HAVE_ZSTD'],
+                {
+                        'sources' : files(
+                                'test-bcd.c',
+                                'efi-string.c',
+                        ),
+                        'dependencies' : libzstd,
+                        'condition' : 'HAVE_ZSTD',
+                },
         ]
         fuzzers += [
                 [files('fuzz-bcd.c', 'bcd.c', 'efi-string.c')],
index e3611b74d701be2373c12545f2264604100f839d..dce0224c39b5dd368aaa95de2e8f95745adabe32 100644 (file)
@@ -6,6 +6,10 @@ busctl_sources = files(
 )
 
 tests += [
-        [files('test-busctl-introspect.c',
-               'busctl-introspect.c')],
+        {
+                'sources' : files(
+                        'test-busctl-introspect.c',
+                        'busctl-introspect.c',
+                )
+        },
 ]
index 981b46fc0b2ada67cb313d826a578d5693173a54..65b34bb467b4b1c7417d53adf14f9a7f0c083639 100644 (file)
@@ -179,6 +179,11 @@ endif
 
 ############################################################
 
+test_core_base = {
+        'link_with' : [libcore, libshared],
+        'includes' : core_includes,
+}
+
 fuzzers += [
         [files('fuzz-unit-file.c'),
          [libcore,
index 9398a5142b2cb884599c893671ccd3895f6b3aeb..fb31a2148fcd82390583df4c30faf441813a987e 100644 (file)
@@ -13,7 +13,11 @@ if conf.get('ENABLE_COREDUMP') == 1 and install_sysconfdir_samples
 endif
 
 tests += [
-        [files('test-coredump-vacuum.c',
-               'coredump-vacuum.c'),
-         [], [], [], '', 'manual'],
+        {
+                'sources' : files(
+                        'test-coredump-vacuum.c',
+                        'coredump-vacuum.c',
+                ),
+                'type' : 'manual',
+        },
 ]
index 41595c81c60f08776d41832ecff177e1fccf4b3f..58b9719cc1bb43e56b9bc640a73dbe9df65791bc 100644 (file)
@@ -52,9 +52,13 @@ if conf.get('ENABLE_IMPORTD') == 1
 endif
 
 tests += [
-        [files('test-qcow2.c',
-               'qcow2-util.c'),
-         [],
-         [libz],
-         [], 'HAVE_ZLIB', 'manual'],
+        {
+                'sources' : files(
+                        'test-qcow2.c',
+                        'qcow2-util.c',
+                ),
+                'dependencies' : libz,
+                'condition' : 'HAVE_ZLIB',
+                'type' : 'manual',
+        },
 ]
index 30cebe4d4433820ecccabe7994c223e7129c1efb..8547a902228dc6c55a33490fd49f9c05a8fdeb4e 100644 (file)
@@ -65,41 +65,50 @@ endif
 
 ############################################################
 
-tests += [
-        [files('test-journal-syslog.c'),
-         [libjournal_core,
-          libshared],
-         [threads,
-          libxz,
-          liblz4,
-          libselinux]],
-
-        [files('test-journal-config.c'),
-         [libjournal_core,
-          libshared],
-         [libxz,
-          liblz4,
-          libselinux]],
-
-        [files('test-journal.c'),
-         [libjournal_core,
-          libshared]],
+test_journal_base = {
+        'link_with' : [libjournal_core, libshared],
+}
 
-        [files('test-journal-stream.c'),
-         [libjournal_core,
-          libshared]],
-
-         [files('test-journal-flush.c'),
-          [libjournal_core,
-           libshared]],
-
-        [files('test-journal-verify.c'),
-         [libjournal_core,
-          libshared]],
-
-        [files('test-journal-interleaving.c'),
-         [libjournal_core,
-          libshared]],
+tests += [
+        {
+                'sources' : files('test-journal-config.c'),
+                'dependencies' : [
+                        liblz4,
+                        libselinux,
+                        libxz,
+                ],
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal-flush.c'),
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal-interleaving.c'),
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal-stream.c'),
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal-syslog.c'),
+                'dependencies' : [
+                        liblz4,
+                        libselinux,
+                        libxz,
+                        threads,
+                ],
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal-verify.c'),
+                'base' : test_journal_base,
+        },
+        {
+                'sources' : files('test-journal.c'),
+                'base' : test_journal_base,
+        },
 ]
 
 fuzzers += [
index 5f203f5cdad60c267c62486547f41dd7743c3479..21dc85d8de0caa615b5367f053ed048c77256c18 100644 (file)
@@ -38,52 +38,57 @@ libsystemd_network_includes = [includes, include_directories('.')]
 
 ############################################################
 
-tests += [
-        [files('test-dhcp-option.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-sd-dhcp-lease.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-dhcp-client.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-dhcp-server.c'),
-         [libshared,
-          libsystemd_network]],
+test_libsystemd_network_base = {
+        'link_with' : [libshared, libsystemd_network],
+}
 
-        [files('test-ipv4ll.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-ipv4ll-manual.c'),
-         [libshared,
-          libsystemd_network],
-         [], [], '', 'manual'],
-
-        [files('test-acd.c'),
-         [libshared,
-          libsystemd_network],
-         [], [], '', 'manual'],
-
-        [files('test-ndisc-rs.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-ndisc-ra.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-dhcp6-client.c'),
-         [libshared,
-          libsystemd_network]],
-
-        [files('test-lldp-rx.c'),
-         [libshared,
-          libsystemd_network]],
+tests += [
+        {
+                'sources' : files('test-acd.c'),
+                'base' : test_libsystemd_network_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-dhcp-client.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-dhcp-option.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-dhcp-server.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-dhcp6-client.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-ipv4ll-manual.c'),
+                'base' : test_libsystemd_network_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-ipv4ll.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-lldp-rx.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-ndisc-ra.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-ndisc-rs.c'),
+                'base' : test_libsystemd_network_base,
+        },
+        {
+                'sources' : files('test-sd-dhcp-lease.c'),
+                'base' : test_libsystemd_network_base,
+        },
 ]
 
 fuzzers += [
index 8646da50a164e4fc9f0317f7328ac6e55506dbe8..3478d9e5a05fc119299cf65d8b2d2c1bf13dc92f 100644 (file)
@@ -153,8 +153,10 @@ simple_tests += files(
 )
 
 tests += [
-        [files('sd-journal/test-journal-enum.c'),
-         [], [], [], '', 'timeout=360'],
+        {
+                'sources' : files('sd-journal/test-journal-enum.c'),
+                'timeout' : 360,
+        },
 ]
 
 ############################################################
@@ -173,62 +175,64 @@ simple_tests += files(
 )
 
 tests += [
-        [files('sd-bus/test-bus-address.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-marshal.c'),
-         [],
-         [threads,
-          libglib,
-          libgobject,
-          libgio,
-          libdbus,
-          libm]],
-
-        [files('sd-bus/test-bus-signature.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-queue-ref-cycle.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-watch-bind.c'),
-         [],
-         [threads],
-         [], '', 'timeout=120'],
-
-        [files('sd-bus/test-bus-chat.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-cleanup.c'),
-         [],
-         [threads,
-          libseccomp]],
-
-        [files('sd-bus/test-bus-track.c'),
-         [],
-         [libseccomp]],
-
-        [files('sd-bus/test-bus-server.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-objects.c'),
-         [],
-         [threads]],
-
-        [files('sd-bus/test-bus-benchmark.c'),
-         [],
-         [threads],
-         [], '', 'manual'],
-
-        [files('sd-resolve/test-resolve.c'),
-         [],
-         [threads],
-         [], '', 'timeout=120'],
+        {
+                'sources' : files('sd-bus/test-bus-address.c'),
+                'dependencies' : threads
+        },
+        {
+                'sources' : files('sd-bus/test-bus-benchmark.c'),
+                'dependencies' : threads,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('sd-bus/test-bus-chat.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-cleanup.c'),
+                'dependencies' : [threads, libseccomp],
+        },
+        {
+                'sources' : files('sd-bus/test-bus-marshal.c'),
+                'dependencies' : [
+                        libdbus,
+                        libgio,
+                        libglib,
+                        libgobject,
+                        libm,
+                        threads,
+                ],
+        },
+        {
+                'sources' : files('sd-bus/test-bus-objects.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-queue-ref-cycle.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-server.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-signature.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-track.c'),
+                'dependencies' : libseccomp,
+        },
+        {
+                'sources' : files('sd-bus/test-bus-watch-bind.c'),
+                'dependencies' : threads,
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('sd-resolve/test-resolve.c'),
+                'dependencies' : threads,
+                'timeout' : 120,
+        },
 ]
 
 if cxx_cmd != ''
index 35c024a0e734170718f75ac5bf3402eac80b112d..0e53b83e515a0dd27d2ab802073085063877324a 100644 (file)
@@ -43,7 +43,11 @@ libudev_pc = custom_target(
 ############################################################
 
 tests += [
-        [files('test-libudev.c'),
-         [libshared,
-          libudev_basic]],
+        {
+                'sources' : files('test-libudev.c'),
+                'link_with' : [
+                        libshared,
+                        libudev_basic,
+                ],
+        },
 ]
index fcf2798dd163e7124e9d08692848d163510e2c8d..60d2666ffd6921efb42012d27c9865dbe53d7848 100644 (file)
@@ -29,6 +29,10 @@ if conf.get('ENABLE_LOCALED') == 1
 endif
 
 tests += [
-        [files('test-localed-util.c',
-               'localed-util.c')],
+        {
+                'sources' : files(
+                        'test-localed-util.c',
+                        'localed-util.c',
+                ),
+        },
 ]
index fd153d4ef819e2b44833acc4a20d510a540ce0c2..198023715b607537d4696f410c526ee6d7c21e9f 100644 (file)
@@ -82,14 +82,20 @@ simple_tests += files(
 )
 
 tests += [
-        [files('test-inhibit.c'),
-         [], [], [], '', 'manual'],
-
-        [files('test-login-tables.c'),
-         [liblogind_core,
-          libshared],
-         [threads]],
-
-        [files('test-session-properties.c'),
-         [], [], [], '', 'manual'],
+        {
+                'sources' : files('test-inhibit.c'),
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-login-tables.c'),
+                'link_with' : [
+                        liblogind_core,
+                        libshared,
+                ],
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-session-properties.c'),
+                'type' : 'manual',
+        },
 ]
index 01d0bedd094984bd6e0f0e2e1cf6e0ed09ad4733..7b09d4b24f95f8ee0de4fbd5914802b1e0fc223b 100644 (file)
@@ -31,8 +31,12 @@ if conf.get('ENABLE_MACHINED') == 1
 endif
 
 tests += [
-        [files('test-machine-tables.c'),
-         [libmachine_core,
-          libshared],
-         [threads]],
+        {
+                'sources' : files('test-machine-tables.c'),
+                'link_with': [
+                        libmachine_core,
+                        libshared
+                ],
+                'dependencies': threads,
+        },
 ]
index f48c4ed18285d0594de6d2af1d7da254dafaf95e..0b68b74b4598c532dbfa53a6fdabb60ddc5d57c3 100644 (file)
@@ -187,37 +187,40 @@ fuzzers += [
          network_includes],
 ]
 
-tests += [
-        [files('test-networkd-address.c'),
-         [libnetworkd_core,
-          libsystemd_network],
-         [libatomic],
-         network_includes],
-
-        [files('test-networkd-conf.c'),
-         [libnetworkd_core,
-          libsystemd_network],
-         [libatomic],
-         network_includes],
-
-        [files('test-networkd-util.c'),
-         [libnetworkd_core,
-          libsystemd_network],
-         [],
-         network_includes],
+test_network_base = {
+        'link_with' : [libnetworkd_core, libsystemd_network],
+        'includes' : network_includes,
+}
 
-        [files('test-network.c'),
-         [libnetworkd_core,
-          libsystemd_network],
-         [threads],
-         network_includes],
-
-        [files('test-network-tables.c'),
-         [libnetworkd_core,
-          libsystemd_network],
-         [threads],
-         network_includes],
-
-        [files('generator/test-network-generator.c',
-               'generator/network-generator.c')],
+tests += [
+        {
+                'sources' : files(
+                        'generator/network-generator.c',
+                        'generator/test-network-generator.c'
+                )
+        },
+        {
+                'sources' : files('test-network-tables.c'),
+                'dependencies' : threads,
+                'base' : test_network_base,
+        },
+        {
+                'sources' : files('test-network.c'),
+                'dependencies' : threads,
+                'base' : test_network_base,
+        },
+        {
+                'sources' : files('test-networkd-address.c'),
+                'dependencies' : libatomic,
+                'base' : test_network_base,
+        },
+        {
+                'sources' : files('test-networkd-conf.c'),
+                'dependencies' : libatomic,
+                'base' : test_network_base,
+        },
+        {
+                'sources' : files('test-networkd-util.c'),
+                'base' : test_network_base,
+        },
 ]
index 36f0a92686d46e2651002004777f53da101cbb65..9d6bc21bbf181eaab0ad380bf4f847dc72523e70 100644 (file)
@@ -39,21 +39,31 @@ systemd_nspawn_sources = files('nspawn.c')
 ############################################################
 
 tests += [
-        [files('test-nspawn-tables.c'),
-         [libnspawn_core,
-          libshared],
-         [libseccomp]],
-
-        [files('test-nspawn-util.c'),
-         [libnspawn_core,
-          libshared],
-         [libseccomp]],
-
-        [files('test-patch-uid.c'),
-         [libnspawn_core,
-          libshared],
-         [libacl],
-         [], '', 'manual'],
+        {
+                'sources' : files('test-nspawn-tables.c'),
+                'link_with' : [
+                        libnspawn_core,
+                        libshared,
+                ],
+                'dependencies' : libseccomp,
+        },
+        {
+                'sources' : files('test-nspawn-util.c'),
+                'link_with' : [
+                        libnspawn_core,
+                        libshared,
+                ],
+                'dependencies' : libseccomp,
+        },
+        {
+                'sources' : files('test-patch-uid.c'),
+                'link_with' : [
+                        libnspawn_core,
+                        libshared,
+                ],
+                'dependencies' : libacl,
+                'type' : 'manual',
+        },
 ]
 
 fuzzers += [
index 1c4e7f1e64a6e43cd1f47d8a3d618fd5c866a246..8d31f05c9849e5771ed7b528ae9c2f0df02b6192 100644 (file)
@@ -23,8 +23,11 @@ if conf.get('ENABLE_OOMD') == 1
 endif
 
 tests += [
-        [files('test-oomd-util.c',
-               'oomd-util.c'),
-        [],
-        [libatomic]]
+        {
+                'sources' : files(
+                        'test-oomd-util.c',
+                        'oomd-util.c',
+                ),
+                'dependencies' : libatomic,
+        },
 ]
index 331c925814a4469f817ec417c2dbc7402a47847a..b5083685c452c738dd008caad546f690bee69a91 100644 (file)
@@ -137,53 +137,54 @@ custom_target(
 
 ############################################################
 
-tests += [
-        [files('test-resolve-tables.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm]],
-
-        [files('test-dns-packet.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm]],
-
-        [files('test-resolved-etc-hosts.c',
-               'resolved-etc-hosts.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm]],
+test_resolve_base = {
+        'link_with' : [libsystemd_resolve_core, libshared],
+        'dependencies' : [lib_openssl_or_gcrypt, libm],
+}
 
-        [files('test-resolved-packet.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm]],
-
-        [files('test-resolved-stream.c')
-         + basic_dns_sources + systemd_resolved_sources,
-         [libshared],
-         [lib_openssl_or_gcrypt,
-          libm]
-         + systemd_resolved_dependencies,
-         resolve_includes],
-
-        [files('test-dnssec.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm],
-         [], 'HAVE_OPENSSL_OR_GCRYPT'],
-
-        [files('test-dnssec-complex.c'),
-         [libsystemd_resolve_core,
-          libshared],
-         [lib_openssl_or_gcrypt,
-          libm],
-         [], '', 'manual'],
+tests += [
+        {
+                'sources' : files('test-resolve-tables.c'),
+                'base' : test_resolve_base,
+        },
+        {
+                'sources' : files('test-dns-packet.c'),
+                'base' : test_resolve_base,
+        },
+        {
+                'sources' : files(
+                        'test-resolved-etc-hosts.c',
+                        'resolved-etc-hosts.c',
+                ),
+                'base' : test_resolve_base,
+        },
+        {
+                'sources' : files('test-resolved-packet.c'),
+                'base' : test_resolve_base,
+        },
+        {
+                'sources' : files('test-dnssec.c'),
+                'base' : test_resolve_base,
+                'condition' : 'HAVE_OPENSSL_OR_GCRYPT',
+        },
+        {
+                'sources' : files('test-dnssec-complex.c'),
+                'base' : test_resolve_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : [
+                        files('test-resolved-stream.c'),
+                        basic_dns_sources,
+                        systemd_resolved_sources,
+                ],
+                'dependencies' : [
+                        lib_openssl_or_gcrypt,
+                        libm,
+                        systemd_resolved_dependencies,
+                ],
+                'includes' : resolve_includes,
+        },
 ]
 
 fuzzers += [
index d62032a4f1d3696c2907b3ae6f5cf888644f74da..1e28528b9712f8c6a0cd646c7aa36737d119a7a7 100644 (file)
@@ -6,8 +6,11 @@ systemd_shutdown_sources = files(
 )
 
 tests += [
-        [files('test-umount.c',
-               'umount.c'),
-         [],
-         [libmount]],
+        {
+                'sources' : files(
+                        'test-umount.c',
+                        'umount.c',
+                ),
+                'dependencies' : libmount,
+        },
 ]
index 4274aad2225c8a6e008906b8bccaa08561be8f1d..e3c0e67dcfb8cac35b8374b2ee0534d657d4396c 100644 (file)
@@ -176,401 +176,371 @@ simple_tests += files(
 
 ############################################################
 
-tests += [
-        [files('test-engine.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-manager.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-emergency-action.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-chown-rec.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-dlopen-so.c'),
-         [],
-         libp11kit_cflags],
-
-        [files('test-job-type.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-ns.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes, '', 'manual'],
-
-        [files('test-loopback.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-boot-timestamps.c'),
-         [], [], [], 'ENABLE_EFI'],
-
-        [files('test-unit-name.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-load-fragment.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-unit-serialize.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-capability.c'),
-         [],
-         [libcap]],
-
-        [files('test-async.c'),
-         [], [], [], '', 'timeout=120'],
-
-        [files('test-compress.c'),
-         [libshared,
-          libbasic_compress]],
-
-        [files('test-compress-benchmark.c'),
-         [libshared,
-          libbasic_compress],
-         [],
-         [], '', 'timeout=90'],
-
-        [files('test-random-util.c'),
-         [],
-         [libm],
-         [], '', 'timeout=120'],
-
-        [files('test-math-util.c'),
-         [],
-         [libm]],
-
-        [files('test-json.c'),
-         [],
-         [libm]],
-
-        [files('test-libmount.c'),
-         [],
-         [threads,
-          libmount]],
-
-        [files('test-fd-util.c'),
-         [],
-         [libseccomp]],
-
-        [files('test-libcrypt-util.c'),
-         [], [libcrypt], [], '', 'timeout=120'],
-
-        [files('test-parse-util.c'),
-         [],
-         [libm]],
-
-        [files('test-process-util.c'),
-         [],
-         [threads]],
-
-        [files('test-cap-list.c') +
-         generated_gperf_headers,
-         [],
-         [libcap]],
-
-        [files('test-namespace.c'),
-         [libcore,
-          libshared],
-         [threads,
-          libblkid],
-         core_includes],
-
-        [files('test-acl-util.c'),
-         [], [], [], 'HAVE_ACL'],
-
-        [files('test-seccomp.c'),
-         [],
-         [libseccomp],
-         [], 'HAVE_SECCOMP'],
-
-        [files('test-ask-password-api.c'),
-         [], [], [], '', 'manual'],
-
-        [files('test-loop-block.c'),
-         [libcore,
-          libshared],
-         [threads,
-          libblkid],
-         core_includes, '', '', [], false],
-
-        [files('test-sizeof.c'),
-         [libbasic]],
-
-        [files('test-bpf-devices.c'),
-         [libcore,
-          libshared],
-         [libmount,
-          threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libblkid],
-         core_includes],
-
-        [files('test-bpf-firewall.c'),
-         [libcore,
-          libshared],
-         [libmount,
-          threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libblkid],
-         core_includes],
-
-        [files('test-bpf-foreign-programs.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-bpf-lsm.c'),
-         [libcore,
-          libshared],
-         [libmount,
-          threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libblkid],
-         core_includes],
-
-        [files('test-watch-pid.c'),
-         [libcore,
-          libshared],
-         [libmount,
-          threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libblkid],
-         core_includes],
-
-        [files('test-hashmap.c',
-               'test-hashmap-plain.c') +
-         [test_hashmap_ordered_c],
-         [], [], [], '', 'timeout=180'],
-
-        [files('test-set-disable-mempool.c'),
-         [],
-         [threads]],
-
-        [files('test-tables.c'),
-         [libcore,
-          libjournal_core,
-          libudevd_core,
-          libshared],
-         [threads,
-          libseccomp,
-          libmount,
-          libxz,
-          liblz4,
-          libblkid,
-          libselinux],
-         [core_includes, journal_includes, udev_includes]],
-
-        [files('test-ipcrm.c'),
-         [], [], [], '', 'unsafe'],
-
-        [files('test-btrfs.c'),
-         [], [], [], '', 'manual'],
-
-        [files('test-netlink-manual.c'),
-         [],
-         [libkmod],
-         [], 'HAVE_KMOD', 'manual'],
-
-        [files('test-sbat.c'),
-         [], [], [], 'HAVE_GNU_EFI', '',
-         ['-I@0@'.format(efi_config_h_dir)]],
-
-        [files('test-cgroup-cpu.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-cgroup-unit-default.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes],
-
-        [files('test-cgroup-mask.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-varlink.c'),
-         [],
-         [threads]],
-
-        [files('test-chase-symlinks.c'),
-         [], [], [], '', 'manual'],
-
-        [files('test-path.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes, '', 'timeout=120'],
-
-        [files('test-execute.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes, '', 'timeout=360'],
-
-        [files('test-install.c'),
-         [libcore,
-          libshared],
-         [],
-         core_includes, '', 'manual'],
-
-        [files('test-watchdog.c'),
-         [], [], [], '', 'unsafe'],
-
-        [files('test-sched-prio.c'),
-         [libcore,
-          libshared],
-         [threads,
-          librt,
-          libseccomp,
-          libselinux,
-          libmount,
-          libblkid],
-         core_includes],
-
-        [files('test-af-list.c') +
-         generated_gperf_headers],
-
-        [files('test-arphrd-util.c') +
-         generated_gperf_headers],
-
-        [files('test-errno-list.c') +
-         generated_gperf_headers],
-
-        [files('test-ip-protocol-list.c') +
-         shared_generated_gperf_headers],
-
-        [files('test-utmp.c'),
-         [], [], [], 'ENABLE_UTMP'],
-
-        [files('test-udev.c'),
-         [libudevd_core,
-          libshared],
-         [threads,
-          librt,
-          libblkid,
-          libkmod,
-          libacl,
-          libselinux],
-         udev_includes, '', 'manual'],
-
-        [files('test-cryptolib.c'),
-         [libshared],
-         [lib_openssl_or_gcrypt],
-         [], 'HAVE_OPENSSL_OR_GCRYPT'],
-
-        [files('test-nss-hosts.c',
-               'nss-test-util.c'),
-         [],
-         [libdl],
-         [], 'ENABLE_NSS', 'timeout=120'],
-
-        [files('test-nss-users.c',
-               'nss-test-util.c'),
-         [],
-         [libdl],
-         [], 'ENABLE_NSS'],
-
-        [files('test-qrcode-util.c'),
-         [],
-         [libdl]],
+common_test_dependencies = [
+        libblkid,
+        libmount,
+        librt,
+        libseccomp,
+        libselinux,
+        threads,
+]
 
-        [files('test-nscd-flush.c'),
-         [], [], [], 'ENABLE_NSCD', 'manual'],
+tests += [
+        {
+                'sources' : files('test-acl-util.c'),
+                'condition' : 'HAVE_ACL',
+        },
+        {
+                'sources' : [
+                        files('test-af-list.c'),
+                        generated_gperf_headers,
+                ],
+        },
+        {
+                'sources' : [
+                        files('test-arphrd-util.c'),
+                        generated_gperf_headers,
+                ],
+        },
+        {
+                'sources' : files('test-ask-password-api.c'),
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-async.c'),
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('test-boot-timestamps.c'),
+                'condition' : 'ENABLE_EFI',
+        },
+        {
+                'sources' : files('test-bpf-devices.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-bpf-firewall.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-bpf-foreign-programs.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-bpf-lsm.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-btrfs.c'),
+                'type' : 'manual',
+        },
+        {
+                'sources' : [
+                        files('test-cap-list.c'),
+                        generated_gperf_headers,
+                ],
+                'dependencies' : libcap,
+        },
+        {
+                'sources' : files('test-capability.c'),
+                'dependencies' : libcap,
+        },
+        {
+                'sources' : files('test-cgroup-cpu.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-cgroup-mask.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-cgroup-unit-default.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-chase-symlinks.c'),
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-chown-rec.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-compress-benchmark.c'),
+                'link_with' : [
+                        libbasic_compress,
+                        libshared,
+                ],
+                'timeout' : 90,
+        },
+        {
+                'sources' : files('test-compress.c'),
+                'link_with' : [
+                        libbasic_compress,
+                        libshared,
+                ],
+        },
+        {
+                'sources' : files('test-cryptolib.c'),
+                'link_with' : libshared,
+                'dependencies' : lib_openssl_or_gcrypt,
+                'condition' : 'HAVE_OPENSSL_OR_GCRYPT',
+        },
+        {
+                'sources' : files('test-dlopen-so.c'),
+                'dependencies' : libp11kit_cflags
+        },
+        {
+                'sources' : files('test-emergency-action.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-engine.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : [
+                        files('test-errno-list.c'),
+                        generated_gperf_headers,
+                ],
+        },
+        {
+                'sources' : files('test-execute.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'timeout' : 360,
+        },
+        {
+                'sources' : files('test-fd-util.c'),
+                'dependencies' : libseccomp,
+        },
+        {
+                'sources' : [files(
+                        'test-hashmap.c',
+                        'test-hashmap-plain.c'),
+                        test_hashmap_ordered_c,
+                ],
+                'timeout' : 180,
+        },
+        {
+                'sources' : files('test-install.c'),
+                'base' : test_core_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : [
+                        files('test-ip-protocol-list.c'),
+                        shared_generated_gperf_headers,
+                ],
+        },
+        {
+                'sources' : files('test-ipcrm.c'),
+                'type' : 'unsafe',
+        },
+        {
+                'sources' : files('test-job-type.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-json.c'),
+                'dependencies' : libm,
+        },
+        {
+                'sources' : files('test-libcrypt-util.c'),
+                'dependencies' : libcrypt,
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('test-libmount.c'),
+                'dependencies' : [
+                        libmount,
+                        threads,
+                ],
+        },
+        {
+                'sources' : files('test-load-fragment.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-loop-block.c'),
+                'dependencies' : [threads, libblkid],
+                'base' : test_core_base,
+                'parallel' : false,
+        },
+        {
+                'sources' : files('test-loopback.c'),
+                'dependencies' : common_test_dependencies,
+        },
+        {
+                'sources' : files('test-manager.c'),
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-math-util.c'),
+                'dependencies' : libm,
+        },
+        {
+                'sources' : files('test-namespace.c'),
+                'dependencies' : [
+                        libblkid,
+                        threads,
+                ],
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-netlink-manual.c'),
+                'dependencies' : libkmod,
+                'condition' : 'HAVE_KMOD',
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-ns.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-nscd-flush.c'),
+                'condition' : 'ENABLE_NSCD',
+                'type' : 'manual',
+        },
+        {
+                'sources' : files(
+                        'test-nss-hosts.c',
+                        'nss-test-util.c',
+                ),
+                'dependencies' : libdl,
+                'condition' : 'ENABLE_NSS',
+                'timeout' : 120,
+        },
+        {
+                'sources' : files(
+                        'test-nss-users.c',
+                        'nss-test-util.c',
+                ),
+                'dependencies' : libdl,
+                'condition' : 'ENABLE_NSS',
+        },
+        {
+                'sources' : files('test-parse-util.c'),
+                'dependencies' : libm,
+        },
+        {
+                'sources' : files('test-path.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('test-process-util.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-qrcode-util.c'),
+                'dependencies' : libdl,
+        },
+        {
+                'sources' : files('test-random-util.c'),
+                'dependencies' : libm,
+                'timeout' : 120,
+        },
+        {
+                'sources' : files('test-sbat.c'),
+                'condition' : 'HAVE_GNU_EFI',
+                'c_args' : '-I@0@'.format(efi_config_h_dir),
+        },
+        {
+                'sources' : files('test-sched-prio.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-seccomp.c'),
+                'dependencies' : libseccomp,
+                'condition' : 'HAVE_SECCOMP',
+        },
+        {
+                'sources' : files('test-set-disable-mempool.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-sizeof.c'),
+                'link_with' : libbasic,
+        },
+        {
+                'sources' : files('test-tables.c'),
+                'link_with' : [
+                        libcore,
+                        libjournal_core,
+                        libshared,
+                        libudevd_core,
+                ],
+                'dependencies' : [
+                        libblkid,
+                        liblz4,
+                        libmount,
+                        libseccomp,
+                        libselinux,
+                        libxz,
+                        threads,
+                ],
+                'includes' : [
+                        core_includes,
+                        journal_includes,
+                        udev_includes,
+                ],
+        },
+        {
+                'sources' : files('test-udev.c'),
+                'link_with' : [
+                        libshared,
+                        libudevd_core,
+                ],
+                'dependencies' : [
+                        libacl,
+                        libblkid,
+                        libkmod,
+                        librt,
+                        libselinux,
+                        threads,
+                ],
+                'includes' : udev_includes,
+                'type' : 'manual',
+        },
+        {
+                'sources' : files('test-unit-name.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-unit-serialize.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-utmp.c'),
+                'condition' : 'ENABLE_UTMP',
+        },
+        {
+                'sources' : files('test-varlink.c'),
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-watch-pid.c'),
+                'dependencies' : common_test_dependencies,
+                'base' : test_core_base,
+        },
+        {
+                'sources' : files('test-watchdog.c'),
+                'type' : 'unsafe',
+        },
 ]
 
 ############################################################
@@ -578,24 +548,27 @@ tests += [
 # define some tests here, because the link_with deps were not defined earlier
 
 tests += [
-        [files('../libsystemd/sd-bus/test-bus-error.c'),
-         [libshared_static,
-          libsystemd_static]],
-
-        [files('../libsystemd/sd-device/test-sd-device-thread.c'),
-         [libsystemd],
-         [threads]],
-
-        [files('../libudev/test-udev-device-thread.c'),
-         [libudev],
-         [threads]],
-]
-
-tests += [
-        [files('test-socket-bind.c'),
-         [libcore,
-         libshared],
-         [libdl],
-         core_includes,
-         'BPF_FRAMEWORK'],
+        {
+                'sources' : files('../libsystemd/sd-bus/test-bus-error.c'),
+                'link_with' : [
+                        libshared_static,
+                        libsystemd_static,
+                ],
+        },
+        {
+                'sources' : files('../libsystemd/sd-device/test-sd-device-thread.c'),
+                'link_with' : libsystemd,
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('../libudev/test-udev-device-thread.c'),
+                'link_with' : libudev,
+                'dependencies' : threads,
+        },
+        {
+                'sources' : files('test-socket-bind.c'),
+                'dependencies' : libdl,
+                'condition' : 'BPF_FRAMEWORK',
+                'base' : test_core_base,
+        },
 ]
index c215ce72c9bb6db497a46ddda61c71ae284e83bf..f847728f62f75830dfcbfe978ce66f6e2c0b7690 100644 (file)
@@ -54,8 +54,12 @@ endif
 ############################################################
 
 tests += [
-        [files('test-timesync.c'),
-         [libtimesyncd_core,
-          libshared],
-         [libm]],
+        {
+                'sources' : files('test-timesync.c'),
+                'link_with' : [
+                        libshared,
+                        libtimesyncd_core,
+                ],
+                'dependencies' : libm,
+        },
 ]
index 816faa93cff90f5fe4ad8890b58f48eebb29fdce..d0a1359501e2f51c5a438ed858141f0c4a3b99c7 100644 (file)
@@ -6,6 +6,10 @@ systemd_tmpfiles_sources = files(
 )
 
 tests += [
-        [files('test-offline-passwd.c',
-               'offline-passwd.c')],
+        {
+                'sources' : files(
+                        'test-offline-passwd.c',
+                        'offline-passwd.c',
+                ),
+        },
 ]
index f17b3c1cf30d53c255bcebef4465f7aefba75f1e..9d647dd60563a9dddd73c030a8e655701211f585 100644 (file)
@@ -180,25 +180,28 @@ fuzzers += [
                'fido_id/fido_id_desc.c')],
 ]
 
-tests += [
-        [files('test-udev-event.c'),
-         [libudevd_core,
-          libshared],
-         [threads,
-          libacl]],
+test_libudev_base = {
+        'link_with' : [libudevd_core, libshared],
+        'dependencies' : [threads, libacl],
+}
 
-        [files('test-udev-node.c'),
-         [libudevd_core,
-          libshared],
-         [threads,
-          libacl]],
-
-        [files('test-udev-builtin.c'),
-         [libudevd_core,
-          libshared],
-         [threads,
-          libacl]],
-
-        [files('fido_id/test-fido-id-desc.c',
-               'fido_id/fido_id_desc.c')],
+tests += [
+        {
+                'sources' : files(
+                        'fido_id/test-fido-id-desc.c',
+                        'fido_id/fido_id_desc.c',
+                ),
+        },
+        {
+                'sources' : files('test-udev-builtin.c'),
+                'base' : test_libudev_base,
+        },
+        {
+                'sources' : files('test-udev-event.c'),
+                'base' : test_libudev_base,
+        },
+        {
+                'sources' : files('test-udev-node.c'),
+                'base' : test_libudev_base,
+        },
 ]
index 5788fd4ae391ff689193d52265efa340553452bf..7f7d18bba6636f08c2f3f0839aebb6241db4e6db 100644 (file)
@@ -6,8 +6,12 @@ systemd_xdg_autostart_generator_sources = files(
 )
 
 tests += [
-        [files('test-xdg-autostart.c',
-               'xdg-autostart-service.c')],
+        {
+                'sources' : files(
+                        'test-xdg-autostart.c',
+                        'xdg-autostart-service.c',
+                ),
+        },
 ]
 
 fuzzers += [