Refactor wimpy feature (#2507)

- Make it a common parameter in harness using either '-w', '--wimpy' or
'CL_WIMPY_MODE' environment variable.
- Remove all test specific wimpy variable.

---------

Co-authored-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
Romaric Jodin
2025-09-02 18:47:44 +02:00
committed by GitHub
parent 096a227afd
commit 8e125bd2e8
27 changed files with 52 additions and 86 deletions

View File

@@ -36,6 +36,7 @@ bool gDisableSPIRVValidation = false;
std::string gSPIRVValidator = DEFAULT_SPIRV_VALIDATOR;
unsigned gNumWorkerThreads;
bool gListTests = false;
bool gWimpyMode = false;
void helpInfo()
{
@@ -52,6 +53,10 @@ void helpInfo()
Select parallel execution with the specified number of worker threads.
--list
List sub-tests
-w, --wimpy
Enable wimpy mode. It does not impact all tests. Impacted tests will run
with a very small subset of the tests. This option should not be used
for conformance submission (default: disabled).
For offline compilation (binary and spir-v modes) only:
--compilation-cache-mode <cache-mode>
@@ -112,6 +117,11 @@ int parseCustomParam(int argc, const char *argv[], const char *ignore)
delArg++;
gListTests = true;
}
else if (!strcmp(argv[i], "--wimpy") || !strcmp(argv[i], "-w"))
{
delArg++;
gWimpyMode = true;
}
else if (!strcmp(argv[i], "--compilation-mode"))
{
delArg++;

View File

@@ -41,6 +41,7 @@ extern std::string gCompilationProgram;
extern bool gDisableSPIRVValidation;
extern std::string gSPIRVValidator;
extern bool gListTests;
extern bool gWimpyMode;
extern int parseCustomParam(int argc, const char *argv[],
const char *ignore = 0);

View File

@@ -278,6 +278,16 @@ int runTestHarnessWithCheck(int argc, const char *argv[], int testNum,
return EXIT_SUCCESS;
}
gWimpyMode |= (getenv("CL_WIMPY_MODE") != nullptr);
if (gWimpyMode)
{
log_info("\n");
log_info("**************************\n");
log_info("*** Wimpy mode enabled ***\n");
log_info("**************************\n");
log_info("\n");
}
if ((argc > 1) && (!strcmp(argv[1], "-h") || !strcmp(argv[1], "--help")))
{
char *fileName = getenv("CL_CONFORMANCE_RESULTS_FILENAME");