Skip to content

Add parachute support #1

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

Open
TatriX opened this issue Jul 29, 2021 · 19 comments
Open

Add parachute support #1

TatriX opened this issue Jul 29, 2021 · 19 comments

Comments

@TatriX
Copy link

TatriX commented Jul 29, 2021

Hi!
Please consider adding parachute support.
Thanks!

@tdrhq
Copy link
Owner

tdrhq commented Jul 29, 2021

Sure, let me take a look at it today, I might reach out if I have parachute specific questions since I haven't used it before

@tdrhq
Copy link
Owner

tdrhq commented Jul 30, 2021

@TatriX Done! Try it out and let me know how it goes. I've updated the README with Parachute specific information. The only feature that doesn't work would be jumping to test definition. That would need a patch to Parachute, and even then would only work on Lispworks.

@tdrhq tdrhq closed this as completed Jul 30, 2021
@tdrhq
Copy link
Owner

tdrhq commented Jul 30, 2021

Things to look out for: In translating the results model from parachute to fiveam, I might've made some assumptions about the hierarchy of tests. Watch out for slite showing all green but parachute saying a test is failing. In this case, let me know what the hierarchy of the tests look like.

@TatriX
Copy link
Author

TatriX commented Aug 5, 2021

When I'm trying to load slite.el I'm getting an error:

add-hook: Symbol’s function definition is void: case

from this code I think:

(add-hook (case (slite--slime-impl)
            (:sly
             'sly-compilation-finished-hook)
            (:slime
             'slime-compilation-finished-hook))
          'slite--compilation-finished)

@TatriX
Copy link
Author

TatriX commented Aug 5, 2021

I think this is due cl lib being deprecated since Emacs 27 and probably it is remove in Emacs 28.
Most likely you want to (require 'cl-lib) and use (cl-case ...) as well as add cl- prefix to other functions as needed.

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

@TatriX Fixed: 7ed0362

@TatriX
Copy link
Author

TatriX commented Aug 5, 2021

Nice!
Now I do

(asdf:load-system :slite/parachute)
;; C-c v
(parachute:test :foo)

and getting:

Waiting for test results...
[sly] `sly-eval-async' errored: (void-function every)

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

Oops, git pull and try one more time: 9a3bb24

@TatriX
Copy link
Author

TatriX commented Aug 5, 2021

define-test name can be a symbol or a string:
(define-test "A more descriptive name, perhaps")

It seems this insn't handled right now:

The value
  "registered user should be able create an invite"
is not of type
  SYMBOL
   [Condition of type TYPE-ERROR]

Restarts:
 0: [*ABORT] Return to SLY's top level.
 1: [ABORT] abort thread (#<THREAD "slynk-worker" RUNNING {10058211C3}>)

Backtrace:
 0: ((:METHOD SLITE::GET-TEST-CASE-DETAILS (T)) #<TEST SERVER-TESTS::registered user should be able create an invite>) [fast-method]
 1: ((:METHOD SLITE::PROCESS-RESULTS (T)) #<PLAIN 14, FAILED results>) [fast-method]
 2: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SLITE::PROCESS-RESULTS (EVAL (READ-FROM-STRING "(parachute:test 'server-tests)"))) #<NULL-LEXENV>)
 3: (EVAL (SLITE::PROCESS-RESULTS (EVAL (READ-FROM-STRING "(parachute:test 'server-tests)"))))
 --more--

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

@TatriX ah, let me think through this one

@tdrhq tdrhq reopened this Aug 5, 2021
@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

(keeping the issue opened for now)

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

@TatriX Okay done, try this one more time: 766704b

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

^ the above change will make the test results load, but rerunning in debugger appears to have broken with that change, will fix that in a second

@tdrhq
Copy link
Owner

tdrhq commented Aug 5, 2021

Re-run in debugger fixed too df92f13

@TatriX
Copy link
Author

TatriX commented Aug 6, 2021

Now I'm getting:

[sly] `sly-eval-async' errored: (no-catch --cl-block-nil-- Failed: "(TRUE (SIGNIN (CURRENT-USER)))")

@tdrhq
Copy link
Owner

tdrhq commented Aug 6, 2021

@TatriX at which point do you get this error, just when running the tests? Or was that when rerunning in the debugger?

@tdrhq
Copy link
Owner

tdrhq commented Aug 6, 2021

Also, what was the CL expression you passed to M-x slite-run?

@TatriX
Copy link
Author

TatriX commented Aug 6, 2021

I guess it will be easier to debug on my side. I used C-c V with (parachute:test :my-package)

@tdrhq
Copy link
Owner

tdrhq commented Aug 6, 2021

@TatriX yeah, your debugging would be helpful in this situation :) In particular, here's what I'm looking for, if you run (parachute:test :my-package) in a repl, does it signal an error or does it just show you the failures? Is there some global parachute default that you've set that might cause failures to become conditions? (for instance, fiveam has fiveam:on-failure set to :signal or something like that, couldn't find anything obvious for parachute except for the specific report class)

The second issue is, even if that condition did get signalled, it should've just opened up a SLY debugger. Do you have any configuration that might prevent SLY from opening a debugger? For instance, if I run M-x slite-run (parachute:test 'foobar :report 'parachute:interactive) with a failing test, it still opens a debugger for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants