Visitar URL original
Is there `--show-details` analog for `new-test` command? · Issue #4766 · haskell/cabal · GitHub
Skip to content

Is there --show-details analog for new-test command? #4766

Closed

Description

@vagarenko

Is there --show-details analog for new-test command?

> cabal new-test --show-details=streaming
cabal: unrecognized 'new-test' option `--show-details=streaming'

Activity

  1. 23Skidoo commented on Sep 18, 2017

    @23Skidoo
    Member

    It's probably not implemented yet.

    /cc @ttuegel @fgaz

  2. fgaz commented on Sep 19, 2017

    @fgaz
    Member

    Yeah, we don't have support for test and bench specific flags in new-build yet. See #4643 too.
    It's probably just a matter of passing them to the right function, but I have yet to investigate.

  3. ttuegel commented on Sep 19, 2017

    @ttuegel
    Member

    It's probably not implemented yet.

    I think that we should not implement this. Instead, we should just make the --show-details=streaming behavior the only one supported by new-test.

    It was a huge mistake to try to support logging this way in Cabal itself. If you are doing logging during build, it is almost certainly because you are doing CI, but Cabal is not a CI tool! If you want test logging, there are other, better tools. Test frameworks tend to misbehave unless run with --show-details=streaming; we should never have tried to do anything else.

  4. quasicomputational commented on Jul 11, 2018

    @quasicomputational
    Contributor

    +1 to defaulting to streaming for new-test, whether or not it's the only behaviour. It's happened more than once now that I've misdiagnosed slow tests as a hang because of this.

  5. nomeata commented on Jul 24, 2018

    @nomeata
    Contributor

    Incidentally, this question has hit StackExchange today:
    https://stackoverflow.com/q/51488620/946226

  6. michalrus commented on Oct 24, 2018

    @michalrus

    A simple solution for the time being:

    cabal new-build integration
    
    $(find dist-newstyle -name integration -executable -type f) --color=always
    

    … assuming your test suite is named integration.

    /cc @harendra-kumar

  7. harendra-kumar commented on Oct 25, 2018

    @harendra-kumar

    @michalrus yes, manually running the test executable works, I do it sometimes, its just a bit inconvenient. However, it does not work in a generic CI script (e.g. I use https://github.com/harendra-kumar/packcheck) where the test suite names are not known. We can perhaps ask cabal to list the test suite names or parse the cabal file, but then we are just building a poor workaround for the functionality ourselves.

  8. fgaz commented on Oct 25, 2018

    @fgaz
    Member

    @michalrus if you want to run a single test you can also use cabal new-run integration -- --color=always

  9. added a commit that references this issue on Sep 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions