Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joelsmithTT committed Nov 14, 2024
1 parent 8400e14 commit cb173e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/misc/test_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class LoggerTest : public ::testing::Test {
std::filesystem::path log_file;

void SetUp() override {
// A bit of a hack:
// A bit of a hack - logger is only intended to be initialized once per
// process, but we need to reset it for each test.
tt::umd::logger::detail::is_initialized.store(false);

std::string tmpl = (std::filesystem::temp_directory_path() / "logger_test_XXXXXX").string();
Expand Down Expand Up @@ -50,7 +51,7 @@ class LoggerTest : public ::testing::Test {
TEST_F(LoggerTest, BasicLogging) {
// Initialize logger with our test configuration
tt::umd::logger::Options options;
options.log_to_stderr = false;
options.log_to_stderr = true;
options.filename = log_file.string();
options.pattern = "%v"; // Simple pattern for easier testing
tt::umd::logger::initialize(options);
Expand Down Expand Up @@ -220,4 +221,5 @@ TEST_F(LoggerTest, StderrAndDiskPerformance) {
}
std::cout << ts.to_string() << " for " << num_messages << " messages below level threshold" << std::endl;
}
}
}

0 comments on commit cb173e0

Please sign in to comment.