dedicated output_logicdata folder

This commit is contained in:
Andrey 2024-03-21 10:16:03 -04:00
parent 17069719dc
commit f56cc4939a
3 changed files with 5 additions and 2 deletions

View File

@ -2,4 +2,3 @@
build*/
gcov_working_area
triggers
unittest*.logicdata

View File

@ -0,0 +1 @@
unittest*.logicdata

View File

@ -133,12 +133,15 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
rememberCurrentConfiguration();
}
#define LOGICDATA_OUTPUT "output_logicdata"
EngineTestHelper::~EngineTestHelper() {
// Write history to file
extern bool hasInitGtest;
if (hasInitGtest) {
mkdir(LOGICDATA_OUTPUT, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
std::stringstream filePath;
filePath << "unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata";
filePath << LOGICDATA_OUTPUT << "/unittest_" << ::testing::UnitTest::GetInstance()->current_test_info()->name() << ".logicdata";
writeEvents(filePath.str().c_str());
}