unit_tests "logic analyzer" style output #6403

only:better file name
This commit is contained in:
rusefillc 2024-12-24 21:45:32 -05:00
parent 2cd536cf32
commit 24192f94c4
1 changed files with 2 additions and 1 deletions

View File

@ -141,9 +141,10 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
EngineTestHelper::~EngineTestHelper() {
// Write history to file
extern bool hasInitGtest;
auto testInfo = ::testing::UnitTest::GetInstance()->current_test_info();
if (hasInitGtest) {
std::stringstream filePath;
filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata";
filePath << "unittest_" << testInfo->test_case_name() << "_" << testInfo->name() << ".logicdata";
writeEvents(filePath.str().c_str());
}