diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-01-24 23:40:07 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-01-24 23:41:24 +0100 |
commit | 8675d6309b0576cdca7d5b607a358fd37982bfe7 (patch) | |
tree | 29e55f3231937ee2906a0426a494767f1a3e5466 /tests | |
parent | 1d7f4f07d995e13093b8bf72c609c901f38b94c6 (diff) | |
download | cuirass-8675d6309b0576cdca7d5b607a358fd37982bfe7.tar cuirass-8675d6309b0576cdca7d5b607a358fd37982bfe7.tar.gz |
database: 'db-update-build-status!' takes a #:log-file parameter.
* src/cuirass/database.scm (sqlite-exec): Use (ice-9 format).
(db-update-build-status!): Add #:log-file parameter and honor it.
* tests/database.scm ("database")["db-update-build-status!"]: Test it.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/database.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/database.scm b/tests/database.scm index 28a7e46..217ddde 100644 --- a/tests/database.scm +++ b/tests/database.scm @@ -146,7 +146,8 @@ INSERT INTO Evaluations (specification, revision) VALUES (3, 3);") (test-equal "db-update-build-status!" (list (build-status scheduled) (build-status started) - (build-status succeeded)) + (build-status succeeded) + "/foo.drv.log") (with-temporary-database db (let* ((id (db-add-build db @@ -161,12 +162,14 @@ INSERT INTO Evaluations (specification, revision) VALUES (3, 3);") (let ((status0 (get-status))) (db-update-build-status! db "/foo.drv" (build-status started)) (let ((status1 (get-status))) - (db-update-build-status! db "/foo.drv" (build-status succeeded)) + (db-update-build-status! db "/foo.drv" (build-status succeeded) + #:log-file "/foo.drv.log") (let ((status2 (get-status)) (start (get-status #:starttime)) - (end (get-status #:stoptime))) + (end (get-status #:stoptime)) + (log (get-status #:log))) (and (> start 0) (>= end start) - (list status0 status1 status2)))))))) + (list status0 status1 status2 log)))))))) (test-assert "db-close" (db-close (%db))) |