vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.76k stars 2.16k forks source link

Results of tests in folder overlap #9501

Open duarteroso opened 3 years ago

duarteroso commented 3 years ago

V version: 0.2.2 OS: Linux Hardware Category: Crappy

Description

When running the tests on a folder, the results of all tests overlap making it difficult to see what happened. In the following log, notice how the results of test2.v starts being flushed on top of the results of test1.v

I ran v -stats test tests/

[❌] Result Gotten

checker summary: 0 V errors, 0 V warnings, 0 V notices
checker summary: 0 V errors, 0 V warnings, 0 V notices
generated C source code size: 16381 lines, 577586 bytes
generated C source code size: 17369 lines, 609102 bytes
compilation took: 304 ms
running tests in: /tests/test1.v
      OK    [1/2]    23.466 ms     4 asserts | tests.test_basic()
compilation took: 311 ms 
running tests in: /tests/test2.v
      OK    [2/2]    18.081 ms     8 asserts | tests.test_full()
     Summary for running V tests in "test1.v": 12 passed, 12 total. Runtime: 41 ms. 

      OK    [1/4]    20.280 ms    NO asserts | test.test_one()
      OK    [2/4]     8.617 ms    NO asserts | test.test_two()
      OK    [3/4]     3.220 ms    NO asserts | test.test_three()
      OK    [4/4]     3.672 ms    NO asserts | test.test_four()
     Summary for running V tests in "test2.v": 0 total. Runtime: 35 ms.

[✅] Result Expected

checker summary: 0 V errors, 0 V warnings, 0 V notices
checker summary: 0 V errors, 0 V warnings, 0 V notices
generated C source code size: 16381 lines, 577586 bytes
generated C source code size: 17369 lines, 609102 bytes
compilation took: 304 ms
running tests in: /tests/test1.v
      OK    [1/2]    23.466 ms     4 asserts | tests.test_basic()
      OK    [2/2]    18.081 ms     8 asserts | tests.test_full()
     Summary for running V tests in "test1.v": 12 passed, 12 total. Runtime: 41 ms. 
compilation took: 311 ms 
running tests in: /tests/test2.v
      OK    [1/4]    20.280 ms    NO asserts | test.test_one()
      OK    [2/4]     8.617 ms    NO asserts | test.test_two()
      OK    [3/4]     3.220 ms    NO asserts | test.test_three()
      OK    [4/4]     3.672 ms    NO asserts | test.test_four()
     Summary for running V tests in "test2.v": 0 total. Runtime: 35 ms.
duarteroso commented 3 years ago

It's actually pretty random.