Commit 0e22334
Fix getdeps test failures - add folly::init to interface and navy tests
Summary:
The OSS CMake build uses GTest::gtest_main which does not call folly::init().
Tests that exercise code paths using folly singletons (Timekeeper) or XLOG
crash with SIGABRT or SEGFAULT.
This adds a custom TestMain.cpp that calls InitGoogleTest() followed by
folly::Init, and links it directly to each test executable via target_sources
to avoid link-order issues with transitively-linked GTest::gtest_main.
Fixes 3 of 4 failing interface tests. FlashCacheComponentTest.ExpirationCallback
still fails due to a deeper XLOG initialization issue that needs manual investigation.
---
> Generated by [Metamate](https://fb.workplace.com/groups/metamate.feedback/)
[Metamate Session](https://internalfb.com/intern/bunny?q=eggmate%207c5c00c7-1341-40c1-81a6-e1c31c25b415), [Trace](https://www.internalfb.com/confucius?session_id=7c5c00c7-1341-40c1-81a6-e1c31c25b415&tab=Trace)
---
Other changes:
* Remove `WORKING_DIRECTORY "${TOP_DIR}"` from the main CMakeLists. `TOP_DIR` is never set, so this was create log spam from warnings and was getting unset anyway.
* Use new `CO_ASSERT_OK` in CO_TEST* tests. This uses `CO_ASSERT_TRUE` (a coro-compatible macro) rather than XCHECK (which just crashes).
* Move FlashCacheComponentTest to gcc-disabled tests (internal compiler error).
___
overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: cachelib
Differential Revision: D100265646
fbshipit-source-id: bea090e7ab7f5d6bc76501c07b99dfe156798cb41 parent d4a8956 commit 0e22334
8 files changed
Lines changed: 120 additions & 82 deletions
File tree
- cachelib
- common/tests
- interface
- components/tests
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | 166 | | |
168 | 167 | | |
169 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
66 | 69 | | |
67 | 70 | | |
68 | | - | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
0 commit comments