Skip to content

Send test fails to stderr instead of stdout #5726

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

Closed
Eiji7 opened this issue Feb 1, 2017 · 1 comment
Closed

Send test fails to stderr instead of stdout #5726

Eiji7 opened this issue Feb 1, 2017 · 1 comment

Comments

@Eiji7
Copy link
Contributor

Eiji7 commented Feb 1, 2017

Tests fails are errors, so output of them should be returned to stderr.
Example command:

make clean test > stdout.log 2> stderr.log

Environment

  • Elixir & Erlang versions (elixir --version):
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10]

any Elixir version (checked also master branch)

  • Operating system:
    Funtoo Linux (Gentoo based) Intel64-nehalem funtoo-stable standard from stage 1
    Note: I installed erlang package from official distribution repository and I don't have installed Elixir (I just compile from git).

Current behavior

  1. stderr.log:
  • deprecation warnings (good)
  • undefined warnings (good)
  • make error message (good)
  1. stdout.log:

Expected behavior

  1. stderr.log:
  1. stdout.log:
  • compilation messages
  • make messages (like: commands executed, entering directory, targets)
  • tests messages
@Eiji7 Eiji7 changed the title Send test fails to stderr instef of stdout Send test fails to stderr instead of stdout Feb 1, 2017
@josevalim
Copy link
Member

In previous attempts to implement this we would get garbled messages because the test progress and the test failures would be sent to two different processes (stdin and stdout) and then there is no guarantee on the ordering. In very drastic scenarios, we could have something saying "Finished in 0.123 seconds" and the test failure printed only after. One obvious solution would be serialize everything through a single process but the simplicity of the current approach works best. You can always resort to custom formatters if you want output to be logged on different devices or different formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants