[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/19: gnu: mediastreamer2: Enable tests.
From: |
guix-commits |
Subject: |
07/19: gnu: mediastreamer2: Enable tests. |
Date: |
Mon, 29 Mar 2021 01:44:04 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 0c6f7d8396349dc5afb5c24b72f940f097737e78
Author: Raghav Gururajan <rg@raghavgururajan.name>
AuthorDate: Tue Mar 16 16:56:25 2021 -0400
gnu: mediastreamer2: Enable tests.
* gnu/packages/linphone.scm (mediastreamer2)
[arguments]: Remove tests? argument, enabling tests.
[phases]{pre-check}: New phase.
{check}: Replace with custom phase.
[native-inputs]: Add xorg-server-for-tests.
Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
gnu/packages/linphone.scm | 39 ++++++++++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 129b676..f06b2be 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -532,8 +532,7 @@ API. It also comprises a simple HTTP/HTTPS client
implementation.")
(outputs '("out" "doc" "tester"))
(build-system cmake-build-system)
(arguments
- `(#:tests? #f ; No test target
- #:configure-flags (list "-DENABLE_STATIC=NO")
+ `(#:configure-flags (list "-DENABLE_STATIC=NO")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-version
@@ -541,6 +540,14 @@ API. It also comprises a simple HTTP/HTTPS client
implementation.")
(substitute* "CMakeLists.txt"
(("VERSION [0-9]+\\.[0-9]+\\.[0-9]+")
(string-append "VERSION " ,version)))))
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Tests require a running X server.
+ (system "Xvfb :1 +extension GLX &")
+ (setenv "DISPLAY" ":1")
+ ;; Tests write to $HOME.
+ (setenv "HOME" (getenv "TEMP"))))
+ (delete 'check) ;move after install
(add-after 'install 'separate-outputs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
@@ -552,19 +559,37 @@ API. It also comprises a simple HTTP/HTTPS client
implementation.")
(list (string-append tester "/bin")
(string-append tester "/share")
(string-append doc "/share/doc")))
- ;; Copy the tester executable.
+ ;; Move the tester executable.
(rename-file (string-append out "/bin/" tester-name)
(string-append tester "/bin/" tester-name))
- ;; Copy the tester data files.
+ ;; Move the tester data files.
(rename-file (string-append out "/share/" tester-name)
(string-append tester "/share/" tester-name))
- ;; Copy the HTML documentation.
+ ;; Move the HTML documentation.
(rename-file (string-append out "/share/doc/" doc-name)
- (string-append doc "/share/doc/" doc-name))))))))
+ (string-append doc "/share/doc/" doc-name)))))
+ (add-after 'separate-outputs 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((tester (string-append (assoc-ref outputs "tester")
+ "/bin/mediastreamer2_tester")))
+ (for-each (lambda (suite-name)
+ (invoke tester "--suite" suite-name))
+ ;; Some tests fail, due to requiring access to the
+ ;; sound card or the network.
+ (list "Basic Audio"
+ ;; "Sound Card"
+ ;; "AdaptiveAlgorithm"
+ ;; "AudioStream"
+ ;; "VideoStream"
+ "H26x Tools"
+ "Framework"
+ ;; "Player"
+ "TextStream"))))))))
(native-inputs
`(("dot" ,graphviz)
("doxygen" ,doxygen)
- ("python" ,python-wrapper)))
+ ("python" ,python-wrapper)
+ ("xorg-server" ,xorg-server-for-tests)))
(inputs
`(("alsa" ,alsa-lib)
("bcg729" ,bcg729)
- branch master updated (414fc58 -> a999325), guix-commits, 2021/03/29
- 19/19: gnu: msamr: Update to 1.1.3-11., guix-commits, 2021/03/29
- 06/19: gnu: mediastreamer2: Update to 4.4.34., guix-commits, 2021/03/29
- 01/19: gnu: bctoolbox: Update to 4.4.34 and enable libdecaf, tests., guix-commits, 2021/03/29
- 11/19: gnu: belle-sip: Enable mDNS support., guix-commits, 2021/03/29
- 16/19: gnu: msopenh264: Update to 1.2.1-21., guix-commits, 2021/03/29
- 04/19: gnu: bzrtp: Update to 4.4.34 and enable tests., guix-commits, 2021/03/29
- 07/19: gnu: mediastreamer2: Enable tests.,
guix-commits <=
- 18/19: gnu: mswebrtc: Update to 1.1.1-23., guix-commits, 2021/03/29
- 13/19: gnu: liblinphone: Update to 4.4.34., guix-commits, 2021/03/29
- 03/19: gnu: belcard: Update to 4.4.34 and enable tests., guix-commits, 2021/03/29
- 12/19: gnu: Add lime., guix-commits, 2021/03/29
- 02/19: gnu: belr: Update to 4.4.34 and enable tests., guix-commits, 2021/03/29
- 14/19: gnu: liblinphone: Enable LDAP support., guix-commits, 2021/03/29
- 10/19: gnu: belle-sip: Enable tests., guix-commits, 2021/03/29
- 15/19: gnu: linphoneqt: Update to 4.2.5 and rename to linphone-desktop., guix-commits, 2021/03/29
- 08/19: gnu: mediastreamer2: Enable PCAP, port-audio and G729B support., guix-commits, 2021/03/29
- 09/19: gnu: belle-sip: Update to 4.4.34., guix-commits, 2021/03/29