guix-commits
[Top][All Lists]
Advanced

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

02/02: gnu: supercollider: Enable all tests.


From: guix-commits
Subject: 02/02: gnu: supercollider: Enable all tests.
Date: Wed, 17 Jun 2020 13:51:00 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 2915a7604a8dd1ac81ff4c8557b46c9f6048228c
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jun 17 13:19:15 2020 -0400

    gnu: supercollider: Enable all tests.
    
    * gnu/packages/audio.scm (supercollider)[phases]{set-home, prepare-x}: New
    phases.
    {disable-broken-tests}: Delete phase.
    {patch-scclass-dir}: Adapt accordingly.
    [native-inputs]: Add xorg-server-for-tests.
---
 gnu/packages/audio.scm | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm
index 4a6798c..74ef711 100644
--- a/gnu/packages/audio.scm
+++ b/gnu/packages/audio.scm
@@ -2379,22 +2379,14 @@ link REQUIRED)"))
                                           ;emacs-scel
        #:phases
        (modify-phases %standard-phases
-         ;; Some tests are broken (see:
-         ;; https://github.com/supercollider/supercollider/issues/3555 and
-         ;; https://github.com/supercollider/supercollider/issues/1736
-         (add-after 'rm-bundled-libs 'disable-broken-tests
+         ;; HOME must be defined otherwise supercollider throws a "ERROR:
+         ;; Primitive '_FileMkDir' failed." error when generating the doc.
+         ;; The graphical tests also hang without it.
+         (add-after 'unpack 'set-home-directory
            (lambda _
-             (substitute* "testsuite/server/supernova/CMakeLists.txt"
-               (("server_test.cpp")
-                "")
-               (("perf_counter_test.cpp")
-                ""))
-             (substitute* "testsuite/CMakeLists.txt"
-               (("add_subdirectory\\(sclang\\)")
-                ""))
-             (delete-file "testsuite/sclang/CMakeLists.txt")
+             (setenv "HOME" (getcwd))
              #t))
-         (add-after 'disable-broken-tests 'patch-scclass-dir
+         (add-after 'unpack 'patch-scclass-dir
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
                     (scclass-dir
@@ -2406,6 +2398,11 @@ link REQUIRED)"))
                     "\\(DirName::Resource\\) / CLASS_LIB_DIR_NAME"))
                   (string-append "Path(\"" scclass-dir "\")")))
                #t)))
+         (add-before 'build 'prepare-x
+           (lambda _
+             (system "Xvfb &")
+             (setenv "DISPLAY" ":0")
+             #t))
          (add-before 'install 'install-ide
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -2418,7 +2415,8 @@ link REQUIRED)"))
     (native-inputs
      `(("ableton-link" ,ableton-link)
        ("pkg-config" ,pkg-config)
-       ("qttools" ,qttools)))
+       ("qttools" ,qttools)
+       ("xorg-server" ,xorg-server-for-tests)))
     (inputs
      `(("jack" ,jack-1)
        ("libsndfile" ,libsndfile)



reply via email to

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