[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/07: tests: Check the mtime and permissions of substituted items.
From: |
guix-commits |
Subject: |
03/07: tests: Check the mtime and permissions of substituted items. |
Date: |
Sat, 19 Dec 2020 17:28:32 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 77a1efed9e12ce0e2c470d7b0601ae70c72b010b
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Dec 14 14:33:06 2020 +0100
tests: Check the mtime and permissions of substituted items.
* tests/store.scm ("substitute")
("substitute + build-things with output path")
("substitute + build-things with specific output"): Call 'canonical-file?'.
* tests/substitute.scm ("substitute, authorized key"): Check the mtime
and permissions of "substitute-retrieved".
---
tests/store.scm | 3 +++
tests/substitute.scm | 6 ++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/store.scm b/tests/store.scm
index 7f1ec51..4dc125b 100644
--- a/tests/store.scm
+++ b/tests/store.scm
@@ -715,6 +715,7 @@
#:substitute-urls (%test-substitute-urls))
(and (has-substitutes? s o)
(build-derivations s (list d))
+ (canonical-file? o)
(equal? c (call-with-input-file o get-string-all)))))))
(test-assert "substitute + build-things with output path"
@@ -735,6 +736,7 @@
(and (has-substitutes? s o)
(build-things s (list o)) ;give the output path
(valid-path? s o)
+ (canonical-file? o)
(equal? c (call-with-input-file o get-string-all)))))))
(test-assert "substitute + build-things with specific output"
@@ -755,6 +757,7 @@
(build-things s `((,(derivation-file-name d) . "out")))
(valid-path? s o)
+ (canonical-file? o)
(equal? c (call-with-input-file o get-string-all)))))))
(test-assert "substitute, corrupt output hash"
diff --git a/tests/substitute.scm b/tests/substitute.scm
index 5b42632..542aaf6 100644
--- a/tests/substitute.scm
+++ b/tests/substitute.scm
@@ -378,7 +378,7 @@ System: mips64el-linux\n")))
(guix-substitute "--substitute")))))
(test-equal "substitute, authorized key"
- "Substitutable data."
+ '("Substitutable data." 1 #o444)
(with-narinfo (string-append %narinfo "Signature: "
(signature-field %narinfo))
(dynamic-wind
@@ -387,7 +387,9 @@ System: mips64el-linux\n")))
(request-substitution (string-append (%store-prefix)
"/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo")
"substitute-retrieved")
- (call-with-input-file "substitute-retrieved" get-string-all))
+ (list (call-with-input-file "substitute-retrieved" get-string-all)
+ (stat:mtime (lstat "substitute-retrieved"))
+ (stat:perms (lstat "substitute-retrieved"))))
(lambda ()
(false-if-exception (delete-file "substitute-retrieved"))))))
- branch master updated (f6f6e1e -> 4f621a2), guix-commits, 2020/12/19
- 01/07: tests: Check the build trace for hash mismatches on substitutes., guix-commits, 2020/12/19
- 03/07: tests: Check the mtime and permissions of substituted items.,
guix-commits <=
- 02/07: daemon: Let 'guix substitute' perform hash checks., guix-commits, 2020/12/19
- 05/07: tests: Make sure substituted items are deduplicated., guix-commits, 2020/12/19
- 06/07: daemon: Delegate deduplication to 'guix substitute'., guix-commits, 2020/12/19
- 07/07: maint: Require Guile >= 2.2.6., guix-commits, 2020/12/19
- 04/07: daemon: Do not reset timestamps and permissions on substituted items., guix-commits, 2020/12/19