summary refs log tree commit diff
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2023-06-21 13:37:27 +0000
committerLudovic Courtès <ludo@gnu.org>2023-06-25 23:46:04 +0200
commit7e60061da3bda6d7ee328f2a22230189c749178a (patch)
tree89a28635399142c0def2f615efacb3078d8bacf8
parent5cf9880dd499afa0abfc53915a8e13bf7e6b1253 (diff)
downloadguix-7e60061da3bda6d7ee328f2a22230189c749178a.tar.gz
gnu: aws-lc: Fix tests.
* gnu/packages/tls.scm (aws-lc)[native-inputs]: Add libfaketime.
[arguments]<#:phases>: Replace and wrap 'check with faketime due to
certificate expiration.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/tls.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 140932a809..d94b7c27f5 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -1219,7 +1219,20 @@ ciphers such as ChaCha20, Curve25519, NTRU, and Blake2b.")
     (arguments
      '(#:test-target "run_minimal_tests"
        #:configure-flags
-       '("-DBUILD_SHARED_LIBS=ON")))
+       '("-DBUILD_SHARED_LIBS=ON")
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? test-target parallel-tests? #:allow-other-keys)
+             (when tests?
+               ;; SSLTest.HostMatching fails due to an expired certificate.
+               ;; Fake the time to be that of the release.
+               (invoke "faketime" "2022-05-23"
+                       "make" test-target
+                       "-j" (if parallel-tests?
+                                (number->string (parallel-job-count))
+                                "1"))))))))
+    (native-inputs (list libfaketime))
     (synopsis "General purpose cryptographic library")
     (description "AWS libcrypto (aws-lc) contains portable C implementations
 of algorithms needed for TLS and common applications, and includes optimized