summary refs log tree commit diff
path: root/tests/derivations.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-17 23:00:55 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-17 23:02:13 +0200
commit6a446d56801bfb197b1561bbe660675caa31c96c (patch)
tree3e0b0a21ac33b9323204516dbc40daa146d2f896 /tests/derivations.scm
parent803704418c4738ed63b3dd6aa893e3dc6da7d4db (diff)
downloadguix-6a446d56801bfb197b1561bbe660675caa31c96c.tar.gz
derivations: Keep the .drv file name in <derivation> objects.
* guix/derivations.scm (<derivation>): Add 'file-name' field.
  (%read-derivation): Use (port-filename DRV-PORT) as the file name for
  the result.
  (derivation): Set the 'file-name' field in the result.
* tests/derivations.scm ("build derivation with 1 source"): Assert that
  'derivation-file-name' returns the right thing.
Diffstat (limited to 'tests/derivations.scm')
-rw-r--r--tests/derivations.scm1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/derivations.scm b/tests/derivations.scm
index 9092e3acd6..e69dd0db31 100644
--- a/tests/derivations.scm
+++ b/tests/derivations.scm
@@ -134,6 +134,7 @@
          (let ((path (derivation-output-path
                       (assoc-ref (derivation-outputs drv) "out"))))
            (and (valid-path? %store path)
+                (string=? (derivation-file-name drv) drv-path)
                 (string=? (call-with-input-file path read-line)
                           "hello, world"))))))