[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/08: marionette: Make it easier to debug REPL read failures.
From: |
guix-commits |
Subject: |
01/08: marionette: Make it easier to debug REPL read failures. |
Date: |
Fri, 16 Sep 2022 06:39:31 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit 0f46d4f1477b0446abd089f842ac7409963cc4f1
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Sep 16 00:49:48 2022 +0200
marionette: Make it easier to debug REPL read failures.
Log the remaining contnet written to the REPL, so that there's more to go on
than:
socket:5:14: Unknown # object: "#<"
* gnu/build/marionette.scm (marionette-eval): Catch exceptions from read and
log the remainder of the content from the REPL.
---
gnu/build/marionette.scm | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnu/build/marionette.scm b/gnu/build/marionette.scm
index 06b699bd7b..fd59a4c72f 100644
--- a/gnu/build/marionette.scm
+++ b/gnu/build/marionette.scm
@@ -178,7 +178,18 @@ QEMU monitor and to the guest's backdoor REPL."
(($ <marionette> command pid monitor (= force repl))
(write exp repl)
(newline repl)
- (read repl))))
+ (with-exception-handler
+ (lambda (exn)
+ (simple-format
+ (current-error-port)
+ "error reading marionette response: ~A
+ remaining response: ~A\n"
+ exn
+ (get-line repl))
+ (raise-exception exn))
+ (lambda ()
+ (read repl))
+ #:unwind? #t))))
(define* (wait-for-file file marionette
#:key (timeout 10) (read 'read))
- branch master updated (d0376f6718 -> eb9a39c1b7), guix-commits, 2022/09/16
- 01/08: marionette: Make it easier to debug REPL read failures.,
guix-commits <=
- 05/08: gnu: Add python-syllables., guix-commits, 2022/09/16
- 07/08: gnu: virt-manager: Use gtksourceview@4., guix-commits, 2022/09/16
- 08/08: gnu: celluloid: Fix build., guix-commits, 2022/09/16
- 03/08: gnu: Add mazo., guix-commits, 2022/09/16
- 06/08: gnu: Add shirah., guix-commits, 2022/09/16
- 02/08: marionette: Avoid read error when wait-for-file file is empty., guix-commits, 2022/09/16
- 04/08: gnu: Add python-ebooklib., guix-commits, 2022/09/16