-
- Downloads
GoogleTest: Clear script content buffer on flush and flush less often
There's no need to check if flushing is needed after every command is added to the variable holding the script content. It is enough to only check once per test name. This simplifies the flushing logic, removing the need for a separate flush_script() command. Previously, we were not clearing the flushed script contents in all cases, but this is now rigorously enforced at the one location where flushing is performed. Also simplify the flushing of the list of test names, since that too doesn't need a separate command. It is simpler and safer to handle that directly inline where the one call to flush_tests_buffer() was previously being made. Fixes: #26431
Showing
- Modules/GoogleTestAddTests.cmake 28 additions, 35 deletionsModules/GoogleTestAddTests.cmake
- Tests/RunCMake/GoogleTest/GoogleTest-discovery-flush-script-check-list.cmake 0 additions, 5 deletions...leTest/GoogleTest-discovery-flush-script-check-list.cmake
- Tests/RunCMake/GoogleTest/GoogleTest-discovery-flush-script-check-list.cmake.in 34 additions, 0 deletions...est/GoogleTest-discovery-flush-script-check-list.cmake.in
- Tests/RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake 7 additions, 1 deletion.../RunCMake/GoogleTest/GoogleTestDiscoveryFlushScript.cmake
- Tests/RunCMake/GoogleTest/flush_script_test.cpp 5 additions, 4 deletionsTests/RunCMake/GoogleTest/flush_script_test.cpp
Please register or sign in to comment