Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add longer startup timeout #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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.
9 changes: 8 additions & 1 deletion hy-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))))

Expand Down