Hash :
13fd988c
Author :
Date :
2018-01-29T15:47:38
Vulkan: Add the Vulkan API to gpu_test_expectations. BUG=angleproject:2161 Change-Id: I7eda4d654cd0c0bc55ff344c5927d738ce592fe4 Reviewed-on: https://chromium-review.googlesource.com/891839 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expectations/HowToMakeChanges.md
--- gpu_test_expectations_reverted/HowToMakeChanges.md 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/HowToMakeChanges.md 2018-01-29 15:28:13.820679300 -0500
@@ -0,0 +1,22 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config```
+directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
+will allow us to merge Chromium changes easily in our ```gpu_test_expectations```.
+
+In order to make a change to this directory, do the following:
+
+ * copy the directory somewhere like in ```gpu_test_expectations_reverted```
+ * in ```gpu_test_expectations_reverted``` run ```patch -p 1 -R < angle-mods.patch```
+ * do your changes in ```gpu_test_expectations```
+ * delete angle-mods.patch in both directories
+ * run ```diff -rupN gpu_test_expectations_reverted gpu_test_expectations > angle-mods.patch```
+ * copy ```angle-mods.patch``` in ```gpu_test_expectations```
+
+How to update from Chromium:
+
+ * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
+ * Copy over Chromium files, ```git add . -u```, ```git commit```
+ * ```git revert HEAD~```
+ * ```rm angle-mods.patch```
+ * ```git diff HEAD~ (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend```
+ * ```git rebase -i``` to squash the three patches into one.
+
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h
--- gpu_test_expectations_reverted/angle_config.h 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/angle_config.h 2017-09-11 17:09:26.892352900 -0400
@@ -0,0 +1,73 @@
+//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// angle_config.h:
+// Helpers for importing the gpu test expectations package from Chrome.
+//
+
+#ifndef ANGLE_GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
+#define ANGLE_GPU_TEST_EXPECTATIONS_ANGLE_CONFIG_H_
+
+#include <stdint.h>
+
+#include <iostream>
+
+#include "common/debug.h"
+#include "common/string_utils.h"
+
+#define DCHECK_EQ(A,B) ASSERT((A) == (B))
+#define DCHECK_NE(A,B) ASSERT((A) != (B))
+#define DCHECK(X) ASSERT(X)
+#define DLOG(X) std::cerr
+#define LOG(X) std::cerr
+
+#define GPU_EXPORT
+
+// Shim Chromium's types by importing symbols in the correct namespaces
+namespace base
+{
+ using angle::kWhitespaceASCII;
+ using angle::TRIM_WHITESPACE;
+ using angle::KEEP_WHITESPACE;
+ using angle::SPLIT_WANT_ALL;
+ using angle::SPLIT_WANT_NONEMPTY;
+ using angle::SplitString;
+ using angle::SplitStringAlongWhitespace;
+ using angle::HexStringToUInt;
+ using angle::ReadFileToString;
+
+ using TimeDelta = int;
+} // namespace base
+
+namespace gfx
+{
+ class Size
+ {
+ public:
+ int width() const { return 0; }
+ int height() const { return 0; }
+ };
+} // namespace gfx
+
+struct DxDiagNode
+{
+};
+
+// TODO(jmadill): other platforms
+// clang-format off
+#if defined(_WIN32) || defined(_WIN64)
+# define OS_WIN
+#elif defined(ANDROID)
+# define OS_ANDROID
+#elif defined(__linux__)
+# define OS_LINUX
+#elif defined(__APPLE__)
+# define OS_MACOSX
+#else
+# error "Unsupported platform"
+#endif
+// clang-format on
+
+#endif
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/gpu_info.cc
--- gpu_test_expectations_reverted/gpu_info.cc 2018-01-29 15:22:50.931147900 -0500
+++ gpu_test_expectations/gpu_info.cc 2017-10-23 13:31:30.199473500 -0400
@@ -4,7 +4,7 @@
#include <stdint.h>
-#include "gpu/config/gpu_info.h"
+#include "gpu_info.h"
namespace {
@@ -100,7 +100,7 @@ const GPUInfo::GPUDevice& GPUInfo::activ
if (secondary_gpu.active)
return secondary_gpu;
}
- DLOG(ERROR) << "No active GPU found, returning primary GPU.";
+ DLOG(ERROR) << "No active GPU found, returning primary GPU.\n";
return gpu;
}
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_info.h
--- gpu_test_expectations_reverted/gpu_info.h 2018-01-29 15:22:50.934249500 -0500
+++ gpu_test_expectations/gpu_info.h 2017-10-23 13:31:30.199473500 -0400
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef GPU_CONFIG_GPU_INFO_H_
-#define GPU_CONFIG_GPU_INFO_H_
+#ifndef ANGLE_GPU_CONFIG_GPU_INFO_H_
+#define ANGLE_GPU_CONFIG_GPU_INFO_H_
// Provides access to the GPU information for the system
// on which chrome is currently running.
@@ -13,12 +13,7 @@
#include <string>
#include <vector>
-#include "base/time/time.h"
-#include "base/version.h"
-#include "build/build_config.h"
-#include "gpu/config/dx_diag_node.h"
-#include "gpu/gpu_export.h"
-#include "ui/gfx/geometry/size.h"
+#include "angle_config.h"
#if defined(USE_X11)
typedef unsigned long VisualID;
@@ -299,4 +294,4 @@ struct GPU_EXPORT GPUInfo {
} // namespace gpu
-#endif // GPU_CONFIG_GPU_INFO_H_
+#endif // ANGLE_GPU_CONFIG_GPU_INFO_H_
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc
--- gpu_test_expectations_reverted/gpu_test_config.cc 2018-01-29 15:22:50.938244500 -0500
+++ gpu_test_expectations/gpu_test_config.cc 2018-01-29 15:41:35.330454900 -0500
@@ -2,21 +2,53 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "gpu/config/gpu_test_config.h"
+#include "gpu_test_config.h"
#include <stddef.h>
#include <stdint.h>
-#include "base/logging.h"
-#include "base/sys_info.h"
-#include "gpu/config/gpu_info.h"
-#include "gpu/config/gpu_info_collector.h"
-#include "gpu/config/gpu_test_expectations_parser.h"
+#include "gpu_info.h"
+#include "gpu_test_expectations_parser.h"
-#if defined(OS_WIN)
-#include "base/win/windows_version.h"
+#if defined(OS_MACOSX)
+#include "gpu_test_config_mac.h"
+#endif
+
+#if !defined(OS_ANDROID)
+#include "gpu_info_util/SystemInfo.h"
#endif
+#if defined(OS_WIN)
+
+namespace base {
+namespace {
+
+// Disable the deprecated function warning for GetVersionEx
+#pragma warning(disable: 4996)
+
+class SysInfo
+{
+ public:
+ static void OperatingSystemVersionNumbers(
+ int32_t *major_version, int32_t *minor_version, int32_t *bugfix_version);
+};
+
+// static
+void SysInfo::OperatingSystemVersionNumbers(
+ int32_t *major_version, int32_t *minor_version, int32_t *bugfix_version)
+{
+ OSVERSIONINFOEX version_info = { sizeof version_info };
+ ::GetVersionEx(reinterpret_cast<OSVERSIONINFO*>(&version_info));
+ *major_version = version_info.dwMajorVersion;
+ *minor_version = version_info.dwMinorVersion;
+ *bugfix_version = version_info.dwBuildNumber;
+}
+
+} // anonymous namespace
+} // namespace base
+
+#endif // defined(OS_WIN)
+
namespace gpu {
namespace {
@@ -46,8 +78,7 @@ GPUTestConfig::OS GetCurrentOS() {
int32_t major_version = 0;
int32_t minor_version = 0;
int32_t bugfix_version = 0;
- base::SysInfo::OperatingSystemVersionNumbers(
- &major_version, &minor_version, &bugfix_version);
+ angle::GetOperatingSystemVersionNumbers(&major_version, &minor_version, &bugfix_version);
if (major_version == 10) {
switch (minor_version) {
case 5:
@@ -76,6 +107,26 @@ GPUTestConfig::OS GetCurrentOS() {
return GPUTestConfig::kOsUnknown;
}
+#if !defined(OS_ANDROID)
+CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
+ angle::SystemInfo info;
+ if (!angle::GetSystemInfo(&info)) {
+ return kCollectInfoFatalFailure;
+ }
+ const angle::GPUDeviceInfo& gpu = info.gpus[info.primaryGPUIndex];
+ gpu_info->gpu.vendor_id = gpu.vendorId;
+ gpu_info->gpu.device_id = gpu.deviceId;
+ gpu_info->gpu.active = true;
+ return kCollectInfoSuccess;
+}
+#else
+CollectInfoResult CollectBasicGraphicsInfo(GPUInfo* gpu_info) {
+ gpu_info->gpu.vendor_id = 0;
+ gpu_info->gpu.device_id = 0;
+ gpu_info->gpu.active = true;
+ return kCollectInfoNonFatalFailure;
+}
+#endif // defined(OS_ANDROID)
} // namespace anonymous
GPUTestConfig::GPUTestConfig()
@@ -112,7 +163,7 @@ void GPUTestConfig::set_build_type(int32
}
void GPUTestConfig::set_api(int32_t api) {
- DCHECK_EQ(0, api & ~(kAPID3D9 | kAPID3D11 | kAPIGLDesktop | kAPIGLES));
+ DCHECK_EQ(0, api & ~(kAPID3D9 | kAPID3D11 | kAPIGLDesktop | kAPIGLES | kAPIVulkan));
api_ = api;
}
@@ -260,7 +311,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
GPUInfo my_gpu_info;
CollectInfoResult result = CollectBasicGraphicsInfo(&my_gpu_info);
if (result != kCollectInfoSuccess) {
- LOG(ERROR) << "Fail to identify GPU";
+ LOG(ERROR) << "Fail to identify GPU\n";
DisableGPUInfoValidation();
rt = true;
} else {
@@ -271,7 +322,7 @@ bool GPUTestBotConfig::LoadCurrentConfig
}
set_os(GetCurrentOS());
if (os() == kOsUnknown) {
- LOG(ERROR) << "Unknown OS";
+ LOG(ERROR) << "Unknown OS\n";
rt = false;
}
#if defined(NDEBUG)
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectations/gpu_test_config.h
--- gpu_test_expectations_reverted/gpu_test_config.h 2018-01-29 15:22:50.941246600 -0500
+++ gpu_test_expectations/gpu_test_config.h 2018-01-29 15:41:01.117639000 -0500
@@ -2,16 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef GPU_CONFIG_GPU_TEST_CONFIG_H_
-#define GPU_CONFIG_GPU_TEST_CONFIG_H_
+#ifndef ANGLE_GPU_CONFIG_GPU_TEST_CONFIG_H_
+#define ANGLE_GPU_CONFIG_GPU_TEST_CONFIG_H_
#include <stdint.h>
#include <string>
#include <vector>
-#include "base/compiler_specific.h"
-#include "gpu/gpu_export.h"
+#include "angle_config.h"
namespace gpu {
@@ -56,6 +55,7 @@ class GPU_EXPORT GPUTestConfig {
kAPID3D11 = 1 << 1,
kAPIGLDesktop = 1 << 2,
kAPIGLES = 1 << 3,
+ kAPIVulkan = 1 << 4,
};
GPUTestConfig();
@@ -145,5 +145,5 @@ class GPU_EXPORT GPUTestBotConfig : publ
} // namespace gpu
-#endif // GPU_CONFIG_GPU_TEST_CONFIG_H_
+#endif // ANGLE_GPU_CONFIG_GPU_TEST_CONFIG_H_
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_config_mac.h gpu_test_expectations/gpu_test_config_mac.h
--- gpu_test_expectations_reverted/gpu_test_config_mac.h 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/gpu_test_config_mac.h 2017-10-31 10:53:42.173222700 -0400
@@ -0,0 +1,24 @@
+//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// gpu_test_config_mac.h:
+// Helper functions for gpu_test_config that have to be compiled in ObjectiveC++
+//
+
+#ifndef ANGLE_GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_
+#define ANGLE_GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_
+
+#include "gpu_info.h"
+
+namespace angle
+{
+
+void GetOperatingSystemVersionNumbers(int32_t *major_version,
+ int32_t *minor_version,
+ int32_t *bugfix_version);
+
+} // namespace angle
+
+#endif // ANGLE_GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_config_mac.mm gpu_test_expectations/gpu_test_config_mac.mm
--- gpu_test_expectations_reverted/gpu_test_config_mac.mm 1969-12-31 19:00:00.000000000 -0500
+++ gpu_test_expectations/gpu_test_config_mac.mm 2017-10-31 10:53:42.174247100 -0400
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// gpu_test_config_mac.mm:
+// Helper functions for gpu_test_config that have to be compiled in ObjectiveC++
+
+#include "gpu_test_config_mac.h"
+
+#import <Cocoa/Cocoa.h>
+
+// OSX 10.8 deprecates Gestalt but doesn't make the operatingSystemVersion property part of the
+// public interface of NSProcessInfo until 10.10. Add a forward declaration.
+#if !defined(MAC_OS_X_VERSION_10_10) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10
+@interface NSProcessInfo (YosemiteSDK)
+@property(readonly) NSOperatingSystemVersion operatingSystemVersion;
+@end
+#endif
+
+namespace angle
+{
+
+void GetOperatingSystemVersionNumbers(int32_t *major_version,
+ int32_t *minor_version,
+ int32_t *bugfix_version)
+{
+#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8
+ Gestalt(gestaltSystemVersionMajor, reinterpret_cast<SInt32 *>(major_version));
+ Gestalt(gestaltSystemVersionMinor, reinterpret_cast<SInt32 *>(minor_version));
+ Gestalt(gestaltSystemVersionBugFix, reinterpret_cast<SInt32 *>(bugfix_version));
+#else
+ if (@available(macOS 10.10, *))
+ {
+ NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion];
+ *major_version = version.majorVersion;
+ *minor_version = version.minorVersion;
+ *bugfix_version = version.patchVersion;
+ }
+ else
+ {
+ // This can only happen on 10.9
+ *major_version = 10;
+ *minor_version = 9;
+ *bugfix_version = 0;
+ }
+#endif
+}
+
+} // namespace angle
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu_test_expectations/gpu_test_expectations_parser.cc
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.cc 2018-01-29 15:22:50.947689800 -0500
+++ gpu_test_expectations/gpu_test_expectations_parser.cc 2018-01-29 15:42:52.940626000 -0500
@@ -2,17 +2,47 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "gpu/config/gpu_test_expectations_parser.h"
+#include "gpu_test_expectations_parser.h"
#include <stddef.h>
#include <stdint.h>
-#include "base/files/file_util.h"
-#include "base/logging.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_split.h"
-#include "base/strings/string_util.h"
-#include "base/strings/stringprintf.h"
+#include "angle_config.h"
+#include "common/angleutils.h"
+
+namespace base {
+
+namespace {
+
+bool StartsWithASCII(const std::string& str,
+ const std::string& search,
+ bool case_sensitive) {
+ ASSERT(!case_sensitive);
+ return str.compare(0, search.length(), search) == 0;
+}
+
+template <class Char> inline Char ToLowerASCII(Char c) {
+ return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c;
+}
+
+template<typename Iter>
+static inline bool DoLowerCaseEqualsASCII(Iter a_begin,
+ Iter a_end,
+ const char* b) {
+ for (Iter it = a_begin; it != a_end; ++it, ++b) {
+ if (!*b || base::ToLowerASCII(*it) != *b)
+ return false;
+ }
+ return *b == 0;
+}
+
+bool LowerCaseEqualsASCII(const std::string& a, const char* b) {
+ return DoLowerCaseEqualsASCII(a.begin(), a.end(), b);
+}
+
+} // anonymous namespace
+
+} // namespace base
namespace gpu {
@@ -62,6 +92,7 @@ enum Token {
kConfigD3D11,
kConfigGLDesktop,
kConfigGLES,
+ kConfigVulkan,
// expectation
kExpectationPass,
kExpectationFail,
@@ -115,6 +146,7 @@ const TokenInfo kTokenData[] = {
{"d3d11", GPUTestConfig::kAPID3D11},
{"opengl", GPUTestConfig::kAPIGLDesktop},
{"gles", GPUTestConfig::kAPIGLES},
+ {"vulkan", GPUTestConfig::kAPIVulkan},
{"pass", GPUTestExpectationsParser::kGpuTestPass},
{"fail", GPUTestExpectationsParser::kGpuTestFail},
{"flaky", GPUTestExpectationsParser::kGpuTestFlaky},
@@ -153,9 +185,9 @@ const char* kErrorMessage[] = {
};
Token ParseToken(const std::string& word) {
- if (base::StartsWith(word, "//", base::CompareCase::INSENSITIVE_ASCII))
+ if (base::StartsWithASCII(word, "//", false))
return kTokenComment;
- if (base::StartsWith(word, "0x", base::CompareCase::INSENSITIVE_ASCII))
+ if (base::StartsWithASCII(word, "0x", false))
return kConfigGPUDeviceID;
for (int32_t i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -211,8 +243,8 @@ bool GPUTestExpectationsParser::LoadTest
return rt;
}
-bool GPUTestExpectationsParser::LoadTestExpectations(
- const base::FilePath& path) {
+bool GPUTestExpectationsParser::LoadTestExpectationsFromFile(
+ const std::string& path) {
entries_.clear();
error_messages_.clear();
@@ -279,6 +311,7 @@ bool GPUTestExpectationsParser::ParseCon
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
+ case kConfigVulkan:
case kConfigGPUDeviceID:
if (token == kConfigGPUDeviceID) {
if (!UpdateTestConfig(config, tokens[i], 0))
@@ -340,6 +373,7 @@ bool GPUTestExpectationsParser::ParseLin
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
+ case kConfigVulkan:
case kConfigGPUDeviceID:
// MODIFIERS, could be in any order, need at least one.
if (stage != kLineParserConfigs && stage != kLineParserBugID) {
@@ -493,6 +527,7 @@ bool GPUTestExpectationsParser::UpdateTe
case kConfigD3D11:
case kConfigGLDesktop:
case kConfigGLES:
+ case kConfigVulkan:
if ((config->api() & kTokenData[token].flag) != 0) {
PushErrorMessage(kErrorMessage[kErrorEntryWithAPIConflicts],
line_number);
@@ -542,20 +577,17 @@ bool GPUTestExpectationsParser::DetectCo
void GPUTestExpectationsParser::PushErrorMessage(
const std::string& message, size_t line_number) {
- error_messages_.push_back(
- base::StringPrintf("Line %d : %s",
- static_cast<int>(line_number), message.c_str()));
+ error_messages_.push_back("Line " + ToString(line_number) +
+ " : " + message.c_str());
}
void GPUTestExpectationsParser::PushErrorMessage(
const std::string& message,
size_t entry1_line_number,
size_t entry2_line_number) {
- error_messages_.push_back(
- base::StringPrintf("Line %d and %d : %s",
- static_cast<int>(entry1_line_number),
- static_cast<int>(entry2_line_number),
- message.c_str()));
+ error_messages_.push_back("Line " + ToString(entry1_line_number) +
+ " and " + ToString(entry2_line_number) +
+ " : " + message.c_str());
}
GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry()
diff -rupN --strip-trailing-cr gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_test_expectations/gpu_test_expectations_parser.h
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.h 2018-01-29 15:22:50.951678900 -0500
+++ gpu_test_expectations/gpu_test_expectations_parser.h 2017-09-11 17:09:26.897372200 -0400
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_
-#define GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_
+#ifndef ANGLE_GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_
+#define ANGLE_GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_
#include <stddef.h>
#include <stdint.h>
@@ -11,9 +11,8 @@
#include <string>
#include <vector>
-#include "base/files/file_path.h"
-#include "gpu/config/gpu_test_config.h"
-#include "gpu/gpu_export.h"
+#include "angle_config.h"
+#include "gpu_test_config.h"
namespace gpu {
@@ -34,7 +33,7 @@ class GPU_EXPORT GPUTestExpectationsPars
// save all the entries. Otherwise, generate error messages.
// Return true if parsing succeeds.
bool LoadTestExpectations(const std::string& data);
- bool LoadTestExpectations(const base::FilePath& path);
+ bool LoadTestExpectationsFromFile(const std::string& path);
// Query error messages from the last LoadTestExpectations() call.
const std::vector<std::string>& GetErrorMessages() const;
@@ -87,5 +86,5 @@ class GPU_EXPORT GPUTestExpectationsPars
} // namespace gpu
-#endif // GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_
+#endif // ANGLE_GPU_CONFIG_GPU_TEST_EXPECTATIONS_PARSER_H_