1
0
mirror of https://github.com/systemd/systemd synced 2026-03-13 16:44:48 +01:00

Compare commits

...

9 Commits

Author SHA1 Message Date
Lennart Poettering
e6f1d7f4ec
Merge pull request #19316 from keszybz/mkosi-f34
Bump mkosi config for F34
2021-04-28 15:12:59 +02:00
Lennart Poettering
53515c6939
Merge pull request #19446 from poettering/logind-trigger-new
logind/dissect: use sd_device_trigger() more
2021-04-28 13:26:29 +02:00
Perry.Yuan
5ed0ea2928
hwdb: 60-keyboard:: Update Dell Privacy Local Mic Mute Hotkey (#19261)
This patch fix scancode 0x120001 mapping to key code F20 micmute
The previous scancode is not correct, it will cause the micmute
hotkey no function when testing the mic mute
2021-04-28 12:37:39 +02:00
Zbigniew Jędrzejewski-Szmek
686fd8f619 mkosi: do not pull in perl dependencies
It was added in e2c5e698c0, but nobody remembers why exactly.
2021-04-28 11:32:58 +02:00
Zbigniew Jędrzejewski-Szmek
ecd1bfdd3c hwdb-test: pass an explit path to systemd-hwdb
https://github.com/systemd/systemd/pull/19316 failed with:
[1065/1670] Linking target systemd-hwdb
--- command ---
14:28:29 /root/src/test/hwdb-test.sh
--- stdout ---
./systemd-hwdb does not exist, please build first

I'm not sure what is going on here… In principle meson says that tests may be
called from any directory, but in practice is was always the build directory.
So far we were relying on systemd-hwdb being present in '.', and this worked.
Either way, it's nicer to pass the exact path, so let's do that.
2021-04-28 11:32:58 +02:00
Zbigniew Jędrzejewski-Szmek
fe12f036fe mkosi,man: bump fedora version
F34 was just released and should be fine for systemd builds.

Cloud-1.2 is the latest version.
2021-04-28 11:32:48 +02:00
Uwe Kleine-König
cbcdcaaa0e Add support for conditions on the machines firmware
This allows to limit units to machines that run on a certain firmware
type. For device tree defined machines checking against the machine's
compatible is also possible.
2021-04-28 10:55:55 +02:00
Lennart Poettering
b64c4ece74 dissect-image: use sd_device_trigger() API
Let's use the new API here too.
2021-04-28 10:24:20 +02:00
Lennart Poettering
d8021ea1da logind: use new sd_device_trigger() API
This is a follow-up for 21012e20a4f0b939d449ad31d9bcbeafdfb8b931 and
related commits, i.e. one more occasion we can use the
sd_device_trigger() API.
2021-04-28 09:48:42 +02:00
20 changed files with 147 additions and 52 deletions

View File

@ -5,7 +5,7 @@
[Distribution] [Distribution]
Distribution=fedora Distribution=fedora
Release=33 Release=34
[Packages] [Packages]
BuildPackages= BuildPackages=
@ -52,8 +52,6 @@ BuildPackages=
p11-kit-devel p11-kit-devel
pam-devel pam-devel
pcre2-devel pcre2-devel
perl(IPC::SysV)
perl(Time::HiRes)
pkgconfig pkgconfig
python3-devel python3-devel
python3-lxml python3-lxml

View File

@ -68,6 +68,7 @@ Most generic unit settings are available for transient units.
✓ ConditionKernelCommandLine= ✓ ConditionKernelCommandLine=
✓ ConditionKernelVersion= ✓ ConditionKernelVersion=
✓ ConditionArchitecture= ✓ ConditionArchitecture=
✓ ConditionFirmware=
✓ ConditionVirtualization= ✓ ConditionVirtualization=
✓ ConditionSecurity= ✓ ConditionSecurity=
✓ ConditionCapability= ✓ ConditionCapability=

View File

@ -384,7 +384,7 @@ evdev:name:Dell WMI hotkeys:dmi:bvn*:bvr*:bd*:svnDell*:pnPrecision*:*
# Dell Latitude privacy microphone mute # Dell Latitude privacy microphone mute
evdev:name:Dell Privacy Driver:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:* evdev:name:Dell Privacy Driver:dmi:bvn*:bvr*:bd*:svnDell*:pnLatitude*:*
KEYBOARD_KEY_12001=f20 # Mic mute toggle, should be micmute KEYBOARD_KEY_120001=f20 # Mic mute toggle, should be micmute
########################################################### ###########################################################
# Everex # Everex

View File

@ -11,5 +11,5 @@
<!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@> <!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@>
<!ENTITY DEBUGTTY @DEBUGTTY@> <!ENTITY DEBUGTTY @DEBUGTTY@>
<!ENTITY RC_LOCAL_PATH @RC_LOCAL_PATH@> <!ENTITY RC_LOCAL_PATH @RC_LOCAL_PATH@>
<!ENTITY fedora_latest_version "33"> <!ENTITY fedora_latest_version "34">
<!ENTITY fedora_cloud_release "1.2"> <!ENTITY fedora_cloud_release "1.2">

View File

@ -222,6 +222,18 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry id='firmware'>
<term><varname>Firmware=</varname></term>
<listitem>
<para>Checks whether the system is running on a machine with the specified firmware. See
<varname>ConditionFirmware=</varname> in
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
If an empty string is assigned, then previously assigned value is cleared.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>

View File

@ -258,6 +258,17 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>Firmware=</varname></term>
<listitem>
<para>Checks whether the system is running on a machine with the specified firmware. See
<literal>ConditionFirmware=</literal> in
<citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details. When prefixed with an exclamation mark (<literal>!</literal>), the result is negated.
If an empty string is assigned, then previously assigned value is cleared.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
</refsect1> </refsect1>

View File

@ -1172,6 +1172,16 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term><varname>ConditionFirmware=</varname></term>
<listitem><para>Check whether the system's firmware is of a certain type. Possible values are:
<literal>uefi</literal> (for systems with EFI),
<literal>device-tree</literal> (for systems with a device tree) and
<literal>device-tree-compatible(xyz)</literal> (for systems with a device tree that is compatible to <literal>xyz</literal>).</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term><varname>ConditionVirtualization=</varname></term> <term><varname>ConditionVirtualization=</varname></term>

View File

@ -3168,7 +3168,7 @@ if conf.get('ENABLE_TMPFILES') == 1
endif endif
if conf.get('ENABLE_HWDB') == 1 if conf.get('ENABLE_HWDB') == 1
public_programs += executable( systemd_hwdb = executable(
'systemd-hwdb', 'systemd-hwdb',
'src/hwdb/hwdb.c', 'src/hwdb/hwdb.c',
include_directories : includes, include_directories : includes,
@ -3176,6 +3176,14 @@ if conf.get('ENABLE_HWDB') == 1
install_rpath : udev_rpath, install_rpath : udev_rpath,
install : true, install : true,
install_dir : rootbindir) install_dir : rootbindir)
public_programs += systemd_hwdb
if want_tests != 'false'
test('hwdb-test',
hwdb_test_sh,
args : [systemd_hwdb.full_path()],
timeout : 90)
endif
endif endif
if conf.get('ENABLE_QUOTACHECK') == 1 if conf.get('ENABLE_QUOTACHECK') == 1

View File

@ -297,6 +297,7 @@ Unit.ConditionFileIsExecutable, config_parse_unit_condition_path,
Unit.ConditionNeedsUpdate, config_parse_unit_condition_path, CONDITION_NEEDS_UPDATE, offsetof(Unit, conditions) Unit.ConditionNeedsUpdate, config_parse_unit_condition_path, CONDITION_NEEDS_UPDATE, offsetof(Unit, conditions)
Unit.ConditionFirstBoot, config_parse_unit_condition_string, CONDITION_FIRST_BOOT, offsetof(Unit, conditions) Unit.ConditionFirstBoot, config_parse_unit_condition_string, CONDITION_FIRST_BOOT, offsetof(Unit, conditions)
Unit.ConditionArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, offsetof(Unit, conditions) Unit.ConditionArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, offsetof(Unit, conditions)
Unit.ConditionFirmware, config_parse_unit_condition_string, CONDITION_FIRMWARE, offsetof(Unit, conditions)
Unit.ConditionVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, offsetof(Unit, conditions) Unit.ConditionVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, offsetof(Unit, conditions)
Unit.ConditionHost, config_parse_unit_condition_string, CONDITION_HOST, offsetof(Unit, conditions) Unit.ConditionHost, config_parse_unit_condition_string, CONDITION_HOST, offsetof(Unit, conditions)
Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, conditions) Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, offsetof(Unit, conditions)

View File

@ -1319,18 +1319,9 @@ static int trigger_device(Manager *m, sd_device *d) {
} }
FOREACH_DEVICE(e, d) { FOREACH_DEVICE(e, d) {
_cleanup_free_ char *t = NULL; r = sd_device_trigger(d, SD_DEVICE_CHANGE);
const char *p;
r = sd_device_get_syspath(d, &p);
if (r < 0) if (r < 0)
return r; log_device_debug_errno(d, r, "Failed to trigger device, ignoring: %m");
t = path_join(p, "uevent");
if (!t)
return -ENOMEM;
(void) write_string_file(t, "change", WRITE_STRING_FILE_DISABLE_BUFFER);
} }
return 0; return 0;

View File

@ -44,6 +44,7 @@ Match.Virtualization, config_parse_net_condition,
Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, conditions) Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, conditions)
Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(NetDev, conditions) Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(NetDev, conditions)
Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, conditions) Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, conditions)
Match.Firmware, config_parse_net_condition, CONDITION_FIRMWARE, offsetof(NetDev, conditions)
NetDev.Description, config_parse_string, 0, offsetof(NetDev, description) NetDev.Description, config_parse_string, 0, offsetof(NetDev, description)
NetDev.Name, config_parse_ifname, 0, offsetof(NetDev, ifname) NetDev.Name, config_parse_ifname, 0, offsetof(NetDev, ifname)
NetDev.Kind, config_parse_netdev_kind, 0, offsetof(NetDev, kind) NetDev.Kind, config_parse_netdev_kind, 0, offsetof(NetDev, kind)

View File

@ -56,6 +56,7 @@ Match.Virtualization, config_parse_net_condition,
Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, conditions) Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, conditions)
Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(Network, conditions) Match.KernelVersion, config_parse_net_condition, CONDITION_KERNEL_VERSION, offsetof(Network, conditions)
Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, conditions) Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, conditions)
Match.Firmware, config_parse_net_condition, CONDITION_FIRMWARE, offsetof(Network, conditions)
Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac) Link.MACAddress, config_parse_hwaddr, 0, offsetof(Network, mac)
Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(Network, mtu) Link.MTUBytes, config_parse_mtu, AF_UNSPEC, offsetof(Network, mtu)
Link.Group, config_parse_uint32, 0, offsetof(Network, group) Link.Group, config_parse_uint32, 0, offsetof(Network, group)

View File

@ -5,6 +5,7 @@
#include <fnmatch.h> #include <fnmatch.h>
#include <limits.h> #include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/utsname.h> #include <sys/utsname.h>
#include <time.h> #include <time.h>
@ -450,6 +451,81 @@ static int condition_test_architecture(Condition *c, char **env) {
return a == b; return a == b;
} }
#define DTCOMPAT_FILE "/sys/firmware/devicetree/base/compatible"
static int condition_test_firmware_devicetree_compatible(const char *dtcarg) {
int r;
_cleanup_free_ char *dtcompat = NULL;
_cleanup_strv_free_ char **dtcompatlist = NULL;
size_t size;
r = read_full_virtual_file(DTCOMPAT_FILE, &dtcompat, &size);
if (r < 0) {
/* if the path doesn't exist it is incompatible */
if (r != -ENOENT)
log_debug_errno(r, "Failed to open() '%s', assuming machine is incompatible: %m", DTCOMPAT_FILE);
return false;
}
/* Not sure this can happen, but play safe. */
if (size == 0) {
log_debug("%s has zero length, assuming machine is incompatible", DTCOMPAT_FILE);
return false;
}
/*
* /sys/firmware/devicetree/base/compatible consists of one or more
* strings, each ending in '\0'. So the last character in dtcompat must
* be a '\0'.
*/
if (dtcompat[size - 1] != '\0') {
log_debug("%s is in an unknown format, assuming machine is incompatible", DTCOMPAT_FILE);
return false;
}
dtcompatlist = strv_parse_nulstr(dtcompat, size);
if (!dtcompatlist)
return -ENOMEM;
return strv_contains(dtcompatlist, dtcarg);
}
static int condition_test_firmware(Condition *c, char **env) {
sd_char *dtc;
assert(c);
assert(c->parameter);
assert(c->type == CONDITION_FIRMWARE);
if (streq(c->parameter, "device-tree")) {
if (access("/sys/firmware/device-tree/", F_OK) < 0) {
if (errno != ENOENT)
log_debug_errno(errno, "Unexpected error when checking for /sys/firmware/device-tree/: %m");
return false;
} else
return true;
} else if ((dtc = startswith(c->parameter, "device-tree-compatible("))) {
_cleanup_free_ char *dtcarg = NULL;
char *end;
end = strchr(dtc, ')');
if (!end || *(end + 1) != '\0') {
log_debug("Malformed Firmware condition \"%s\"", c->parameter);
return false;
}
dtcarg = strndup(dtc, end - dtc);
if (!dtcarg)
return -ENOMEM;
return condition_test_firmware_devicetree_compatible(dtcarg);
} else if (streq(c->parameter, "uefi"))
return is_efi_boot();
else {
log_debug("Unsupported Firmware condition \"%s\"", c->parameter);
return false;
}
}
static int condition_test_host(Condition *c, char **env) { static int condition_test_host(Condition *c, char **env) {
_cleanup_free_ char *h = NULL; _cleanup_free_ char *h = NULL;
sd_id128_t x, y; sd_id128_t x, y;
@ -843,6 +919,7 @@ int condition_test(Condition *c, char **env) {
[CONDITION_HOST] = condition_test_host, [CONDITION_HOST] = condition_test_host,
[CONDITION_AC_POWER] = condition_test_ac_power, [CONDITION_AC_POWER] = condition_test_ac_power,
[CONDITION_ARCHITECTURE] = condition_test_architecture, [CONDITION_ARCHITECTURE] = condition_test_architecture,
[CONDITION_FIRMWARE] = condition_test_firmware,
[CONDITION_NEEDS_UPDATE] = condition_test_needs_update, [CONDITION_NEEDS_UPDATE] = condition_test_needs_update,
[CONDITION_FIRST_BOOT] = condition_test_first_boot, [CONDITION_FIRST_BOOT] = condition_test_first_boot,
[CONDITION_USER] = condition_test_user, [CONDITION_USER] = condition_test_user,
@ -949,6 +1026,7 @@ void condition_dump_list(Condition *first, FILE *f, const char *prefix, conditio
static const char* const condition_type_table[_CONDITION_TYPE_MAX] = { static const char* const condition_type_table[_CONDITION_TYPE_MAX] = {
[CONDITION_ARCHITECTURE] = "ConditionArchitecture", [CONDITION_ARCHITECTURE] = "ConditionArchitecture",
[CONDITION_FIRMWARE] = "ConditionFirmware",
[CONDITION_VIRTUALIZATION] = "ConditionVirtualization", [CONDITION_VIRTUALIZATION] = "ConditionVirtualization",
[CONDITION_HOST] = "ConditionHost", [CONDITION_HOST] = "ConditionHost",
[CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine", [CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine",
@ -981,6 +1059,7 @@ DEFINE_STRING_TABLE_LOOKUP(condition_type, ConditionType);
static const char* const assert_type_table[_CONDITION_TYPE_MAX] = { static const char* const assert_type_table[_CONDITION_TYPE_MAX] = {
[CONDITION_ARCHITECTURE] = "AssertArchitecture", [CONDITION_ARCHITECTURE] = "AssertArchitecture",
[CONDITION_FIRMWARE] = "AssertFirmware",
[CONDITION_VIRTUALIZATION] = "AssertVirtualization", [CONDITION_VIRTUALIZATION] = "AssertVirtualization",
[CONDITION_HOST] = "AssertHost", [CONDITION_HOST] = "AssertHost",
[CONDITION_KERNEL_COMMAND_LINE] = "AssertKernelCommandLine", [CONDITION_KERNEL_COMMAND_LINE] = "AssertKernelCommandLine",

View File

@ -9,6 +9,7 @@
typedef enum ConditionType { typedef enum ConditionType {
CONDITION_ARCHITECTURE, CONDITION_ARCHITECTURE,
CONDITION_FIRMWARE,
CONDITION_VIRTUALIZATION, CONDITION_VIRTUALIZATION,
CONDITION_HOST, CONDITION_HOST,
CONDITION_KERNEL_COMMAND_LINE, CONDITION_KERNEL_COMMAND_LINE,

View File

@ -432,7 +432,6 @@ static int device_wait_for_initialization_harder(
usec_t deadline, usec_t deadline,
sd_device **ret) { sd_device **ret) {
_cleanup_free_ char *uevent = NULL;
usec_t start, left, retrigger_timeout; usec_t start, left, retrigger_timeout;
int r; int r;
@ -444,7 +443,8 @@ static int device_wait_for_initialization_harder(
const char *sn = NULL; const char *sn = NULL;
(void) sd_device_get_sysname(device, &sn); (void) sd_device_get_sysname(device, &sn);
log_debug("Waiting for device '%s' to initialize for %s.", strna(sn), format_timespan(buf, sizeof(buf), left, 0)); log_device_debug(device,
"Waiting for device '%s' to initialize for %s.", strna(sn), format_timespan(buf, sizeof(buf), left, 0));
} }
if (left != USEC_INFINITY) if (left != USEC_INFINITY)
@ -475,33 +475,24 @@ static int device_wait_for_initialization_harder(
const char *sn = NULL; const char *sn = NULL;
(void) sd_device_get_sysname(device, &sn); (void) sd_device_get_sysname(device, &sn);
log_debug("Successfully waited for device '%s' to initialize for %s.", strna(sn), format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0)); log_device_debug(device,
"Successfully waited for device '%s' to initialize for %s.",
strna(sn),
format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0));
} }
if (r != -ETIMEDOUT || last_try) if (r != -ETIMEDOUT || last_try)
return r; return r;
if (!uevent) {
const char *syspath;
r = sd_device_get_syspath(device, &syspath);
if (r < 0)
return r;
uevent = path_join(syspath, "uevent");
if (!uevent)
return -ENOMEM;
}
if (DEBUG_LOGGING) { if (DEBUG_LOGGING) {
char buf[FORMAT_TIMESPAN_MAX]; char buf[FORMAT_TIMESPAN_MAX];
log_debug("Device didn't initialize within %s, assuming lost event. Retriggering device through %s.", log_device_debug(device,
format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0), "Device didn't initialize within %s, assuming lost event. Retriggering device.",
uevent); format_timespan(buf, sizeof(buf), usec_sub_unsigned(now(CLOCK_MONOTONIC), start), 0));
} }
r = write_string_file(uevent, "change", WRITE_STRING_FILE_DISABLE_BUFFER); r = sd_device_trigger(device, SD_DEVICE_CHANGE);
if (r < 0) if (r < 0)
return r; return r;
} }

View File

@ -22,6 +22,7 @@ Mode=
SourceMACAddress= SourceMACAddress=
[Match] [Match]
Architecture= Architecture=
Firmware=
Host= Host=
KernelVersion= KernelVersion=
Virtualization= Virtualization=

View File

@ -18,6 +18,7 @@ KernelVersion=
Type= Type=
Driver= Driver=
Architecture= Architecture=
Firmware=
Path= Path=
WLANInterfaceType= WLANInterfaceType=
SSID= SSID=

View File

@ -36,6 +36,7 @@ CollectMode=
ConditionACPower= ConditionACPower=
ConditionArchitecture= ConditionArchitecture=
ConditionCPUs= ConditionCPUs=
ConditionFirmware=
ConditionCapability= ConditionCapability=
ConditionControlGroupController= ConditionControlGroupController=
ConditionDirectoryNotEmpty= ConditionDirectoryNotEmpty=

View File

@ -11,10 +11,10 @@ set -e
export SYSTEMD_LOG_LEVEL=info export SYSTEMD_LOG_LEVEL=info
ROOTDIR=$(dirname $(dirname $(readlink -f $0))) ROOTDIR=$(dirname $(dirname $(readlink -f $0)))
SYSTEMD_HWDB=./systemd-hwdb SYSTEMD_HWDB="${1:?missing argument}"
if [ ! -x "$SYSTEMD_HWDB" ]; then if [ ! -x "$SYSTEMD_HWDB" ]; then
echo "$SYSTEMD_HWDB does not exist, please build first" echo "$SYSTEMD_HWDB is not executable" >&2
exit 1 exit 1
fi fi

View File

@ -57,10 +57,8 @@ if install_tests
endif endif
test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh') test_network_generator_conversion_sh = find_program('test-network-generator-conversion.sh')
############################################################
test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py') test_systemd_tmpfiles_py = find_program('test-systemd-tmpfiles.py')
hwdb_test_sh = find_program('hwdb-test.sh')
############################################################ ############################################################
@ -128,17 +126,6 @@ endif
############################################################ ############################################################
if conf.get('ENABLE_HWDB') == 1
hwdb_test_sh = find_program('hwdb-test.sh')
if want_tests != 'false'
test('hwdb-test',
hwdb_test_sh,
timeout : 90)
endif
endif
############################################################
if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family()) if want_tests != 'false' and dmi_arches.contains(host_machine.cpu_family())
udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh') udev_dmi_memory_id_test = find_program('udev-dmi-memory-id-test.sh')