Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions test/automatic/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,10 @@ struct TestCase
// cases.
bool isolated;
// 内部要 fork 的用例须同时隔离并跳过 PlatformInit,且自行确保 fork 时没有其他线程。
// 接管 STDIO 写端并检查全部输出的用例也跳过,避免 STDIO 线程的日志混入输出。
// Cases that fork internally need isolation, no PlatformInit, and no other threads at
// fork.
// fork. Cases that take over the STDIO writer and check all of its output skip it as
// well, so no STDIO worker log lands in that output.
bool platform_init = true;
};

Expand Down Expand Up @@ -279,7 +281,7 @@ constexpr GroupedTestCase kMainTestCases[] = {
false}},
{"linux_host_tests",
{"linux_database_raw", &RunVoidEntry<test_linux_database_raw>, true, false}},
{"system_tests", {"logger", &RunVoidEntry<test_logger>, true}},
{"system_tests", {"logger", &RunVoidEntry<test_logger>, true, false}},
{"system_tests",
{"linux_shm_topic", &RunVoidEntry<test_linux_shm_topic>, true, false}},
{"system_tests", {"linux_shm_bench", &RunBenchLinuxSharedTopicSet, true, false}},
Expand Down
3 changes: 2 additions & 1 deletion test/automatic/middleware/logger/logger/test_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ void test_logger()
auto* old_stream = LibXR::STDIO::write_stream_;

// 临时把日志输出接到 Pipe,检查实际生成的文本;读取后恢复 STDIO 的原指针。
// 本用例不执行 PlatformInit,没有 STDIO 线程会同时写日志。
// Redirect logging to a Pipe to inspect generated text, then restore the original STDIO
// pointers.
// pointers. The case runs without PlatformInit, so no STDIO worker logs meanwhile.
LibXR::STDIO::write_ = &output.GetWritePort();
LibXR::STDIO::write_stream_ = nullptr;

Expand Down
Loading