mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
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:
@@ -112,6 +112,35 @@ int main(int argc, const char **argv)
|
||||
int error;
|
||||
|
||||
argc = parseCustomParam(argc, argv);
|
||||
if (gListTests)
|
||||
{
|
||||
for (unsigned dst = 0; dst < kTypeCount; dst++)
|
||||
{
|
||||
for (unsigned src = 0; src < kTypeCount; src++)
|
||||
{
|
||||
for (unsigned sat = 0; sat < 2; sat++)
|
||||
{
|
||||
// skip illegal saturated conversions to float type
|
||||
if (gSaturationNames[sat] == std::string("_sat")
|
||||
&& (gTypeNames[dst] == std::string("float")
|
||||
|| gTypeNames[dst] == std::string("half")
|
||||
|| gTypeNames[dst] == std::string("double")))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
for (unsigned rnd = 0; rnd < kRoundingModeCount; rnd++)
|
||||
{
|
||||
vlog("\t%s\n",
|
||||
(std::string(gTypeNames[dst])
|
||||
+ gSaturationNames[sat] + gRoundingModeNames[rnd]
|
||||
+ "_" + gTypeNames[src])
|
||||
.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (argc == -1)
|
||||
{
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user