]> git.ipfire.org Git - thirdparty/systemd.git/blob - hwdb.d/meson.build
tests: drop calls to unsetenv SYSTEMD_MEMPOOL
[thirdparty/systemd.git] / hwdb.d / meson.build
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2
3 # Those files right now are not supported by the grammar. Also,
4 # they are very long but quite repetitive and the parser is not very fast.
5 # So we don't "test" them.
6 hwdb_files_notest = files('''
7 20-dmi-id.hwdb
8 20-pci-vendor-model.hwdb
9 20-pci-classes.hwdb
10 20-usb-vendor-model.hwdb
11 20-usb-classes.hwdb
12 20-sdio-vendor-model.hwdb
13 20-sdio-classes.hwdb
14 20-bluetooth-vendor-product.hwdb
15 20-acpi-vendor.hwdb
16 20-OUI.hwdb
17 20-net-ifname.hwdb
18 20-vmbus-class.hwdb
19 '''.split())
20
21 hwdb_files_test = files('''
22 60-autosuspend.hwdb
23 60-autosuspend-fingerprint-reader.hwdb
24 60-evdev.hwdb
25 60-input-id.hwdb
26 60-keyboard.hwdb
27 60-sensor.hwdb
28 70-joystick.hwdb
29 70-mouse.hwdb
30 70-pointingstick.hwdb
31 70-touchpad.hwdb
32 '''.split())
33
34 if conf.get('ENABLE_HWDB') == 1
35 auto_suspend_rules = custom_target(
36 '60-autosuspend-chromiumos.hwdb',
37 output : '60-autosuspend-chromiumos.hwdb',
38 command : make_autosuspend_rules_py,
39 capture : true,
40 install : true,
41 install_dir: udevhwdbdir)
42
43 install_data(hwdb_files_notest,
44 hwdb_files_test,
45 install_dir : udevhwdbdir)
46
47 if install_sysconfdir
48 meson.add_install_script('sh', '-c',
49 mkdir_p.format(join_paths(sysconfdir, 'udev/hwdb.d')))
50
51 meson.add_install_script('sh', '-c',
52 'test -n "$DESTDIR" || @0@/systemd-hwdb update'
53 .format(rootbindir))
54 endif
55
56 if want_tests != 'false'
57 parse_hwdb_py = find_program('parse_hwdb.py')
58 test('parse-hwdb',
59 parse_hwdb_py,
60 args : [hwdb_files_test,
61 auto_suspend_rules],
62 timeout : 90)
63 endif
64 endif
65
66 ############################################################
67
68 run_target(
69 'update-hwdb',
70 command : [update_hwdb_sh, meson.current_source_dir()])
71
72 run_target(
73 'update-hwdb-autosuspend',
74 command : [update_hwdb_autosuspend_sh, project_source_root])