mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
daemon: Emit a 'build-succeeded' event in check mode.
Until now, something like "guix build sed -v1 --check" would not get a 'build-succeeded' event, which in turn meant that the spinner would not be erased upon build completion. * nix/libstore/build.cc (DerivationGoal::registerOutputs): When 'buildMode' is bmCheck and 'settings.printBuildTrace' emit a "@ build-succeeded" trace upon success. * tests/store.scm ("build-succeeded trace in check mode"): New test.
This commit is contained in:
parent
25945666e3
commit
d591242808
2 changed files with 17 additions and 0 deletions
|
@ -2502,6 +2502,10 @@ void DerivationGoal::registerOutputs()
|
|||
throw Error(format("derivation `%1%' may not be deterministic: output `%2%' differs")
|
||||
% drvPath % path);
|
||||
}
|
||||
|
||||
if (settings.printBuildTrace)
|
||||
printMsg(lvlError, format("@ build-succeeded %1% -") % drvPath);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -917,6 +917,19 @@ (define ref-hash
|
|||
(build-mode check))
|
||||
#f))))))))
|
||||
|
||||
(test-assert "build-succeeded trace in check mode"
|
||||
(string-contains
|
||||
(call-with-output-string
|
||||
(lambda (port)
|
||||
(let ((d (build-expression->derivation
|
||||
%store "foo" '(mkdir (assoc-ref %outputs "out"))
|
||||
#:guile-for-build
|
||||
(package-derivation %store %bootstrap-guile))))
|
||||
(build-derivations %store (list d))
|
||||
(parameterize ((current-build-output-port port))
|
||||
(build-derivations %store (list d) (build-mode check))))))
|
||||
"@ build-succeeded"))
|
||||
|
||||
(test-assert "build multiple times"
|
||||
(with-store store
|
||||
;; Ask to build twice.
|
||||
|
|
Loading…
Reference in a new issue