From 81f51492ff128492b083f98536e4d3b4352afa84 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sat, 4 Jan 2025 12:39:16 +0100 Subject: [PATCH] Don't silence errorstream in tests (#15629) --- src/unittest/test.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/unittest/test.cpp b/src/unittest/test.cpp index 8c20b0ed5..8f0eaf855 100644 --- a/src/unittest/test.cpp +++ b/src/unittest/test.cpp @@ -212,8 +212,6 @@ bool run_tests() u64 t1 = porting::getTimeMs(); TestGameDef gamedef; - g_logger.setLevelSilenced(LL_ERROR, true); - u32 num_modules_failed = 0; u32 num_total_tests_failed = 0; u32 num_total_tests_run = 0; @@ -243,11 +241,9 @@ bool run_tests() u64 tdiff = porting::getTimeMs() - t1; - g_logger.setLevelSilenced(LL_ERROR, false); - const char *overall_status = (num_modules_failed == 0) ? "PASSED" : "FAILED"; - rawstream + rawstream << "\n" << "++++++++++++++++++++++++++++++++++++++++" << "++++++++++++++++++++++++++++++++++++++++" << std::endl << "Unit Test Results: " << overall_status << std::endl @@ -283,17 +279,15 @@ bool run_tests(const std::string &module_name) return catch_test_failures == 0; } - g_logger.setLevelSilenced(LL_ERROR, true); u64 t1 = porting::getTimeMs(); bool ok = testmod->testModule(&gamedef); u64 tdiff = porting::getTimeMs() - t1; - g_logger.setLevelSilenced(LL_ERROR, false); const char *overall_status = ok ? "PASSED" : "FAILED"; - rawstream + rawstream << "\n" << "++++++++++++++++++++++++++++++++++++++++" << "++++++++++++++++++++++++++++++++++++++++" << std::endl << "Unit Test Results: " << overall_status << std::endl