diff mbox series

[bug#64207,1/2] gnu: aws-lc: Fix tests.

Message ID 20230621133742.8987-1-code@greghogan.com
State New
Headers show
Series Update aws-sdk-cpp. | expand

Commit Message

Greg Hogan June 21, 2023, 1:37 p.m. UTC
* gnu/packages/tls.scm (aws-lc)[native-inputs]: Add libfaketime.
[arguments]<#:phases>: Replace and wrap 'check with faketime due to
certificate expiration.
---
 gnu/packages/tls.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index d162094ed4..2d94eb5ea6 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -1220,7 +1220,20 @@  (define-public aws-lc
     (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