forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[libc] android atest compat (llvm#93852)
These changes slighly modify the output of the unittests so that they better match GTest, so that utilities that parse the expected output from GTest (such as Android's unit test harness) can read the output from our unit tests. This allows our unit tests to be run on Android devices. Add very primitive command line parsing to: - support --gtest_color=no to disable printing terminal colors. - recognize --gtest_print_time and print the test time in milliseconds. - most of our unit tests run on the order of microseconds, so its useful to preserve the existing behavior. But upsteram GTest ONLY prints time tests in milliseconds, and Android's atest expects to be able to parse exactly that. Atest always passes --gtest_print_time. The word `took` is removed as that also differs from upstream GTest, tripping up parsers. - ignore other --gtest_* flags Do so so that atest can parse the output correctly. Print the test number count before each run, so that atest can parse this value correctly. Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252 Link: https://google.github.io/googletest/advanced.html#colored-terminal-output Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time
- Loading branch information
1 parent
22ada55
commit 6f576d9
Showing
4 changed files
with
93 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters