-
Notifications
You must be signed in to change notification settings - Fork 724
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
Making jepsen.cli/run!
more repl friendly
#479
Comments
Yeah, I don't see why not. You might have to muck around a bit with the exception and signal handlers but this shouldn't be too hard.On Jul 16, 2020 10:09, Stevan Andjelkovic <[email protected]> wrote:
I'd like to be able to run my tests from the repl (to make debugging easier), i.e.:
(defn main
[& args]
(cli/run! (merge (cli/test-all-cmd {:tests-fn all-tests
:opt-spec cli-opts})
(cli/single-test-cmd {:test-fn smartlog-test
:opt-spec cli-opts})
(cli/serve-cmd))
args))
(main "test" "--workload" ...)
While this works, the use of System/exit in run! and single-test-cmd causes the repl to quit. Could we make variants of those functions that return pure data {:exit exit-code} instead and have wrapper functions with the current names that actually do the System/exit?
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Maybe worth mentioning that the usual entry point for repl/library calls to Jepsen is jepsen.core/run!--but if that doesn't meet your needs I understand!On Jul 16, 2020 10:33, [email protected] wrote:Yeah, I don't see why not. You might have to muck around a bit with the exception and signal handlers but this shouldn't be too hard.On Jul 16, 2020 10:09, Stevan Andjelkovic <[email protected]> wrote:
I'd like to be able to run my tests from the repl (to make debugging easier), i.e.:
(defn main
[& args]
(cli/run! (merge (cli/test-all-cmd {:tests-fn all-tests
:opt-spec cli-opts})
(cli/single-test-cmd {:test-fn smartlog-test
:opt-spec cli-opts})
(cli/serve-cmd))
args))
(main "test" "--workload" ...)
While this works, the use of System/exit in run! and single-test-cmd causes the repl to quit. Could we make variants of those functions that return pure data {:exit exit-code} instead and have wrapper functions with the current names that actually do the System/exit?
—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'd like to be able to run my tests from the repl (to make debugging easier), i.e.:
While this works, the use of
System/exit
inrun!
andsingle-test-cmd
causes the repl to quit. Could we make variants of those functions that return pure data{:exit exit-code}
instead and have wrapper functions with the current names that actually do theSystem/exit
?The text was updated successfully, but these errors were encountered: