From 8675d6309b0576cdca7d5b607a358fd37982bfe7 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 24 Jan 2018 23:40:07 +0100 Subject: 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. --- tests/database.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'tests') 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))) -- cgit v1.2.3