SDL: test: When listing test-cases, say which ones are disabled

From 022ff075b9a0ae837f4489a5ed68a4e769b1ca98 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 8 Jan 2024 17:20:27 +0000
Subject: [PATCH] test: When listing test-cases, say which ones are disabled

When a test has been disabled because it's known not to work reliably
or it's a test for unimplemented functionality, we probably don't want
to encourage developers and testers to run it and report its failures
as a bug.

Helps: #8798, #8800
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 src/test/SDL_test_harness.c | 2 +-
 test/testautomation.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/SDL_test_harness.c b/src/test/SDL_test_harness.c
index ed43b7a9870f..73e23016ae62 100644
--- a/src/test/SDL_test_harness.c
+++ b/src/test/SDL_test_harness.c
@@ -504,7 +504,7 @@ int SDLTest_RunSuites(SDLTest_TestSuiteReference *testSuites[], const char *user
                 /* Within each suite, loop over all test cases to check if we have a filter match */
                 for (testCounter = 0; testSuite->testCases[testCounter]; ++testCounter) {
                     testCase = testSuite->testCases[testCounter];
-                    SDLTest_Log("      test: %s", testCase->name);
+                    SDLTest_Log("      test: %s%s", testCase->name, testCase->enabled ? "" : " (disabled)");
                 }
             }
             SDLTest_Log("Exit code: 2");
diff --git a/test/testautomation.c b/test/testautomation.c
index bb691702b785..7805bbc4a0f9 100644
--- a/test/testautomation.c
+++ b/test/testautomation.c
@@ -133,7 +133,7 @@ int main(int argc, char *argv[])
             SDL_Log("Test suite: %s", testSuite->name);
             for (testCounter = 0; testSuite->testCases[testCounter]; ++testCounter) {
                 const SDLTest_TestCaseReference *testCase = testSuite->testCases[testCounter];
-                SDL_Log("      test: %s", testCase->name);
+                SDL_Log("      test: %s%s", testCase->name, testCase->enabled ? "" : " (disabled)");
             }
         }
         return 0;