diff mbox series

[bug#49468] Respect --without-tests in some dependencies of Mirage

Message ID 6e356b2d5d24c15876e3ad6cc853ce18386cdd5a.camel@telenet.be
State Accepted
Headers show
Series [bug#49468] Respect --without-tests in some dependencies of Mirage | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

M July 8, 2021, 5:43 p.m. UTC
X-Debbugs-CC: slg <0x2d@disroot.org>

Hi guix,

In the context of <https://issues.guix.gnu.org/49123>,
I'm making some dependencies of mirage respect --without-tests.
The modified packages build successfully with and without --without-tests.

The number of rebuilds is minimal:

$ ./pre-inst-env guix refresh -l libolm python-h2 python-h11 python-hpack python-hyperframe python-watchgod python-pymediainfo
Building the following 5 packages would ensure 12 dependent packages are rebuilt: nheko@0.7.2 python-hypercorn@0.10.2 orange@3.28.0 python-sanic@20.12.2 rapid-photo-downloader@0.9.18

Greetings,
Maxime

Comments

Mathieu Othacehe July 8, 2021, 7:23 p.m. UTC | #1
Hey,

> In the context of <https://issues.guix.gnu.org/49123>,
> I'm making some dependencies of mirage respect --without-tests.
> The modified packages build successfully with and without --without-tests.

Pushed, thanks!

Mathieu
diff mbox series

Patch

From 1c3c16618b3d4cefccc368717c741841c64730bc Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Thu, 8 Jul 2021 18:38:25 +0200
Subject: [PATCH 7/7] gnu: libolm: Respect "--without-tests".

* gnu/packages/libolm.scm
  (libolm)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/crypto.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 99455dc632..bd2c462b96 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -20,6 +20,7 @@ 
 ;;; Copyright © 2020 Hendur Saga <hendursaga@yahoo.com>
 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
 ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1314,9 +1315,10 @@  Trusted comments are signed, thus verified, before being displayed.")
      `(#:phases
        (modify-phases %standard-phases
          (replace 'check
-           (lambda _
-             (with-directory-excursion "tests"
-               (invoke "ctest" ".")))))))
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (with-directory-excursion "tests"
+                 (invoke "ctest" "."))))))))
     (synopsis "Implementation of the olm and megolm cryptographic ratchets")
     (description "The libolm library implements the Double Ratchet
 cryptographic ratchet.  It is written in C and C++11, and exposed as a C
-- 
2.32.0