Add adapter type in test name when the adapter is Microsoft Basic Render

This patch adds the adapter type in the dawn_end2end_test name when the
adapter is Microsoft Basic Render Driver. In a Windows Remote Desktop
session, there will be two adapters whose name is "Microsoft Basic
Render Driver" with one of the adapter type being "CPU" and another
being "Integrated GPU" on an Intel integrated GPU for example. To avoid
the conflicts in the name of end2end tests and causes ASSERT failures,
we add the adapter type to the test name when the adapter is Microsoft
Basic Render Driver.

BUG=dawn:396
TEST=dawn_end2end_tests

Change-Id: I26108ac106957ea7e72d531a366851fd71cbc2b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Jiawei Shao 2020-05-21 00:24:16 +00:00 committed by Commit Bot service account
parent 13e565a599
commit 8a3cc5c4df
1 changed files with 10 additions and 0 deletions

View File

@ -152,6 +152,16 @@ std::ostream& operator<<(std::ostream& os, const AdapterTestParam& param) {
}
os << ParamName(param.adapterProperties.backendType) << "_" << sanitizedName.c_str();
// In a Windows Remote Desktop session there are two adapters named "Microsoft Basic Render
// Driver" with different adapter types. We must differentiate them to avoid any tests using the
// same name.
if (param.adapterProperties.deviceID == 0x008C) {
std::string adapterType = AdapterTypeName(param.adapterProperties.adapterType);
std::replace(adapterType.begin(), adapterType.end(), ' ', '_');
os << "_" << adapterType;
}
for (const char* forceEnabledWorkaround : param.forceEnabledWorkarounds) {
os << "__e_" << forceEnabledWorkaround;
}