aboutsummaryrefslogtreecommitdiff
path: root/tests/packages.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-09-26 21:50:05 +0200
committerLudovic Courtès <ludo@gnu.org>2013-09-27 00:46:17 +0200
commit03761a446536dc690010522ab522a1541766abd7 (patch)
treefd5b04a4ed2b0857cfabc9dd08e1d0fc9a00cff0 /tests/packages.scm
parent59c5c4dee1f95e26f018ba4f88666f7cdf824ff6 (diff)
downloadguix-03761a446536dc690010522ab522a1541766abd7.tar
guix-03761a446536dc690010522ab522a1541766abd7.tar.gz
build-system/trivial: Take the 'source' field into account.
* guix/build-system/trivial.scm (trivial-build): When SOURCE is true, add it to INPUTS. (trivial-cross-build): Likewise. * tests/packages.scm ("trivial with source"): New test.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r--tests/packages.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm
index 706739fb70..e0cf4ee001 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -167,6 +167,21 @@
(equal? (call-with-input-file p get-bytevector-all)
(call-with-input-file i get-bytevector-all))))))
+(test-assert "trivial with source"
+ (let* ((i (search-path %load-path "ice-9/boot-9.scm"))
+ (p (package (inherit (dummy-package "trivial-with-source"))
+ (build-system trivial-build-system)
+ (source i)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:builder (copy-file (assoc-ref %build-inputs "source")
+ %output)))))
+ (d (package-derivation %store p)))
+ (and (build-derivations %store (list d))
+ (let ((p (derivation->output-path d)))
+ (equal? (call-with-input-file p get-bytevector-all)
+ (call-with-input-file i get-bytevector-all))))))
+
(test-assert "trivial with system-dependent input"
(let* ((p (package (inherit (dummy-package "trivial-system-dependent-input"))
(build-system trivial-build-system)