Update '-list' option (#2457)

'-list' option is used to print all sub-tests. But some test do not
support it at all. And all test do not display it the same way, making
it quite complicated for external tools to extract them.

That CL clean the usage so that tests:
- Print the sub-tests list with either '-list' (to prevent breaking
legacy usage) or '--list' (to match other options)
- Do not print anything else when the option is used
This commit is contained in:
Romaric Jodin
2025-08-19 18:48:03 +02:00
committed by GitHub
parent 7f01a861d8
commit cef3ef6b59
12 changed files with 127 additions and 43 deletions

View File

@@ -35,6 +35,7 @@ std::string gCompilationProgram = DEFAULT_COMPILATION_PROGRAM;
bool gDisableSPIRVValidation = false;
std::string gSPIRVValidator = DEFAULT_SPIRV_VALIDATOR;
unsigned gNumWorkerThreads;
bool gListTests = false;
void helpInfo()
{
@@ -49,6 +50,8 @@ void helpInfo()
spir-v Use SPIR-V offline compilation
--num-worker-threads <num>
Select parallel execution with the specified number of worker threads.
--list
List sub-tests
For offline compilation (binary and spir-v modes) only:
--compilation-cache-mode <cache-mode>
@@ -104,6 +107,11 @@ int parseCustomParam(int argc, const char *argv[], const char *ignore)
// option and print its own help.
helpInfo();
}
else if (!strcmp(argv[i], "--list") || !strcmp(argv[i], "-list"))
{
delArg++;
gListTests = true;
}
else if (!strcmp(argv[i], "--compilation-mode"))
{
delArg++;