GNU bug report logs -
#75595
[PATCH 0/4] 'guix container run' and isolated inferiors
Previous Next
Full log
View this message in rfc822 format
* tests/inferior.scm ("inferior-eval-with-store"): Use ‘random-text’ for
the store item’s body.
Change-Id: Ia39e276955e1836a0272713ff25c4490273c666f
---
tests/inferior.scm | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/inferior.scm b/tests/inferior.scm
index 963d405e33..11a27c0006 100644
--- a/tests/inferior.scm
+++ b/tests/inferior.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2018-2022 Ludovic Courtès <ludo <at> gnu.org>
+;;; Copyright © 2018-2022, 2025 Ludovic Courtès <ludo <at> gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +27,8 @@ (define-module (test-inferior)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages guile)
#:use-module (gnu packages sqlite)
+ #:autoload (gcrypt hash) (sha256)
+ #:autoload (rnrs bytevectors) (string->utf8)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-64)
@@ -220,14 +222,15 @@ (define (manifest-entry->list entry)
(close-inferior inferior)
result))
-(test-equal "inferior-eval-with-store"
- (add-text-to-store %store "foo" "Hello, world!")
+(test-assert "inferior-eval-with-store"
(let* ((inferior (open-inferior %top-builddir
- #:command "scripts/guix")))
- (inferior-eval-with-store inferior %store
- '(lambda (store)
- (add-text-to-store store "foo"
- "Hello, world!")))))
+ #:command "scripts/guix"))
+ (text (random-text)))
+ (string=? (inferior-eval-with-store inferior %store
+ `(lambda (store)
+ (add-text-to-store store "foo"
+ ,text)))
+ (store-path "text" (sha256 (string->utf8 text)) "foo"))))
(test-assert "inferior-eval-with-store, &store-protocol-error"
(let* ((inferior (open-inferior %top-builddir
--
2.47.1
This bug report was last modified 137 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.