-
Notifications
You must be signed in to change notification settings - Fork 704
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
Run test suites with cabal run #1601
Comments
Seems a nice idea to me. @ttuegel, what do you think? |
We will also add |
Perhaps streaming then could be made default for |
I think |
@ttuegel supporting I'm kinda split about
I now change
Streaming the output would now be too much. I only want to see failing cases. This is why I designed the initial command line UI like I did (based on what we have at work). Aside: I don't think many people are using detailed. I don't even know which state it's in. Does it work? Did we end up blocked on test-framework or something else? |
Let's keep the default behavior for now, and have streaming be optional. Later, we may want to do something smarter, like stream by default when there's only one package in the environment. As for detailed: it works, but there are to implementations of the interface. I want to redesign the stub runner the get better logs, but that would entail no user-visible changes. |
I suppose it could default to streaming if there's only one package, or the package is implicit (by working directory)? Bit like Yet another option would be to make this configurable. I tried adding In any case I'd be happy if I could use either |
Actually, how is streaming supposed to work? Wouldn't that need do act like a pseudotty to get the test frameworks to not dumb down their output? If I configure the test framework not to do that then it instead breaks in e.g. a CI environment where you do want the plain-text output. I'd like a solution that "just works" here, which is what I originally was expecting from |
Good question re. color output. I haven't thought about it a lot. I think On Wed, Dec 4, 2013 at 10:35 PM, Dag Odenhall notifications@github.comwrote:
|
Well the real issue is that the test frameworks typically check if stdout is a TTY and try to handle this automatically, so they'll strip coloring before it even gets to cabal. |
@dag @tibbe It's actually much worse than that! If it detects a TTY, test-framework does its output normally, but if it detects that it's being redirected, it saves up all its output and prints it as it's exiting! QuickCheck does the same thing. So, if we don't properly emulate a terminal, streaming test output is going to be impossible. |
OK, it looks like the |
Regarding
I imagine others would also want:
This is probably the wrong place to discuss this, but it doesn't quite feel like a ticket in its own right either. On the other hand it's somewhat relevant to this ticket because if the above is implemented I wouldn't feel much need for using |
The interface is ready, but we lack conforming test providers and test runners. On the test provider side, we need test-framework or tasty (or even just QuickCheck and HUnit) to export values of the types in On the test runner side, we have |
That being said, I don't think writing a good test runner in cabal-install On Thu, Dec 5, 2013 at 4:37 PM, Thomas Tuegel notifications@github.comwrote:
|
I forgot to mention: should there be something like |
Eventually yes, for the same reason we have a detailed test interface, On Thu, Dec 5, 2013 at 5:51 PM, Dag Odenhall notifications@github.comwrote:
|
I would also like to run test-suites with |
|
I don't know if this could make sense for
detailed
, but forexitcode-stdio
I find myself trying to run them withcabal run
which fails withcabal: Couldn't find any executables.
.You can of course specify which test-suite to run with
cabal test
but:--test-option[s]
which is much clunkier than what you do withcabal run
.--show-details=always
(again, clunky) this just prints the log file at the end, which means you don't get to see it until the whole test has completed, and you get no colors or progress bars if your test framework does that.So I either have to do
cabal build test && ./dist/build/test/test
which is clunky, orcabal repl test
and:main
which means interpreted and can be really slow for things like quickcheck properties.It's the small things. :-)
The text was updated successfully, but these errors were encountered: