summaryrefslogtreecommitdiff
path: root/gnu/packages/freedesktop.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2020-02-28 19:07:46 +0100
committerMarius Bakke <mbakke@fastmail.com>2020-02-28 19:07:46 +0100
commitd614f0bba90c86c836131eea3ebb9cbd30f19abf (patch)
tree22e6250fc344f86e0e356e0dcad254b95373877a /gnu/packages/freedesktop.scm
parent7fe962788ac330fce18d7cc39f613bb1f961d6ea (diff)
parent20c87138a9ca1bbccef2ee91589f11ec70985555 (diff)
Merge branch 'master' into staging
Diffstat (limited to 'gnu/packages/freedesktop.scm')
-rw-r--r--gnu/packages/freedesktop.scm43
1 files changed, 41 insertions, 2 deletions
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index ad35fb30f6..5e6482c53e 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -8,7 +8,7 @@
;;; Copyright © 2016, 2017, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2017, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017, 2018, 2019 Rutger Helling <rhelling@mykolab.com>
;;; Copyright © 2017 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -306,7 +306,6 @@ the freedesktop.org XDG Base Directory specification.")
"-Dcgroup-controller=elogind"
"-Dman=true"
;; Disable some tests.
- "-Dtests=false"
"-Dslow-tests=false"))
#:phases
(modify-phases %standard-phases
@@ -324,6 +323,46 @@ the freedesktop.org XDG Base Directory specification.")
(("=/run/dbus/system_bus_socket")
"=/var/run/dbus/system_bus_socket"))
#t))
+ (add-after 'unpack 'adjust-tests
+ (lambda _
+ ;; This test tries to copy some bytes from /usr/lib/os-release,
+ ;; which does not exist in the build container. Choose something
+ ;; more likely to be available.
+ (substitute* "src/test/test-copy.c"
+ (("/usr/lib/os-release")
+ "/etc/passwd"))
+ ;; Use a shebang that works in the build container.
+ (substitute* "src/test/test-exec-util.c"
+ (("#!/bin/sh")
+ (string-append "#!" (which "sh"))))
+ ;; Do not look for files or directories that do not exist.
+ (substitute* "src/test/test-fs-util.c"
+ (("usr") "etc")
+ (("/etc/machine-id") "/etc/passwd"))
+ ;; FIXME: Why is sd_id128_get_machine_app_specific failing.
+ ;; Disable for now by hooking into the kernel support check.
+ (substitute* "src/test/test-id128.c"
+ (("if \\(r == -EOPNOTSUPP\\)")
+ "if (1)"))
+ ;; This test expects that /sys is available.
+ (substitute* "src/test/test-mountpoint-util.c"
+ (("assert_se\\(path_is_mount_point\\(\"/sys.*")
+ ""))
+ ;; /bin/sh does not exist in the build container.
+ (substitute* "src/test/test-path-util.c"
+ (("/bin/sh") (which "sh")))
+ ;; This test uses sd_device_new_from_syspath to allocate a
+ ;; loopback device, but that fails because /sys is unavailable.
+ (substitute* "src/libelogind/sd-device/test-sd-device-thread.c"
+ ((".*sd_device_new_from_syspath.*/sys/class/net/lo.*")
+ "return 77;"))
+ ;; Most of these tests require cgroups or an actual live
+ ;; logind system so that it can flicker the monitor, etc.
+ ;; Just skip it until a more narrow selection can be made.
+ (substitute* "src/libelogind/sd-login/test-login.c"
+ (("r = sd_pid_get_slice.*")
+ "return 77;"))
+ #t))
(add-after 'unpack 'change-pid-file-path
(lambda _
(substitute* "src/login/elogind.c"