aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2020-06-10 15:58:11 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2020-06-10 16:42:21 +0200
commitf44618fc79a730944cd3165a390d896777a8dad0 (patch)
treed91e33ca38f80574589f6f895ef0855c42be0812 /tests
parent78986d962352f3d5e092c441d5f6e0b1200de957 (diff)
downloadcuirass-f44618fc79a730944cd3165a390d896777a8dad0.tar
cuirass-f44618fc79a730944cd3165a390d896777a8dad0.tar.gz
Add support for build products downloading.
* src/sql/upgrade-7.sql: New file. * Makefile.am: Add it. * src/cuirass/base.scm (create-build-outputs): New procedure, (build-packages): call it, (process-spec): add the new spec argument and pass it to create-build-outputs. * src/cuirass/database.scm (db-add-build-product, db-get-build-product-path, db-get-build-products): New exported procedures. * src/cuirass/http.scm (respond-static-file): Move file sending to ... (respond-file): ... this new procedure, (url-handler): add a new "download/<id>" route, serving the requested file with the new respond-file procedure. Also gather build products and pass them to "build-details" for "build/<id>/details" route. * src/cuirass/templates.scm (build-details): Honor the new "products" argument to display all the build products associated to the given build. * src/schema.sql (BuildProducts): New table, (Specifications)[build_outputs]: new field. * tests/database.scm: Add empty build-outputs spec. * tests/http.scm: Ditto. * examples/guix-jobs.scm: Ditto. * examples/hello-git.scm: Ditto. * examples/hello-singleton.scm: Ditto. * examples/hello-subset.scm: Ditto. * examples/random.scm: Ditto. * doc/cuirass.texi (overview): Document it.
Diffstat (limited to 'tests')
-rw-r--r--tests/database.scm4
-rw-r--r--tests/http.scm5
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/database.scm b/tests/database.scm
index 6098465..98b5012 100644
--- a/tests/database.scm
+++ b/tests/database.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;;
;;; This file is part of Cuirass.
;;;
@@ -45,7 +46,8 @@
(#:branch . "master")
(#:tag . #f)
(#:commit . #f)
- (#:no-compile? . #f))))))
+ (#:no-compile? . #f))))
+ (#:build-outputs . ())))
(define (make-dummy-checkouts fakesha1 fakesha2)
`(((#:commit . ,fakesha1)
diff --git a/tests/http.scm b/tests/http.scm
index d20a3c3..d69c25c 100644
--- a/tests/http.scm
+++ b/tests/http.scm
@@ -1,7 +1,7 @@
;;; http.scm -- tests for (cuirass http) module
;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
;;; Copyright © 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of Cuirass.
@@ -170,7 +170,8 @@
(#:branch . "master")
(#:tag . #f)
(#:commit . #f)
- (#:no-compile? . #f))))))
+ (#:no-compile? . #f))))
+ (#:build-outputs . ())))
(checkouts1
'(((#:commit . "fakesha1")
(#:input . "savannah")