Commit e324310
committed
[RFC][libc] shut up passing tests
When a test fails, you have to scroll quite a bit to find which test failed.
This gets worst over time as we add more tests.
gtest has the option --gtest_brief=1 to silence passing tests from the output.
Add this to our pseudo-gtest framework.
With this change, only failing tests are printed. Example:
$ ninja libc-unit-tests
[1206/1357] Running unit test libc.test.src.string.memchr_test.__unit__
FAILED: libc/test/src/string/CMakeFiles/libc.test.src.string.memchr_test.__unit__ /android0/llvm-project/build/libc/test/src/string/CMakeFiles/libc.test.src.string.memchr_test.__unit__
cd /android0/llvm-project/build/libc/test/src/string && /android0/llvm-project/build/libc/test/src/string/libc.test.src.string.memchr_test.__unit__.__build__ --gtest_brief=${BRIEF:-1}
/android0/llvm-project/libc/test/src/string/memchr_test.cpp:24: FAILURE
Expected: call_memchr(src, 'b', size)
Which is: bc
To be equal to: "b"
Which is: b
[ FAILED ] LlvmLibcMemChrTest.FindsCharacterAfterNullTerminator
There are currently two tests that do print output which can probably also get
cleaned up (they are kind of like expected failures):
- stack_chk_guard_test
- LlvmLibcTestFilterTest.IncorrFilter
To get the old behavior, one can do:
$ BRIEF=0 ninja libc-unit-tests
Longer term, I'd like to move to use of llvm-lit, as is used throughout most of
the rest of llvm.
Link: https://google.github.io/googletest/advanced.html#suppressing-test-passes1 parent 8663b87 commit e324310
File tree
6 files changed
+25
-10
lines changed- libc
- cmake/modules
- test
- UnitTest
- src/string
- utils/UnitTest
6 files changed
+25
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
| 529 | + | |
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
174 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
175 | 181 | | |
176 | 182 | | |
177 | 183 | | |
| |||
197 | 203 | | |
198 | 204 | | |
199 | 205 | | |
200 | | - | |
201 | | - | |
202 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
203 | 211 | | |
204 | 212 | | |
205 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
| 112 | + | |
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
0 commit comments