usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
394 stars 77 forks source link

Test report is missing failed test lists #1946

Closed DavyLandman closed 3 weeks ago

DavyLandman commented 1 month ago

image

At least on windows, I get no output about which tests failed.

DavyLandman commented 1 month ago

On windows, this is printed:

rascal>test bool x() = false;
bool (): function(|prompt:///|(0,22,<1,0>,<1,22>))
rascal>:test

☑ Testing $shell$                                                                                       🕒 0:00:00.060
bool: false
rascal>

on linux:

rascal>test bool x() = false;
bool (): function(|prompt:///|(0,22,<1,0>,<1,22>))
rascal>:test
failure: x @ |prompt:///|(0,22,<1,0>,<1,22>)
Test $shell$::x failed due to
        test returned false

Test report for $shell$
        0/1 tests succeeded
        1/1 tests failed
        0/1 tests threw exceptions
☑ Testing $shell$                                                                                       🕒 0:00:00.034
bool: false
rascal>
DavyLandman commented 1 month ago

@jurgenvinju is there a possibility the progress bar disables writing of output? I just traced the writes of the test runner, and they seem to write to an outputstream, but the terminal doesn't show anything. (something like disabling echo?)

If I send the output to monitor.warning, it does show up properly.

DavyLandman commented 1 month ago

I had a call with @jurgenvinju it's indeed the TerminalProgressBarMonitor class, that intercepts write call and is most likely swallowing the prints that don't have a newline at the end.

DavyLandman commented 1 month ago

image

This is the stack, it's written 1 byte at the time. and there we get problems.

If I comment out eraseBars() in write(int) we get output again.