Skip to content
Snippets Groups Projects
Unverified Commit 5c9003b4 authored by Mathieu Othacehe's avatar Mathieu Othacehe
Browse files

Fix build products creation.

parent b24d55e3
No related branches found
No related tags found
No related merge requests found
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment