guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: elogind: Enable tests again.


From: guix-commits
Subject: branch master updated: gnu: elogind: Enable tests again.
Date: Fri, 28 Feb 2020 13:07:39 -0500

This is an automated email from the git hooks/post-receive script.

mbakke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 20c8713  gnu: elogind: Enable tests again.
20c8713 is described below

commit 20c87138a9ca1bbccef2ee91589f11ec70985555
Author: Marius Bakke <address@hidden>
AuthorDate: Fri Feb 28 18:54:49 2020 +0100

    gnu: elogind: Enable tests again.
    
    * gnu/packages/freedesktop.scm (elogind)[arguments]: Remove "-Dtests" from
     #:configure-flags.  Add phase 'adjust-tests'.
---
 gnu/packages/freedesktop.scm | 43 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index 9d10f51..9095696 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -8,7 +8,7 @@
 ;;; Copyright © 2016, 2017, 2019 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 Kei Kebreau <address@hidden>
 ;;; Copyright © 2017, 2018 Mark H Weaver <address@hidden>
-;;; Copyright © 2017, 2018, 2019 Marius Bakke <address@hidden>
+;;; Copyright © 2017, 2018, 2019, 2020 Marius Bakke <address@hidden>
 ;;; Copyright © 2017, 2018, 2019 Rutger Helling <address@hidden>
 ;;; Copyright © 2017 Brendan Tildesley <address@hidden>
 ;;; Copyright © 2018, 2020 Tobias Geerinckx-Rice <address@hidden>
@@ -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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]