mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-15 11:51:22 +00:00
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp("--override-steps", argv[i]) == 0) {
|
if (strstr(argv[i], "--override-steps=") == argv[i]) {
|
||||||
const char* value = strchr(argv[i], '=');
|
const char* value = strchr(argv[i], '=');
|
||||||
if (value != nullptr) {
|
if (value != nullptr) {
|
||||||
mOverrideStepsToRun = strtoul(value + 1, nullptr, 0);
|
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) {
|
if (strcmp("-h", argv[i]) == 0 || strcmp("--help", argv[i]) == 0) {
|
||||||
std::cout << "Additional flags:"
|
std::cout << "Additional flags:"
|
||||||
<< " [--calibration]\n"
|
<< " [--calibration] [--override-steps=x]\n"
|
||||||
<< " --calibration: Only run calibration. Calibration allows the perf test"
|
<< " --calibration: Only run calibration. Calibration allows the perf test"
|
||||||
" runner script to save some time.\n"
|
" runner script to save some time.\n"
|
||||||
|
<< " --override-steps: Set a fixed number of steps to run for each test\n"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user