BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

TimerTest.ListAllInfo only works once

Open dschwoerer opened this issue 4 years ago • 1 comments

./serial_tests --gtest_repeat=2 --gtest_filter=TimerTest.ListAllInfo fails:

Running main() from bout_test_main.cxx

Repeating all tests (iteration 1) . . .

Note: Google Test filter = TimerTest.ListAllInfo
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TimerTest
[ RUN      ] TimerTest.ListAllInfo
[       OK ] TimerTest.ListAllInfo (3 ms)
[----------] 1 test from TimerTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[  PASSED  ] 1 test.

Repeating all tests (iteration 2) . . .

Note: Google Test filter = TimerTest.ListAllInfo
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TimerTest
[ RUN      ] TimerTest.ListAllInfo
sys/test_timer.cxx:256: Failure
Value of: cout_capture.str()
Expected: has substring "Timer name |"
  Actual: "Timer report \n\nTimer name        | Total time (s) | Hits | Mean time/hit (s)\n----------------- | ----------------- | ----------------- | -----------------\none               | 0.00317948 | 1 | 0.00317948\ntwo               | 0.00211019 | 2 | 0.0010551\n18 characters long | 3.07e-07 | 1 | 3.07e-07\n\n"
[  FAILED  ] TimerTest.ListAllInfo (3 ms)
[----------] 1 test from TimerTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] TimerTest.ListAllInfo

 1 FAILED TEST
*** The MPI_Finalize() function was called before MPI_INIT was invoked.
*** This is disallowed by the MPI standard.
*** Your MPI job will now abort.
[raven02:139483] Local abort before MPI_INIT completed completed successfully, but am not able to aggregate error messages, and not able to guarantee that all other processes were killed!

dschwoerer avatar Aug 25 '21 18:08 dschwoerer

We probably need to use a fixture that makes sure to clean up the Timer singleton

ZedThree avatar Aug 26 '21 12:08 ZedThree