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

Issue 5 - Move HIE Tests and convert to Tasty #105

Merged
merged 28 commits into from
May 18, 2020

Conversation

jeffwindsor
Copy link
Collaborator

Tests are converted to Tasty format. The tests compile and run from console, but most fail / timeout.
I want to check in to see if this is going the right direction, and maybe get some help wiring up the CI / Runner / Config.

@jeffwindsor
Copy link
Collaborator Author

helps resolve #5

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

I'm a bit embarrased to say this, but we decided to stick with hspec, because it has better rerun options.

@Bodigrim
Copy link
Contributor

What's missing in tasty-rerun?

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

@Bodigrim possibly just my inability to look up documentation.

But I do know that if an hspec test fails, it lists a way to rerun just that test, with the appropriate command line invocation, as part of the test result. I find this invaluable.

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

And, full disclosure, I have a personal bias, as all my other OSS projects use hspec.

@Bodigrim
Copy link
Contributor

tasty-rerun provides --rerun and --rerun-all-on-success options, pretty much similar to hspec.

Full disclosure: I also have a personal bias, being a maintainer of tasty-rerun :) I do not mean to interfere with your project's decisions, but I'm genuinely interested what can be improved. If something is missing from tasty-rerun, I'll be happy to fix it.

@jeffwindsor
Copy link
Collaborator Author

closing to move to hspec

@fendor fendor reopened this May 10, 2020
@fendor
Copy link
Collaborator

fendor commented May 10, 2020

More discussion needed. As I look at this PR, I dont have anything to complain about on the first sight!

@jeffwindsor Please dont undo your work, yet.

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

@Bodigrim glad to have you take an interest. The main thing I care about is if a test fails, I get something like

  To rerun use: --match "/Plugin/composes code actions/provides 3.8 code actions/"

And then I can do

stack --stack-yaml=stack.yaml test haskell-language-server:func-test --test-arguments "--match \"/Plugin/composes code actions/provides 3.8 code actions/\""

To run just that test

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

One other thing that would be useful, is junit.xml output. as per https://github.com/haskell/haskell-ide-engine/blob/master/test/utils/TestUtils.hs#L306

@Bodigrim
Copy link
Contributor

One other thing that would be useful, is junit.xml output

http://hackage.haskell.org/package/tasty-ant-xml works well for me.

@alanz
Copy link
Collaborator

alanz commented May 10, 2020

To summarize the discussion on IRC, we will continue with tasty. For the avoidance of future doubt. Sorry to have caused so much trauma for all.

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far. Thank you for this huge contribution!
What I think is missing:

  • Marking most of the test-cases as broken
  • Add junit-xml runner

haskell-language-server.cabal Outdated Show resolved Hide resolved
haskell-language-server.cabal Outdated Show resolved Hide resolved
haskell-language-server.cabal Outdated Show resolved Hide resolved
test/utils/Test/HIE/Util.hs Outdated Show resolved Hide resolved
@jeffwindsor
Copy link
Collaborator Author

jeffwindsor commented May 17, 2020

@fendor:

As of this commit I have not been able to test the re-run or xml output successfully, but I am sure it is just a matter of getting the cli parameters to get through with the cradle

Also I am not able to the see the CI results so not sure why the ghc version failed.

@jeffwindsor jeffwindsor requested a review from fendor May 17, 2020 03:06
@fendor
Copy link
Collaborator

fendor commented May 17, 2020

Awesome, I will review it in the next days in depth!

Copy link
Collaborator

@fendor fendor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alanz alanz merged commit 34d4793 into haskell:master May 18, 2020
@Bodigrim
Copy link
Contributor

@Bodigrim glad to have you take an interest. The main thing I care about is if a test fails, I get something like

  To rerun use: --match "/Plugin/composes code actions/provides 3.8 code actions/"

Your wish is granted :)

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

Successfully merging this pull request may close these issues.

4 participants