[bug#36605,3/6] gnu: kpackage: Enable test-suite.
diff mbox series

Message ID 20190711202644.32014-29-h.goebel@crazy-compilers.com
State New
Headers show
Series
  • Untitled series #1399
Related show

Commit Message

Hartmut Goebel July 11, 2019, 8:26 p.m. UTC
* gnu/package/kde-frameworks.scm(kpackage)[arguments]
  <#:tests?>: Remove. <#:phases>: Add phase 'patch-tests.
---
 gnu/packages/kde-frameworks.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 62cf49c57..07e30d4cf 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -1834,8 +1834,7 @@  covers feedback and persistent events.")
        ("ki18n" ,ki18n)
        ("qtbase" ,qtbase)))
     (arguments
-     `(#:tests? #f ; FIXME: 3/9 tests fail.
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'patch
            (lambda _
@@ -1847,6 +1846,17 @@  covers feedback and persistent events.")
                (("^\\s*(QDirIterator it\\(.*, QDirIterator::Subdirectories)(\\);)" _ a b)
                 (string-append a " | QDirIterator::FollowSymlinks" b)))
              #t))
+         (add-after 'unpack 'patch-tests
+           (lambda _
+             ;; /bin/ls doesn't exist in the build-container use /etc/passwd
+             (substitute* "autotests/packagestructuretest.cpp"
+               (("(addDirectoryDefinition\\(\")bin(\".*\")bin(\".*\")bin\""
+                 _ a b c)
+                (string-append a "etc" b "etc" c "etc\""))
+               (("filePath\\(\"bin\", QStringLiteral\\(\"ls\"))")
+                "filePath(\"etc\", QStringLiteral(\"passwd\"))")
+               (("\"/bin/ls\"") "\"/etc/passwd\""))
+             #t))
          (add-before 'check 'check-setup
            (lambda _
              (setenv "HOME" (getcwd))