aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
;;; Copyright © 2022 Bruno Victal <mirai@makinata.eu>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu tests audio)
  #:use-module (gnu tests)
  #:use-module (gnu system)
  #:use-module (gnu system vm)
  #:use-module (gnu services)
  #:use-module (gnu services audio)
  #:use-module (gnu services networking)
  #:use-module (gnu packages mpd)
  #:use-module (guix gexp)
  #:export (%test-mpd
            %test-mympd))

(define %mpd-os
  (simple-operating-system
   (service mpd-service-type)))

(define (run-mpd-test)
  "Run tests in %mpd-os, which has mpd running."
  (define os
    (marionette-operating-system
     %mpd-os
     #:imported-modules '((gnu services herd))))

  (define vm
    (virtual-machine os))

  (define test
    (with-imported-modules '((gnu build marionette))
      #~(begin
          (use-modules (srfi srfi-64)
                       (gnu build marionette))
          (define marionette
            (make-marionette (list #$vm)))

          (test-runner-current (system-test-runner #$output))
          (test-begin "mpd")

          (test-assert "service is running"
            (marionette-eval
             '(begin
                (use-modules (gnu services herd))
                (start-service 'mpd))
             marionette))

          (test-assert "mpd listening"
            ;; Wait until mpd is actually listening before spawning 'mpc'.
            (wait-for-tcp-port 6600 marionette))

          (test-equal "mpc connect"
            0
            (marionette-eval
             '(system* #$(file-append mpd-mpc "/bin/mpc"))
             marionette))

          (test-end))))
  (gexp->derivation "mpd-test" test))

(define %test-mpd
  (system-test
   (name "mpd")
   (description "Test that the mpd can run and be connected to.")
   (value (run-mpd-test))))

(define (run-mympd-test)
  (define os (marionette-operating-system
              (simple-operating-system (service dhcp-client-service-type)
                                       (service mympd-service-type))
              #:imported-modules '((gnu services herd))))

  (define vm
    (virtual-machine
     (operating-system os)
     (port-forwardings '((8080 . 80)))))

  (define test
    (with-imported-modules '((gnu build marionette))
      #~(begin
          (use-modules (srfi srfi-64)
                       (srfi srfi-8)
                       (web client)
                       (web response)
                       (gnu build marionette))

          (define marionette
            (make-marionette (list #$vm)))

          (test-runner-current (system-test-runner #$output))
          (test-begin "mympd")
          (test-assert "service is running"
            (marionette-eval '(begin
                                (use-modules (gnu services herd))

                                (start-service 'mympd))
                             marionette))

          (test-assert "HTTP port ready"
            (wait-for-tcp-port 80 marionette))

          (test-equal "http-head"
            200
            (receive (x _) (http-head "http://localhost:8080") (response-code x)))

          (test-end))))
  (gexp->derivation "mympd-test" test))

(define %test-mympd
  (system-test
   (name "mympd")
   (description "Connect to a running myMPD service.")
   (value (run-mympd-test))))
an>Artyom V. Poptsov 2024-05-13gnu: isc-dhcp: Add debianutils as an input....dhclient provides a hook mechanism for users. In order to run these hooks, dhclient-script uses run-parts to run all the executable files found in requested directory. run-parts is part of debianutils packages. * gnu/packages/admin.scm (isc-dhcp)[inputs]: Add "debianutils" to provide access to run-parts. Signed-off-by: Christopher Baines <mail@cbaines.net> Change-Id: I2057881da57a6065d65d1de95e51ed1c8b19e15f Alexey Abramov 2024-05-01gnu: jc: Update to 1.25.2....* gnu/packages/admin.scm (jc): Update to 1.25.2. Change-Id: I076bf285a6fd23ef65f6c094b355c5891c8b76e7 Oleg Pykhalov 2024-04-12gnu: go-github-com-hashicorp-go-multierror: Adjust inputs....* gnu/packages/golang-xyz.scm (go-github-com-hashicorp-go-multierror): [propagated-inputs]: Swap from native-inputs to propagated-inputs. * gnu/packages/admin.scm (fiano): [inputs]: Remove go-github-com-hashicorp-errwrap. Change-Id: Ie04c05d76b5d0e3ac94e2d956a282a8b9b13f6c6 Sharlatan Hellseher 2024-04-05gnu: atop: Update source hash....The new ‘atop-2.9.0.tar.gz’ adds a single file, ‘mkdate’, which, when available, generates a ‘versdate.h’ file containing the current date. * gnu/packages/admin.scm (atop): Update source hash and add snippet. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Change-Id: I2de2068d052d0b37aff1a6d18f5639baac6ccdfa Greg Hogan 2024-04-04gnu: fiano: Update to 1.2.0....The version style has been changed from v7.0.2 starting v1.0.3. This change may cause guix refresh to detect incorrect latest version, see <https://github.com/linuxboot/fiano/tags>. This changes consolidate building all commands directly from the fiano package. * gnu/packages/admin.scm (fiano): Make variable public, update to 1.2.0. [source]: Remove snippet, there is no longer 'vendor' directory in a new release. [arguments] <#:phases>: Add custom 'build, 'check and 'install phases to cover complex package structure and produce all provided commands. [inputs]: Add go-github-com-dustin-go-humanize, go-github-com-hashicorp-errwrap, go-github-com-hashicorp-go-multierror, go-github-com-jessevdk-go-flags, go-github-com-pierrec-lz4, and go-github-com-spf13-pflag. [description]: Highlight which commands are included in the package. * gnu/packages/admin.scm (fiano-utk, fiano-fmap): Delete variables. Change-Id: I4b7573e20953ba52c9736e7f64c6b6347221fc72 Sharlatan Hellseher 2024-04-04gnu: fiano: Refresh package style....* gnu/packages/admin.scm (fiano): Refresh package style. [source]: Remove trailing #t from the snippet. [arguments]: Use list style. [inputs]: Remove labels and use list style. [home-page]: Place before synopsis. Change-Id: I896c59d4be14c7ed16bc1978e0d9996bd7b93c17 Sharlatan Hellseher 2024-04-02gnu: greetd: Fix cross-compilation....* gnu/packages/admin.scm (greetd): Fix cross-compilation. [native-inputs]: Move linux-pam from here ... [inputs]: ... to here. [arguments]<#:phases>: Set release directory based on target. Change-Id: I822f8f215677bc951b21e46dddf44954a43df58f Signed-off-by: Efraim Flashner <efraim@flashner.co.il> dan 2024-03-31gnu: shepherd: Update to 0.10.4....* gnu/packages/admin.scm (shepherd-0.10): Update to 0.10.4. Change-Id: I09b8ac3544c59e47207bf7f640db13e4001a6322 Ludovic Courtès 2024-03-17gnu: wlgreet: Update to 0.4.1-1.7e79d60....This is a follow-up to 0e9c2d2eba5e573e43382611474784c8bf5a4309 (sway 1.9 update), which breaks wlgreet 0.4.1. Reported in <https://issues.guix.gnu.org/69667>. * gnu/packages/admin.scm (wlgreet): Update to 0.4.1-1.7e79d60. Change-Id: I81613baac01d366d6fc507203fca2cc95977df46 Reported-by: chris <chris@bumblehead.com> Hilton Chain 2024-03-06gnu: go-github.com-ulikunitz-xz: Adjust name....* gnu/packages/golang-compression.scm (go-github.com-ulikunitz-xz): Rename variable to go-github-com-ulikunitz-xz to follow golang naming style. * gnu/packages/admin.scm (fiano) [inputs]: Remove go-github.com-ulikunitz-xz. Add go-github-com-ulikunitz-xz. * gnu/packages/bioinformatics.scm (go-github-com-biogo-hts-cram) [propagated-inputs]: Remove go-github.com-ulikunitz-xz. Add go-github-com-ulikunitz-xz. Change-Id: Id2f2556666c4f9a08e0203f5ca7eb8352c492051 Sharlatan Hellseher 2024-02-28Merge branch 'rust-team'...Change-Id: Iee31c5de29c357c822f60df4fa8ce758779eb349 Efraim Flashner 2024-02-20gnu: rust-winapi: Move to (gnu packages crates-windows)....* gnu/packages/crates-io.scm (rust-winapi-0.3, rust-winapi-0.2, rust-winapi-build-0.1, rust-winapi-i686-pc-windows-gnu-0.4, rust-winapi-util-0.1, rust-winapi-wsapoll-0.1, rust-winapi-x86-64-pc-windows-gnu-0.4): Move from here ... * gnu/packages/crates-windows.scm: ... to here. Change-Id: Ida3a2a0cdae7f823c11c3b4a6d0dd36a158ec021 Efraim Flashner 2024-02-20gnu: Add rdfind....* gnu/packages/admin.scm (rdfind): New variable. Change-Id: Ie25bb6b8f5f9a3942eec8d9346da99d73e3bf1dd Signed-off-by: Ludovic Courtès <ludo@gnu.org> Tomás Ortín 2024-02-18gnu: Add restartd....* gnu/packages/admin.scm (restartd): New variable. * gnu/packages/patches/restartd-update-robust.patch: Add file. * gnu/local.mk: Register gnu/packages/patches/restartd-update-robust.patch. Change-Id: I38b9b70e97b64f006a86d7618a75f1ec3ed8b034 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Nicolas Graves 2024-02-13gnu: go-github.com-ulikunitz-xz: Move to golang-compression....* gnu/packages/golang.scm (go-github.com-ulikunitz-xz): Move from here ... * gnu/packages/golang-compression.scm: ... to here. * gnu/packages/admin.scm: Add (gnu packages golang-compression) module. * gnu/packages/bioinformatics.scm: As above. Change-Id: I1901e67ac4336efd356085332572b3f09de90f7a Sharlatan Hellseher 2024-02-13gnu: go-golang-org-x-text: Move to golang-build....* gnu/packages/golang.scm (go-golang-org-x-text): Move from here ... * gnu/packages/golang-build.scm: ... to here. * gnu/packages/admin.scm: Add (gnu packages golang-build) module. * gnu/packages/bioinformatics.scm: As above. * gnu/packages/mail.scm: As above. Change-Id: Ifd15b35b460ae30c5c1d677551e95842b322b246 Sharlatan Hellseher 2024-02-05gnu: Add pam-uaccess....* gnu/packages/admin.scm (pam-uaccess): New variable. Change-Id: I71b16e8548359fe59b2d09bb91b050bf9be33a78 Hilton Chain 2024-01-11gnu: btop: Update to 1.3.0....* gnu/packages/admin.scm (btop): Update to 1.3.0. Change-Id: Ie273ddde16d11b880493993070eda681a9f27e80 宋文武