mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-05 06:03:34 +00:00
Log a warning if unrecognized args are passed to the test binary
Bug: none Change-Id: Ic437dc7656613d9a8088dd51f1ed0713f1992415 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42720 Auto-Submit: Austin Eng <enga@chromium.org> Reviewed-by: Stephen White <senorblanco@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
parent
bd3f58612f
commit
7124cc4e5d
@ -382,6 +382,14 @@ void DawnTestEnvironment::ParseArgs(int argc, char** argv) {
|
||||
"available device type\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip over args that look like they're for Googletest.
|
||||
constexpr const char kGtestArgPrefix[] = "--gtest_";
|
||||
if (strncmp(kGtestArgPrefix, argv[i], sizeof(kGtestArgPrefix) - 1) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dawn::WarningLog() << " Unused argument: " << argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,14 @@ void InitDawnValidationTestEnvironment(int argc, char** argv) {
|
||||
gWireTraceDir = argv[i] + argLen;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Skip over args that look like they're for Googletest.
|
||||
constexpr const char kGtestArgPrefix[] = "--gtest_";
|
||||
if (strncmp(kGtestArgPrefix, argv[i], sizeof(kGtestArgPrefix) - 1) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
dawn::WarningLog() << " Unused argument: " << argv[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user