diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-02-05 22:58:13 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-02-06 23:06:18 +0100 |
commit | d59124280851c5d62b6ecf5aa07f6b4f6520a0e5 (patch) | |
tree | 82bb4b00005a0816f5136660fda6a8c8d5b2121f /tests | |
parent | 25945666e3dfb7f81e984bb8a3c9ec1d20730558 (diff) | |
download | guix-d59124280851c5d62b6ecf5aa07f6b4f6520a0e5.tar guix-d59124280851c5d62b6ecf5aa07f6b4f6520a0e5.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/store.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/store.scm b/tests/store.scm index e28c0c5aaa..df66feaebb 100644 --- a/tests/store.scm +++ b/tests/store.scm @@ -917,6 +917,19 @@ (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. |