From 02d2b698a006c5d8b77045e66b56e9dfa4d78cd3 Mon Sep 17 00:00:00 2001 From: Joshua Munn Date: Sun, 7 Feb 2021 18:14:24 +0000 Subject: [PATCH 1/2] Add variable for accept-process-output, increase default timeout --- hy-shell.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hy-shell.el b/hy-shell.el index 22927f2..acc3a11 100644 --- a/hy-shell.el +++ b/hy-shell.el @@ -51,6 +51,13 @@ (defvar hy-shell--redirect-timeout 0.5 "Seconds (float) to allow redirection commands to complete before quitting.") +(defvar hy-shell--startup-timeout 3 + "Seconds (float) for `accept-process-output' to wait for REPL banner text. + +`hy-shell--redirect-check-prompt-regexp' may throw an error if +`accept-process-output' (called in `hy-shell--make-comint') times +out before consuming the REPL banner text.") + ;;;; Managed (defconst hy-shell--name "Hy" @@ -142,7 +149,7 @@ (inferior-hy-mode)) ;; Get shell's initial output/prompt - (accept-process-output (hy-shell--current-process) 0.5) + (accept-process-output (hy-shell--current-process) hy-shell--startup-timeout) (hy-shell--current-process)))) From 4eb60c94501592b3a030be4c06979bf58629a501 Mon Sep 17 00:00:00 2001 From: Joshua Munn Date: Sun, 7 Feb 2021 18:25:07 +0000 Subject: [PATCH 2/2] Add note about testing on linux --- README.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.org b/README.org index 7cce021..fe1da27 100644 --- a/README.org +++ b/README.org @@ -48,6 +48,8 @@ issues please provide as much details as you can. Execute tests after running ~cask install~ with the command: ~cask exec buttercup -L .~ +For linux users, after installing buttercup (available from melpa), execute the tests from the project root with ~emacs -batch -f package-initialize -L . -f buttercup-run-discover~. + Process-based tests currently rely on setting ~hy-test--pyvenv-name~ to the name of a virtual environment containing Hy, see ~hy-test.el~. If not set, then a warning will be given and process-based tests will be skipped.