mirror of
git://git.savannah.gnu.org/guix/guix-cuirass.git
synced 2024-12-29 11:40:16 +01:00
Fix build products creation.
This commit is contained in:
parent
b24d55e368
commit
5c9003b41d
2 changed files with 15 additions and 3 deletions
|
@ -596,7 +596,7 @@ by BUILD-OUTPUTS."
|
|||
(define* (find-product build build-output)
|
||||
(let* ((outputs (assq-ref build #:outputs))
|
||||
(output (build-output-output build-output))
|
||||
(path (build-output-path build-output-path))
|
||||
(path (build-output-path build-output))
|
||||
(root (and=> (assoc-ref outputs output)
|
||||
(cut assq-ref <> #:path))))
|
||||
(and root
|
||||
|
@ -615,7 +615,7 @@ by BUILD-OUTPUTS."
|
|||
(log-message "Adding build product ~a" product)
|
||||
(db-add-build-product
|
||||
`((#:build . ,(assq-ref build #:id))
|
||||
(#:type . ,(build-output-type build-output-type))
|
||||
(#:type . ,(build-output-type build-output))
|
||||
(#:file-size . ,(file-size product))
|
||||
;; TODO: Implement it.
|
||||
(#:checksum . "")
|
||||
|
|
|
@ -20,7 +20,8 @@
|
|||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with Cuirass. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(use-modules (cuirass database)
|
||||
(use-modules (cuirass base)
|
||||
(cuirass database)
|
||||
(cuirass notification)
|
||||
(cuirass parameters)
|
||||
(cuirass remote)
|
||||
|
@ -585,6 +586,17 @@ timestamp, checkouttime, evaltime) VALUES ('guix', 0, 0, 0, 0);")
|
|||
(and (email? notif)
|
||||
(equal? build notif-build))))))
|
||||
|
||||
(test-assert "set-build-successful!"
|
||||
(let* ((name "/foo5.drv")
|
||||
(build
|
||||
(make-dummy-build name #:outputs `(("out" . ,(getcwd)))))
|
||||
(drv (assq-ref build #:derivation)))
|
||||
(db-add-build build)
|
||||
(set-build-successful! drv)
|
||||
(match (assq-ref (db-get-build name) #:buildproducts)
|
||||
((product)
|
||||
(equal? (assq-ref product #:path) (getcwd))))))
|
||||
|
||||
(test-assert "db-close"
|
||||
(begin
|
||||
(db-close (%db))
|
||||
|
|
Loading…
Reference in a new issue