Ensure log output is clean when listing available demos

This commit is contained in:
baldurk
2025-01-07 13:04:51 +00:00
parent 4d4fbdcaa3
commit 2d86fe6b12
3 changed files with 13 additions and 0 deletions
+2
View File
@@ -454,6 +454,8 @@ Usage: %s Test_Name [test_options]
if(argc >= 2 && !strcmp(argv[1], "--list-raw"))
{
SetDebugLogEnabled(false);
check_tests(argc, argv);
// output TSV
+10
View File
@@ -158,8 +158,18 @@ static FILE *logFile = NULL;
#include <android/log.h>
#endif
static bool debugLogEnabled = true;
void SetDebugLogEnabled(bool enabled)
{
debugLogEnabled = enabled;
}
void DebugPrint(const char *fmt, ...)
{
if(!debugLogEnabled)
return;
va_list args;
va_start(args, fmt);
+1
View File
@@ -333,6 +333,7 @@ std::string strlower(const std::string &str);
std::string strupper(const std::string &str);
std::string trim(const std::string &str);
void SetDebugLogEnabled(bool enabled);
void DebugPrint(const char *fmt, ...);
#define TEST_ASSERT(cond, fmt, ...) \