summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GoogleTest/flush_script_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* GoogleTest: Parse discovered test list from JSON output if supportedOttmar Zittlau2025-07-071-2/+41
| | | | | | | | | | | | | | | | | | | The --gtest_output=json option is supported from gtest 1.8.1 onwards. Earlier versions output a warning about it being an unrecognized option, and builds that #define GTEST_HAS_FILE_SYSTEM 0 output an error about it being unsupported, but in both cases still continue outputting the same plain text output as before and return an exit code of 0. We now add that option and check for whether the JSON file is generated, falling back to parsing the plain text output as before if it isn't or if the environment variable NO_GTEST_JSON_OUTPUT is set. The fake executor binaries are sensitive to parameter order. This commit adds --gtest_output:json arguments to a number of tests added for the new JSON parser. The argument order has been adjusted for the invocations of those binaries. Co-Authored-By: Craig Scott <craig.scott@crascit.com> Co-Authored-By: Dennis Lambe Jr. <malsyned@malsyned.net>
* Revise C++ coding style using clang-format with "east const"Kitware Robot2025-01-231-3/+3
| | | | | | | | | | | | | | | Run the `clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`, now with "east const" enforcement. Use `clang-format` version 18. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit. Issue: #26123
* GoogleTest: Clear script content buffer on flush and flush less oftenCraig Scott2024-11-121-4/+5
| | | | | | | | | | | | | | | | 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
* GoogleTest: Fix escaping in test namesEvgeniy Shcherbina2022-02-111-0/+19
Due to add_command() being a macro it introduced excessive and nonobvious escaping in different parts of the script. Because of one of such places the resulting script would have an erroneous ${TEST_LIST} if the user data (in test parameters) had a semicolon. To eliminate this non-obvious escaping, add_command() was converted to function. Updated the escaping accordingly. Fixes: #23059