tests: Fix thinko in `derivation' test.
* tests/derivations.scm ("derivation with local file as input"): Return a Boolean instead of a bytevector. Don't attempt to compare the content of the result with that of the input.
This commit is contained in:
parent
238e43b9fa
commit
bbb76f6f71
|
@ -134,7 +134,7 @@
|
||||||
(test-assert "derivation with local file as input"
|
(test-assert "derivation with local file as input"
|
||||||
(let* ((builder (add-text-to-store
|
(let* ((builder (add-text-to-store
|
||||||
%store "my-builder.sh"
|
%store "my-builder.sh"
|
||||||
"(while read line ; do echo $line ; done) < $in > $out"
|
"(while read line ; do echo \"$line\" ; done) < $in > $out"
|
||||||
'()))
|
'()))
|
||||||
(input (search-path %load-path "ice-9/boot-9.scm"))
|
(input (search-path %load-path "ice-9/boot-9.scm"))
|
||||||
(drv-path (derivation %store "derivation-with-input-file"
|
(drv-path (derivation %store "derivation-with-input-file"
|
||||||
|
@ -150,9 +150,9 @@
|
||||||
`((,builder)
|
`((,builder)
|
||||||
(,input))))) ; ← local file name
|
(,input))))) ; ← local file name
|
||||||
(and (build-derivations %store (list drv-path))
|
(and (build-derivations %store (list drv-path))
|
||||||
(let ((p (derivation-path->output-path drv-path)))
|
;; Note: we can't compare the files because the above trick alters
|
||||||
(and (call-with-input-file p get-bytevector-all)
|
;; the contents.
|
||||||
(call-with-input-file input get-bytevector-all))))))
|
(valid-path? %store (derivation-path->output-path drv-path)))))
|
||||||
|
|
||||||
(test-assert "fixed-output derivation"
|
(test-assert "fixed-output derivation"
|
||||||
(let* ((builder (add-text-to-store %store "my-fixed-builder.sh"
|
(let* ((builder (add-text-to-store %store "my-fixed-builder.sh"
|
||||||
|
|
Loading…
Reference in New Issue