Skip to content

Commit

Permalink
Fixup merge from main
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed May 5, 2022
1 parent 6bf49e9 commit 1e5d8c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions testing/include/gz/common/testing/detail/AutoLogFixture.hh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ void AutoLogFixture::SetUp()
std::string testCaseName = testInfo->test_case_name();
this->dataPtr->logFilename = testCaseName + "_" + testName + ".log";

std::replace(this->dataPtr->logFilename.begin(),
this->dataPtr->logFilename.end(),
'/', '_');

this->dataPtr->temp = std::make_unique<TempDirectory>(
"test", "ign_common", false);
"test", "ign_common", true);
ASSERT_TRUE(this->dataPtr->temp->Valid());
common::setenv(IGN_HOMEDIR, this->dataPtr->temp->Path());

Expand All @@ -83,12 +87,12 @@ void AutoLogFixture::SetUp()
ASSERT_TRUE(common::exists(
common::joinPaths(logPath, this->dataPtr->logFilename)));

ignition::common::Console::SetVerbosity(4);

// Read the full path to the log directory.
this->dataPtr->logDirectory = ignLogDirectory();
ASSERT_FALSE(this->dataPtr->logDirectory.empty());
ASSERT_TRUE(ignition::common::exists(this->dataPtr->logDirectory));

ignition::common::Console::SetVerbosity(4);
}

//////////////////////////////////////////////////
Expand Down

0 comments on commit 1e5d8c5

Please sign in to comment.