mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
tests: mpd: Remove race condition; use default MPD configuration.
* gnu/tests/audio.scm (%mpd-os): Use the default 'mpd-configuration'. (run-mpd-test)[test]("mpd listening"): New test. ("mpc connect"): Use 'system*' and 'test-equal'.
This commit is contained in:
parent
bb124f6e9c
commit
9909eddbc5
1 changed files with 8 additions and 5 deletions
|
@ -28,9 +28,7 @@ (define-module (gnu tests audio)
|
|||
|
||||
(define %mpd-os
|
||||
(simple-operating-system
|
||||
(service mpd-service-type
|
||||
(mpd-configuration
|
||||
(user "root")))))
|
||||
(service mpd-service-type)))
|
||||
|
||||
(define (run-mpd-test)
|
||||
"Run tests in %mpd-os, which has mpd running."
|
||||
|
@ -62,9 +60,14 @@ (define marionette
|
|||
(start-service 'mpd))
|
||||
marionette))
|
||||
|
||||
(test-assert "mpc connect"
|
||||
(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
|
||||
'(zero? (system #$(file-append mpd-mpc "/bin/mpc")))
|
||||
'(system* #$(file-append mpd-mpc "/bin/mpc"))
|
||||
marionette))
|
||||
|
||||
(test-end)
|
||||
|
|
Loading…
Reference in a new issue