Fix parsing of DawnPerfTest --override-steps argument
Bug: dawn:208 Change-Id: I1abee97758383558946ace06d2ea4844be40e7b4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10720 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
parent
086835f3ff
commit
ce2adba679
|
@ -39,7 +39,7 @@ DawnPerfTestEnvironment::DawnPerfTestEnvironment(int argc, char** argv)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strcmp("--override-steps", argv[i]) == 0) {
|
||||
if (strstr(argv[i], "--override-steps=") == argv[i]) {
|
||||
const char* value = strchr(argv[i], '=');
|
||||
if (value != nullptr) {
|
||||
mOverrideStepsToRun = strtoul(value + 1, nullptr, 0);
|
||||
|
@ -49,9 +49,10 @@ DawnPerfTestEnvironment::DawnPerfTestEnvironment(int argc, char** argv)
|
|||
|
||||
if (strcmp("-h", argv[i]) == 0 || strcmp("--help", argv[i]) == 0) {
|
||||
std::cout << "Additional flags:"
|
||||
<< " [--calibration]\n"
|
||||
<< " [--calibration] [--override-steps=x]\n"
|
||||
<< " --calibration: Only run calibration. Calibration allows the perf test"
|
||||
" runner script to save some time.\n"
|
||||
<< " --override-steps: Set a fixed number of steps to run for each test\n"
|
||||
<< std::endl;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue