guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: derivations: Adjust tests for Stow environments.


From: Ludovic Courtès
Subject: 01/01: derivations: Adjust tests for Stow environments.
Date: Tue, 30 Jan 2018 16:32:19 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 9d6fae65f3c2197e7b95afebd0a13908bdb4aed9
Author: Ludovic Courtès <address@hidden>
Date:   Tue Jan 30 21:33:34 2018 +0100

    derivations: Adjust tests for Stow environments.
    
    Fixes <https://bugs.gnu.org/30250>.
    Reported by Jorge <address@hidden>.
    
    * tests/derivations.scm ("add-to-store, flat")
    ("add-to-store, recursive"): Call 'readlink*'.
---
 tests/derivations.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/derivations.scm b/tests/derivations.scm
index 36afd42..5d83529 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès 
<address@hidden>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès 
<address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -96,7 +96,10 @@
 (test-skip (if %store 0 12))
 
 (test-assert "add-to-store, flat"
-  (let* ((file (search-path %load-path "language/tree-il/spec.scm"))
+  ;; Use 'readlink*' in case spec.scm is a symlink, as is the case when Guile
+  ;; was installed with Stow.
+  (let* ((file (readlink*
+                (search-path %load-path "language/tree-il/spec.scm")))
          (drv  (add-to-store %store "flat-test" #f "sha256" file)))
     (and (eq? 'regular (stat:type (stat drv)))
          (valid-path? %store drv)
@@ -104,7 +107,9 @@
                  (call-with-input-file drv get-bytevector-all)))))
 
 (test-assert "add-to-store, recursive"
-  (let* ((dir (dirname (search-path %load-path "language/tree-il/spec.scm")))
+  (let* ((dir (dirname
+               (readlink* (search-path %load-path
+                                       "language/tree-il/spec.scm"))))
          (drv (add-to-store %store "dir-tree-test" #t "sha256" dir)))
     (and (eq? 'directory (stat:type (stat drv)))
          (valid-path? %store drv)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]