edwadli/note-hashtag

Test results should appear as they are run

Closed this issue · 2 comments

It seems like the tester waits for all the tests to finish running before printing out all the results in one huge chunk. However, the code appears to print each test as it happens. (especially the Log module -- it flushes the stderr after every message.) What is going on??

Here's an example. Because all the clang/nhc output is printed first, it's hard to tell which error belongs to which test:

$ ./tester.native ../test
<stdin>:8:1: warning: expression result unused [-Wunused-value]
LIT_UNIT;
^~~~~~~~
1 warning generated.
error: Conditional cast_sast not implemented
<stdin>:8:1: warning: expression result unused [-Wunused-value]
LIT_UNIT;
^~~~~~~~
1 warning generated.
<stdin>:8:1: warning: expression result unused [-Wunused-value]
LIT_UNIT;
^~~~~~~~
1 warning generated.
error: Conditional cast_sast not implemented
error: Both expressions in the conditional must have the same type
error: Conditional must have a bool expression
error: Conditional must have a bool expression
debug: ✅  if_innovations.nh
debug: ❎  if_multiline.nh
debug: ✅  if_nested.nh
debug: ✅  if_simple.nh
debug: ❎  lit_bool.nh
debug: ❎  ops_bool.nh
debug: ❎  ops_compare.nh
debug: ❎  ops_equality.nh
debug: ✅  print_hello.nh
debug: ✅  print_nums.nh
info: Passed 5 of 10 tests

Ideally they should be printed

[test 1 output]
✅ test 1
[test 2 output]
✅ test 2

Now that we have more tests, this is more urgent b/c the tester takes so long to print anything that it looks frozen