Skip to content

Run test suites with cabal run #1601

Closed
Closed
@dag

Description

@dag

I don't know if this could make sense for detailed, but for exitcode-stdio I find myself trying to run them with cabal run which fails with cabal: Couldn't find any executables..

You can of course specify which test-suite to run with cabal test but:

  1. To pass in options to the executable you have to use --test-option[s] which is much clunkier than what you do with cabal run.
  2. By default you don't get to see the output unless the test failed, or you manually view the log file.
  3. Even with --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, or cabal repl test and :main which means interpreted and can be really slow for things like quickcheck properties.

It's the small things. :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions