mirror of
https://github.com/reactos/CMake.git
synced 2025-02-12 23:19:13 +00:00
![Matthew Woehlke](/assets/img/avatar_default.png)
According to the documentation, tests can be discovered for a target multiple times by using a different prefix and/or suffix to ensure name uniqueness. However, while this worked for gtest_add_tests, it did not work with gtest_discover_tests because the generated file that sets up the tests was named based only on the target name, and so subsequent discovery from the same target would clobber earlier discovery. Fix this by introducing a counter that records how many times discovery has been used on a target, and use this to generate unique names of the generated test list files.
26 lines
1.0 KiB
Plaintext
26 lines
1.0 KiB
Plaintext
Test project .*
|
|
Start 1: TEST:basic\.case_foo!1
|
|
1/8 Test #1: TEST:basic\.case_foo!1 \.+ +Passed +[0-9.]+ sec
|
|
Start 2: TEST:basic\.case_bar!1
|
|
2/8 Test #2: TEST:basic\.case_bar!1 \.+ +Passed +[0-9.]+ sec
|
|
Start 3: TEST:basic\.disabled_case!1
|
|
3/8 Test #3: TEST:basic\.disabled_case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
|
|
Start 4: TEST:disabled\.case!1
|
|
4/8 Test #4: TEST:disabled\.case!1 \.+\*+Not Run \(Disabled\) +[0-9.]+ sec
|
|
Start 5: TEST:typed/short\.case!1
|
|
5/8 Test #5: TEST:typed/short\.case!1 \.+ +Passed +[0-9.]+ sec
|
|
Start 6: TEST:typed/float\.case!1
|
|
6/8 Test #6: TEST:typed/float\.case!1 \.+ +Passed +[0-9.]+ sec
|
|
Start 7: TEST:value/test\.case/1!1
|
|
7/8 Test #7: TEST:value/test\.case/1!1 \.+ +Passed +[0-9.]+ sec
|
|
Start 8: TEST:value/test\.case/"foo"!1
|
|
8/8 Test #8: TEST:value/test\.case/"foo"!1 \.+ +Passed +[0-9.]+ sec
|
|
|
|
100% tests passed, 0 tests failed out of 6
|
|
|
|
Total Test time \(real\) = +[0-9.]+ sec
|
|
|
|
The following tests did not run:
|
|
.*3 - TEST:basic\.disabled_case!1 \(Disabled\)
|
|
.*4 - TEST:disabled\.case!1 \(Disabled\)
|