Skip to content

Conversation

stolen
Copy link

@stolen stolen commented Oct 9, 2025

The story:

  • I got used to ct:pal as a convenient way of showing what's going on.
  • at some point I noticed I cannot see my logs when running tests via rebar3 ct
  • options -vvv and --verbosity 99 allowed to see ct:print, but not ct:pal
  • I even employed dbg, and it showed ct:pal is not even called
  • found the cth_readable_failonly stuff (parse_transform and hook)

So, I think current behaviour is harmful:

  • cth_readable_failonly is unavoidable in current main, making it hard to debug tests
  • there is no mention in docs about this behavior
  • even making test fail (ct:fail(test) in the end) just for debugging screws things up -- ct:print and ct:pal outputs are reordered

This PR disables cth_readable_failonly hook when verbose option is given by user.
With this change rebar3 ct behaves more consistent to me:

  • by default, I see no output from ct:print or ct:pal (by design, I suppose)
  • with -v option I see both (as I expect)

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.

1 participant