test: always install our own udev rule/hwdb files for tests
We can't rely on the system having these files installed, at least not in the
latest version that we'd like.
Copy them over from the source directory into the /run/ and /etc/ directories
for each test and update udev and the hwdb. This ensures the tags we set in
the hwdb file are always set, regardless of the system configuration.
Note that the /run/udev/* files need to have a different filename to the ones
we ship to avoid getting overridden by local configuration.
systemd does not have support for /run/udev/hwdb.d [1]. So our hwdb.d file
is in /etc/udev/hwdb.d instead and marked them with a REMOVEME and a comment
that if that file is left after the tests, it should be removed by the user.
[1] https://github.com/systemd/systemd/issues/127
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>