Commit 47ac69c1 by Corentin Wallez

Update gpu_test_expectations to support OSX 10.11

On the Chromium side there was also a large refactor of SplitString. This patch includes a replication of that refactor in string_utils and adds the Chromium unittests to string_utils_unittests.cpp BUG=angleproject:1234 Change-Id: I4f71064fbf325c204e98a7b36ead118913d90f2c Reviewed-on: https://chromium-review.googlesource.com/314101Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarCorentin Wallez <cwallez@chromium.org>
parent faaa84ac
...@@ -15,26 +15,53 @@ ...@@ -15,26 +15,53 @@
namespace angle namespace angle
{ {
void SplitString(const std::string &input, const char kWhitespaceASCII[] = " \f\n\r\t\v";
char delimiter,
std::vector<std::string> *tokensOut) std::vector<std::string> SplitString(const std::string &input,
const std::string &delimiters,
WhitespaceHandling whitespace,
SplitResult resultType)
{ {
std::istringstream stream(input); std::vector<std::string> result;
std::string token; if (input.empty())
{
return result;
}
while (std::getline(stream, token, delimiter)) std::string::size_type start = 0;
while (start != std::string::npos)
{ {
if (!token.empty()) auto end = input.find_first_of(delimiters, start);
std::string piece;
if (end == std::string::npos)
{
piece = input.substr(start);
start = std::string::npos;
}
else
{
piece = input.substr(start, end - start);
start = end + 1;
}
if (whitespace == TRIM_WHITESPACE)
{ {
tokensOut->push_back(token); piece = TrimString(piece, kWhitespaceASCII);
}
if (resultType == SPLIT_WANT_ALL || !piece.empty())
{
result.push_back(piece);
} }
} }
return result;
} }
void SplitStringAlongWhitespace(const std::string &input, void SplitStringAlongWhitespace(const std::string &input,
std::vector<std::string> *tokensOut) std::vector<std::string> *tokensOut)
{ {
const char *delimiters = " \f\n\r\t\v";
std::istringstream stream(input); std::istringstream stream(input);
std::string line; std::string line;
...@@ -42,7 +69,7 @@ void SplitStringAlongWhitespace(const std::string &input, ...@@ -42,7 +69,7 @@ void SplitStringAlongWhitespace(const std::string &input,
while (std::getline(stream, line)) while (std::getline(stream, line))
{ {
size_t prev = 0, pos; size_t prev = 0, pos;
while ((pos = line.find_first_of(delimiters, prev)) != std::string::npos) while ((pos = line.find_first_of(kWhitespaceASCII, prev)) != std::string::npos)
{ {
if (pos > prev) if (pos > prev)
tokensOut->push_back(line.substr(prev, pos - prev)); tokensOut->push_back(line.substr(prev, pos - prev));
...@@ -53,6 +80,23 @@ void SplitStringAlongWhitespace(const std::string &input, ...@@ -53,6 +80,23 @@ void SplitStringAlongWhitespace(const std::string &input,
} }
} }
std::string TrimString(const std::string &input, const std::string &trimChars)
{
auto begin = input.find_first_not_of(trimChars);
if (begin == std::string::npos)
{
return "";
}
std::string::size_type end = input.find_last_not_of(trimChars);
if (end == std::string::npos)
{
return input.substr(begin);
}
return input.substr(begin, end - begin + 1);
}
bool HexStringToUInt(const std::string &input, unsigned int *uintOut) bool HexStringToUInt(const std::string &input, unsigned int *uintOut)
{ {
unsigned int offset = 0; unsigned int offset = 0;
......
...@@ -16,13 +16,30 @@ ...@@ -16,13 +16,30 @@
namespace angle namespace angle
{ {
void SplitString(const std::string &input, extern const char kWhitespaceASCII[];
char delimiter,
std::vector<std::string> *tokensOut); enum WhitespaceHandling
{
KEEP_WHITESPACE,
TRIM_WHITESPACE,
};
enum SplitResult
{
SPLIT_WANT_ALL,
SPLIT_WANT_NONEMPTY,
};
std::vector<std::string> SplitString(const std::string &input,
const std::string &delimiters,
WhitespaceHandling whitespace,
SplitResult resultType);
void SplitStringAlongWhitespace(const std::string &input, void SplitStringAlongWhitespace(const std::string &input,
std::vector<std::string> *tokensOut); std::vector<std::string> *tokensOut);
std::string TrimString(const std::string &input, const std::string &trimChars);
bool HexStringToUInt(const std::string &input, unsigned int *uintOut); bool HexStringToUInt(const std::string &input, unsigned int *uintOut);
bool ReadFileToString(const std::string &path, std::string *stringOut); bool ReadFileToString(const std::string &path, std::string *stringOut);
......
...@@ -16,34 +16,101 @@ using namespace angle; ...@@ -16,34 +16,101 @@ using namespace angle;
namespace namespace
{ {
// Basic functionality tests for SplitString // Basic SplitString tests
TEST(StringUtilsTest, SplitStringBasic) TEST(StringUtilsTest, SplitString_Basics)
{ {
std::string testString("AxBxCxxxDExxFGHx"); std::vector<std::string> r;
std::vector<std::string> tokens;
SplitString(testString, 'x', &tokens); r = SplitString(std::string(), ",:;", KEEP_WHITESPACE, SPLIT_WANT_ALL);
EXPECT_TRUE(r.empty());
ASSERT_EQ(5u, tokens.size());
EXPECT_EQ("A", tokens[0]); // Empty separator list
EXPECT_EQ("B", tokens[1]); r = SplitString("hello, world", "", KEEP_WHITESPACE, SPLIT_WANT_ALL);
EXPECT_EQ("C", tokens[2]); ASSERT_EQ(1u, r.size());
EXPECT_EQ("DE", tokens[3]); EXPECT_EQ("hello, world", r[0]);
EXPECT_EQ("FGH", tokens[4]);
// Should split on any of the separators.
r = SplitString("::,,;;", ",:;", KEEP_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(7u, r.size());
for (auto str : r)
ASSERT_TRUE(str.empty());
r = SplitString("red, green; blue:", ",:;", TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
ASSERT_EQ(3u, r.size());
EXPECT_EQ("red", r[0]);
EXPECT_EQ("green", r[1]);
EXPECT_EQ("blue", r[2]);
// Want to split a string along whitespace sequences.
r = SplitString(" red green \tblue\n", " \t\n", TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
ASSERT_EQ(3u, r.size());
EXPECT_EQ("red", r[0]);
EXPECT_EQ("green", r[1]);
EXPECT_EQ("blue", r[2]);
// Weird case of splitting on spaces but not trimming.
r = SplitString(" red ", " ", TRIM_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(3u, r.size());
EXPECT_EQ("", r[0]); // Before the first space.
EXPECT_EQ("red", r[1]);
EXPECT_EQ("", r[2]); // After the last space.
} }
// Basic functionality tests for SplitStringAlongWhitespace // Check different whitespace and result types for SplitString
TEST(StringUtilsTest, SplitStringAlongWhitespaceBasic) TEST(StringUtilsTest, SplitString_WhitespaceAndResultType)
{ {
std::string testString("A B\nC\r\tDE\v\fFGH \t\r\n"); std::vector<std::string> r;
std::vector<std::string> tokens;
SplitStringAlongWhitespace(testString, &tokens); // Empty input handling.
r = SplitString(std::string(), ",", KEEP_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(5u, tokens.size()); EXPECT_TRUE(r.empty());
EXPECT_EQ("A", tokens[0]); r = SplitString(std::string(), ",", KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
EXPECT_EQ("B", tokens[1]); EXPECT_TRUE(r.empty());
EXPECT_EQ("C", tokens[2]);
EXPECT_EQ("DE", tokens[3]); // Input string is space and we're trimming.
EXPECT_EQ("FGH", tokens[4]); r = SplitString(" ", ",", TRIM_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(1u, r.size());
EXPECT_EQ("", r[0]);
r = SplitString(" ", ",", TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
EXPECT_TRUE(r.empty());
// Test all 4 combinations of flags on ", ,".
r = SplitString(", ,", ",", KEEP_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(3u, r.size());
EXPECT_EQ("", r[0]);
EXPECT_EQ(" ", r[1]);
EXPECT_EQ("", r[2]);
r = SplitString(", ,", ",", KEEP_WHITESPACE, SPLIT_WANT_NONEMPTY);
ASSERT_EQ(1u, r.size());
ASSERT_EQ(" ", r[0]);
r = SplitString(", ,", ",", TRIM_WHITESPACE, SPLIT_WANT_ALL);
ASSERT_EQ(3u, r.size());
EXPECT_EQ("", r[0]);
EXPECT_EQ("", r[1]);
EXPECT_EQ("", r[2]);
r = SplitString(", ,", ",", TRIM_WHITESPACE, SPLIT_WANT_NONEMPTY);
ASSERT_TRUE(r.empty());
}
// Tests for TrimString
TEST(StringUtilsTest, TrimString)
{
// Basic tests
EXPECT_EQ("a", TrimString("a", kWhitespaceASCII));
EXPECT_EQ("a", TrimString(" a", kWhitespaceASCII));
EXPECT_EQ("a", TrimString("a ", kWhitespaceASCII));
EXPECT_EQ("a", TrimString(" a ", kWhitespaceASCII));
// Tests with empty strings
EXPECT_EQ("", TrimString("", kWhitespaceASCII));
EXPECT_EQ("", TrimString(" \n\r\t", kWhitespaceASCII));
EXPECT_EQ(" foo ", TrimString(" foo ", ""));
// Tests it doesn't removes characters in the middle
EXPECT_EQ("foo bar", TrimString(" foo bar ", kWhitespaceASCII));
// Test with non-whitespace trimChars
EXPECT_EQ(" ", TrimString("foo bar", "abcdefghijklmnopqrstuvwxyz"));
} }
// Basic functionality tests for HexStringToUInt // Basic functionality tests for HexStringToUInt
......
...@@ -15,8 +15,8 @@ How to update from Chromium: ...@@ -15,8 +15,8 @@ How to update from Chromium:
* ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit``` * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
* Copy over Chromium files, ```git add . -u```, ```git commit``` * Copy over Chromium files, ```git add . -u```, ```git commit```
* ```git revert HEAD~2``` * ```git revert HEAD~```
* ```rm angle-mods.patch``` * ```rm angle-mods.patch```
* ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend``` * ```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. * ```git rebase -i``` to squash the three patches into one.
diff -u -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expectations/HowToMakeChanges.md diff --git a/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
--- gpu_test_expectations_reverted/HowToMakeChanges.md 1969-12-31 16:00:00.000000000 -0800 new file mode 100644
+++ gpu_test_expectations/HowToMakeChanges.md 2015-09-14 13:47:33.000000000 -0700 index 0000000..7817d0a
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/HowToMakeChanges.md
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
+Because the ```gpu_test_expectations``` directory is based on parts of Chromium's ```gpu/config`` +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 +directory, we want to keep a patch of the changes added to make it compile with ANGLE. This
...@@ -19,15 +21,17 @@ diff -u -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expect ...@@ -19,15 +21,17 @@ diff -u -rupN gpu_test_expectations_reverted/HowToMakeChanges.md gpu_test_expect
+ +
+ * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit``` + * ```git apply -R angle-mods.patch```, ```git add . -u```, ```git commit```
+ * Copy over Chromium files, ```git add . -u```, ```git commit``` + * Copy over Chromium files, ```git add . -u```, ```git commit```
+ * ```git revert HEAD~2``` + * ```git revert HEAD~```
+ * ```rm angle-mods.patch``` + * ```rm angle-mods.patch```
+ * ```git diff HEAD~1 (`)ls(`) > angle-mods.patch```,```git add angle-mods.patch```, ```git commit --amend``` + * ```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. + * ```git rebase -i``` to squash the three patches into one.
+ +
diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectations/angle_config.h diff --git a/src/tests/third_party/gpu_test_expectations/angle_config.h b/src/tests/third_party/gpu_test_expectations/angle_config.h
--- gpu_test_expectations_reverted/angle_config.h 1969-12-31 16:00:00.000000000 -0800 new file mode 100644
+++ gpu_test_expectations/angle_config.h 2015-09-14 13:55:24.000000000 -0700 index 0000000..3d7b20c
@@ -0,0 +1,57 @@ --- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/angle_config.h
@@ -0,0 +1,62 @@
+// +//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved. +// Copyright 2015 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be +// Use of this source code is governed by a BSD-style license that can be
...@@ -59,13 +63,18 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation ...@@ -59,13 +63,18 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation
+typedef int64_t int64; +typedef int64_t int64;
+typedef uint64_t uint64; +typedef uint64_t uint64;
+ +
+// Shim Chromium's base by importing functions in the bsae namespace. +// Shim Chromium's base by importing functions in the base namespace.
+namespace base +namespace base
+{ +{
+ using angle::HexStringToUInt; + using angle::kWhitespaceASCII;
+ using angle::ReadFileToString; + using angle::TRIM_WHITESPACE;
+ using angle::KEEP_WHITESPACE;
+ using angle::SPLIT_WANT_ALL;
+ using angle::SPLIT_WANT_NONEMPTY;
+ using angle::SplitString; + using angle::SplitString;
+ using angle::SplitStringAlongWhitespace; + using angle::SplitStringAlongWhitespace;
+ using angle::HexStringToUInt;
+ using angle::ReadFileToString;
+ +
+ // StringPrintf is called differently in ANGLE but using cannot change + // StringPrintf is called differently in ANGLE but using cannot change
+ // the name of the imported function. Use a define to change the name. + // the name of the imported function. Use a define to change the name.
...@@ -85,9 +94,10 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation ...@@ -85,9 +94,10 @@ diff -u -rupN gpu_test_expectations_reverted/angle_config.h gpu_test_expectation
+#endif +#endif
+ +
+#endif +#endif
diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/gpu_info.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.cc b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
--- gpu_test_expectations_reverted/gpu_info.cc 2015-09-14 13:46:54.000000000 -0700 index 23d5216..4f279a4 100644
+++ gpu_test_expectations/gpu_info.cc 2015-07-21 08:22:04.000000000 -0700 --- a/src/tests/third_party/gpu_test_expectations/gpu_info.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_info.cc
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -97,7 +107,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -97,7 +107,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
namespace { namespace {
@@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUIn @@ -17,31 +17,6 @@ void EnumerateGPUDevice(const gpu::GPUInfo::GPUDevice& device,
enumerator->EndGPUDevice(); enumerator->EndGPUDevice();
} }
...@@ -129,19 +139,17 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -129,19 +139,17 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
} // namespace } // namespace
namespace gpu { namespace gpu {
@@ -66,23 +41,16 @@ GPUInfo::GPUInfo() @@ -68,9 +43,6 @@ GPUInfo::GPUInfo()
sandboxed(false), in_process_gpu(true),
process_crash_count(0),
basic_info_state(kCollectInfoNone), basic_info_state(kCollectInfoNone),
context_info_state(kCollectInfoNone),
-#if defined(OS_WIN) -#if defined(OS_WIN)
- context_info_state(kCollectInfoNone), - dx_diagnostics_info_state(kCollectInfoNone),
- dx_diagnostics_info_state(kCollectInfoNone) {
-#else
context_info_state(kCollectInfoNone) {
-#endif -#endif
jpeg_decode_accelerator_supported(false) {
} }
GPUInfo::~GPUInfo() { } @@ -78,11 +50,9 @@ GPUInfo::~GPUInfo() { }
void GPUInfo::EnumerateFields(Enumerator* enumerator) const { void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
struct GPUInfoKnownFields { struct GPUInfoKnownFields {
...@@ -153,8 +161,8 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -153,8 +161,8 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
GPUDevice gpu; GPUDevice gpu;
std::vector<GPUDevice> secondary_gpus; std::vector<GPUDevice> secondary_gpus;
uint64 adapter_luid; uint64 adapter_luid;
@@ -109,14 +77,6 @@ void GPUInfo::EnumerateFields(Enumerator @@ -110,14 +80,6 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
int process_crash_count; bool in_process_gpu;
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
-#if defined(OS_WIN) -#if defined(OS_WIN)
...@@ -165,10 +173,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -165,10 +173,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
- video_decode_accelerator_supported_profiles; - video_decode_accelerator_supported_profiles;
- VideoEncodeAcceleratorSupportedProfiles - VideoEncodeAcceleratorSupportedProfiles
- video_encode_accelerator_supported_profiles; - video_encode_accelerator_supported_profiles;
bool jpeg_decode_accelerator_supported;
}; };
// If this assert fails then most likely something below needs to be updated. @@ -136,15 +98,9 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
@@ -134,15 +94,9 @@ void GPUInfo::EnumerateFields(Enumerator
EnumerateGPUDevice(secondary_gpu, enumerator); EnumerateGPUDevice(secondary_gpu, enumerator);
enumerator->BeginAuxAttributes(); enumerator->BeginAuxAttributes();
...@@ -184,24 +192,25 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g ...@@ -184,24 +192,25 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.cc gpu_test_expectations/g
enumerator->AddInt64("adapterLuid", adapter_luid); enumerator->AddInt64("adapterLuid", adapter_luid);
enumerator->AddString("driverVendor", driver_vendor); enumerator->AddString("driverVendor", driver_vendor);
enumerator->AddString("driverVersion", driver_version); enumerator->AddString("driverVersion", driver_version);
@@ -168,14 +122,6 @@ void GPUInfo::EnumerateFields(Enumerator @@ -171,14 +127,7 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddInt("processCrashCount", process_crash_count); enumerator->AddBool("inProcessGpu", in_process_gpu);
enumerator->AddInt("basicInfoState", basic_info_state); enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state); enumerator->AddInt("contextInfoState", context_info_state);
-#if defined(OS_WIN) -#if defined(OS_WIN)
- enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state); - enumerator->AddInt("DxDiagnosticsInfoState", dx_diagnostics_info_state);
-#endif -#endif
- // TODO(kbr): add dx_diagnostics on Windows. // TODO(kbr): add dx_diagnostics on Windows.
- for (const auto& profile : video_decode_accelerator_supported_profiles) - for (const auto& profile : video_decode_accelerator_supported_profiles)
- EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator); - EnumerateVideoDecodeAcceleratorSupportedProfile(profile, enumerator);
- for (const auto& profile : video_encode_accelerator_supported_profiles) - for (const auto& profile : video_encode_accelerator_supported_profiles)
- EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator); - EnumerateVideoEncodeAcceleratorSupportedProfile(profile, enumerator);
enumerator->AddBool("jpegDecodeAcceleratorSupported",
jpeg_decode_accelerator_supported);
enumerator->EndAuxAttributes(); enumerator->EndAuxAttributes();
} diff --git a/src/tests/third_party/gpu_test_expectations/gpu_info.h b/src/tests/third_party/gpu_test_expectations/gpu_info.h
index d6f61fd..0a7f9aa 100644
diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gpu_info.h --- a/src/tests/third_party/gpu_test_expectations/gpu_info.h
--- gpu_test_expectations_reverted/gpu_info.h 2015-09-14 13:46:54.000000000 -0700 +++ b/src/tests/third_party/gpu_test_expectations/gpu_info.h
+++ gpu_test_expectations/gpu_info.h 2015-07-21 08:22:04.000000000 -0700
@@ -11,13 +11,7 @@ @@ -11,13 +11,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -265,25 +274,25 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp ...@@ -265,25 +274,25 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
// Primary GPU, for exmaple, the discrete GPU in a dual GPU machine. // Primary GPU, for exmaple, the discrete GPU in a dual GPU machine.
GPUDevice gpu; GPUDevice gpu;
@@ -210,17 +177,7 @@ struct GPU_EXPORT GPUInfo { @@ -213,17 +180,7 @@ struct GPU_EXPORT GPUInfo {
// if the collection fails or not. // if the collection fails or not.
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
-#if defined(OS_WIN) -#if defined(OS_WIN)
- CollectInfoResult dx_diagnostics_info_state; - CollectInfoResult dx_diagnostics_info_state;
-
- // The information returned by the DirectX Diagnostics Tool. - // The information returned by the DirectX Diagnostics Tool.
- DxDiagNode dx_diagnostics; - DxDiagNode dx_diagnostics;
-#endif -#endif
-
- VideoDecodeAcceleratorSupportedProfiles - VideoDecodeAcceleratorSupportedProfiles
- video_decode_accelerator_supported_profiles; - video_decode_accelerator_supported_profiles;
- VideoEncodeAcceleratorSupportedProfiles - VideoEncodeAcceleratorSupportedProfiles
- video_encode_accelerator_supported_profiles; - video_encode_accelerator_supported_profiles;
// Note: when adding new members, please remember to update EnumerateFields bool jpeg_decode_accelerator_supported;
// in gpu_info.cc.
@@ -238,8 +195,6 @@ struct GPU_EXPORT GPUInfo { // Note: when adding new members, please remember to update EnumerateFields
@@ -243,8 +200,6 @@ struct GPU_EXPORT GPUInfo {
virtual void AddInt(const char* name, int value) = 0; virtual void AddInt(const char* name, int value) = 0;
virtual void AddString(const char* name, const std::string& value) = 0; virtual void AddString(const char* name, const std::string& value) = 0;
virtual void AddBool(const char* name, bool value) = 0; virtual void AddBool(const char* name, bool value) = 0;
...@@ -292,9 +301,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp ...@@ -292,9 +301,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_info.h gpu_test_expectations/gp
// Markers indicating that a GPUDevice is being described. // Markers indicating that a GPUDevice is being described.
virtual void BeginGPUDevice() = 0; virtual void BeginGPUDevice() = 0;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expectations/gpu_test_config.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
--- gpu_test_expectations_reverted/gpu_test_config.cc 2015-09-14 13:46:54.000000000 -0700 index a7cc4b4..f8571d4 100644
+++ gpu_test_expectations/gpu_test_config.cc 2015-09-15 10:12:23.000000000 -0700 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.cc
@@ -2,18 +2,193 @@ @@ -2,18 +2,193 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -498,7 +508,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta ...@@ -498,7 +508,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
#endif #endif
namespace gpu { namespace gpu {
@@ -292,21 +467,5 @@ bool GPUTestBotConfig::CurrentConfigMatc @@ -295,21 +470,5 @@ bool GPUTestBotConfig::CurrentConfigMatches(
return false; return false;
} }
...@@ -520,9 +530,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta ...@@ -520,9 +530,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.cc gpu_test_expecta
- -
} // namespace gpu } // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectations/gpu_test_config.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
--- gpu_test_expectations_reverted/gpu_test_config.h 2015-09-14 13:46:54.000000000 -0700 index b5431e6..4cbc2c0 100644
+++ gpu_test_expectations/gpu_test_config.h 2015-08-11 13:26:51.000000000 -0700 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config.h
@@ -8,9 +8,7 @@ @@ -8,9 +8,7 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -534,7 +545,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat ...@@ -534,7 +545,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
namespace gpu { namespace gpu {
@@ -132,9 +130,6 @@ class GPU_EXPORT GPUTestBotConfig : publ @@ -134,9 +132,6 @@ class GPU_EXPORT GPUTestBotConfig : public GPUTestConfig {
// Check if this bot's config matches |config_data| or any of the |configs|. // Check if this bot's config matches |config_data| or any of the |configs|.
static bool CurrentConfigMatches(const std::string& config_data); static bool CurrentConfigMatches(const std::string& config_data);
static bool CurrentConfigMatches(const std::vector<std::string>& configs); static bool CurrentConfigMatches(const std::vector<std::string>& configs);
...@@ -544,9 +555,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat ...@@ -544,9 +555,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config.h gpu_test_expectat
}; };
} // namespace gpu } // namespace gpu
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.h gpu_test_expectations/gpu_test_config_mac.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h
--- gpu_test_expectations_reverted/gpu_test_config_mac.h 1969-12-31 16:00:00.000000000 -0800 new file mode 100644
+++ gpu_test_expectations/gpu_test_config_mac.h 2015-09-15 10:12:29.000000000 -0700 index 0000000..da22bd6
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.h
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+// +//
+// Copyright 2015 The ANGLE Project Authors. All rights reserved. +// Copyright 2015 The ANGLE Project Authors. All rights reserved.
...@@ -576,9 +589,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.h gpu_test_expe ...@@ -576,9 +589,11 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.h gpu_test_expe
+gpu::GPUInfo::GPUDevice GetActiveGPU(); +gpu::GPUInfo::GPUDevice GetActiveGPU();
+ +
+#endif // GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_ +#endif // GPU_TEST_EXPECTATIONS_GPU_TEST_CONFIG_MAC_H_
diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.mm gpu_test_expectations/gpu_test_config_mac.mm diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm
--- gpu_test_expectations_reverted/gpu_test_config_mac.mm 1969-12-31 16:00:00.000000000 -0800 new file mode 100644
+++ gpu_test_expectations/gpu_test_config_mac.mm 2015-09-15 12:49:51.000000000 -0700 index 0000000..8cbd498
--- /dev/null
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_config_mac.mm
@@ -0,0 +1,67 @@ @@ -0,0 +1,67 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be +// Use of this source code is governed by a BSD-style license that can be
...@@ -647,9 +662,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.mm gpu_test_exp ...@@ -647,9 +662,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_config_mac.mm gpu_test_exp
+ return gpu; + return gpu;
+} +}
+ +
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu_test_expectations/gpu_test_expectations_parser.cc diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.cc 2015-09-14 13:46:54.000000000 -0700 index 6dac74e..23c4d8c 100644
+++ gpu_test_expectations/gpu_test_expectations_parser.cc 2015-08-24 13:06:46.000000000 -0700 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.cc
@@ -2,14 +2,43 @@ @@ -2,14 +2,43 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -701,7 +717,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -701,7 +717,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
namespace gpu { namespace gpu {
@@ -144,9 +173,9 @@ const char* kErrorMessage[] = { @@ -146,9 +175,9 @@ const char* kErrorMessage[] = {
}; };
Token ParseToken(const std::string& word) { Token ParseToken(const std::string& word) {
...@@ -713,7 +729,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -713,7 +729,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
return kConfigGPUDeviceID; return kConfigGPUDeviceID;
for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) { for (int32 i = 0; i < kNumberOfExactMatchTokens; ++i) {
@@ -174,10 +203,10 @@ bool NamesMatching(const std::string& re @@ -176,10 +205,10 @@ bool NamesMatching(const std::string& ref, const std::string& test_name) {
GPUTestExpectationsParser::GPUTestExpectationsParser() { GPUTestExpectationsParser::GPUTestExpectationsParser() {
// Some sanity check. // Some sanity check.
...@@ -728,7 +744,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -728,7 +744,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
} }
GPUTestExpectationsParser::~GPUTestExpectationsParser() { GPUTestExpectationsParser::~GPUTestExpectationsParser() {
@@ -202,8 +231,8 @@ bool GPUTestExpectationsParser::LoadTest @@ -204,8 +233,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) {
return rt; return rt;
} }
...@@ -739,7 +755,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -739,7 +755,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
entries_.clear(); entries_.clear();
error_messages_.clear(); error_messages_.clear();
@@ -393,7 +422,7 @@ bool GPUTestExpectationsParser::ParseLin @@ -399,7 +428,7 @@ bool GPUTestExpectationsParser::ParseLine(
stage++; stage++;
break; break;
default: default:
...@@ -748,7 +764,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -748,7 +764,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break; break;
} }
} }
@@ -481,7 +510,7 @@ bool GPUTestExpectationsParser::UpdateTe @@ -488,7 +517,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
config->set_api(config->api() | kTokenData[token].flag); config->set_api(config->api() | kTokenData[token].flag);
break; break;
default: default:
...@@ -757,9 +773,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu ...@@ -757,9 +773,10 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.cc gpu
break; break;
} }
return true; return true;
diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_test_expectations/gpu_test_expectations_parser.h diff --git a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
--- gpu_test_expectations_reverted/gpu_test_expectations_parser.h 2015-09-14 13:46:54.000000000 -0700 index a69f7e9..a112700 100644
+++ gpu_test_expectations/gpu_test_expectations_parser.h 2015-07-21 08:22:04.000000000 -0700 --- a/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
+++ b/src/tests/third_party/gpu_test_expectations/gpu_test_expectations_parser.h
@@ -8,10 +8,8 @@ @@ -8,10 +8,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -773,7 +790,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_ ...@@ -773,7 +790,7 @@ diff -u -rupN gpu_test_expectations_reverted/gpu_test_expectations_parser.h gpu_
namespace gpu { namespace gpu {
@@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsPars @@ -32,7 +30,7 @@ class GPU_EXPORT GPUTestExpectationsParser {
// save all the entries. Otherwise, generate error messages. // save all the entries. Otherwise, generate error messages.
// Return true if parsing succeeds. // Return true if parsing succeeds.
bool LoadTestExpectations(const std::string& data); bool LoadTestExpectations(const std::string& data);
......
...@@ -29,13 +29,18 @@ typedef uint32_t uint32; ...@@ -29,13 +29,18 @@ typedef uint32_t uint32;
typedef int64_t int64; typedef int64_t int64;
typedef uint64_t uint64; typedef uint64_t uint64;
// Shim Chromium's base by importing functions in the bsae namespace. // Shim Chromium's base by importing functions in the base namespace.
namespace base namespace base
{ {
using angle::HexStringToUInt; using angle::kWhitespaceASCII;
using angle::ReadFileToString; using angle::TRIM_WHITESPACE;
using angle::KEEP_WHITESPACE;
using angle::SPLIT_WANT_ALL;
using angle::SPLIT_WANT_NONEMPTY;
using angle::SplitString; using angle::SplitString;
using angle::SplitStringAlongWhitespace; using angle::SplitStringAlongWhitespace;
using angle::HexStringToUInt;
using angle::ReadFileToString;
// StringPrintf is called differently in ANGLE but using cannot change // StringPrintf is called differently in ANGLE but using cannot change
// the name of the imported function. Use a define to change the name. // the name of the imported function. Use a define to change the name.
......
...@@ -40,8 +40,10 @@ GPUInfo::GPUInfo() ...@@ -40,8 +40,10 @@ GPUInfo::GPUInfo()
direct_rendering(true), direct_rendering(true),
sandboxed(false), sandboxed(false),
process_crash_count(0), process_crash_count(0),
in_process_gpu(true),
basic_info_state(kCollectInfoNone), basic_info_state(kCollectInfoNone),
context_info_state(kCollectInfoNone) { context_info_state(kCollectInfoNone),
jpeg_decode_accelerator_supported(false) {
} }
GPUInfo::~GPUInfo() { } GPUInfo::~GPUInfo() { }
...@@ -75,8 +77,10 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { ...@@ -75,8 +77,10 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
bool direct_rendering; bool direct_rendering;
bool sandboxed; bool sandboxed;
int process_crash_count; int process_crash_count;
bool in_process_gpu;
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
bool jpeg_decode_accelerator_supported;
}; };
// If this assert fails then most likely something below needs to be updated. // If this assert fails then most likely something below needs to be updated.
...@@ -120,8 +124,12 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const { ...@@ -120,8 +124,12 @@ void GPUInfo::EnumerateFields(Enumerator* enumerator) const {
enumerator->AddBool("directRendering", direct_rendering); enumerator->AddBool("directRendering", direct_rendering);
enumerator->AddBool("sandboxed", sandboxed); enumerator->AddBool("sandboxed", sandboxed);
enumerator->AddInt("processCrashCount", process_crash_count); enumerator->AddInt("processCrashCount", process_crash_count);
enumerator->AddBool("inProcessGpu", in_process_gpu);
enumerator->AddInt("basicInfoState", basic_info_state); enumerator->AddInt("basicInfoState", basic_info_state);
enumerator->AddInt("contextInfoState", context_info_state); enumerator->AddInt("contextInfoState", context_info_state);
// TODO(kbr): add dx_diagnostics on Windows.
enumerator->AddBool("jpegDecodeAcceleratorSupported",
jpeg_decode_accelerator_supported);
enumerator->EndAuxAttributes(); enumerator->EndAuxAttributes();
} }
......
...@@ -173,11 +173,16 @@ struct GPU_EXPORT GPUInfo { ...@@ -173,11 +173,16 @@ struct GPU_EXPORT GPUInfo {
// Number of GPU process crashes recorded. // Number of GPU process crashes recorded.
int process_crash_count; int process_crash_count;
// True if the GPU is running in the browser process instead of its own.
bool in_process_gpu;
// The state of whether the basic/context/DxDiagnostics info is collected and // The state of whether the basic/context/DxDiagnostics info is collected and
// if the collection fails or not. // if the collection fails or not.
CollectInfoResult basic_info_state; CollectInfoResult basic_info_state;
CollectInfoResult context_info_state; CollectInfoResult context_info_state;
bool jpeg_decode_accelerator_supported;
// Note: when adding new members, please remember to update EnumerateFields // Note: when adding new members, please remember to update EnumerateFields
// in gpu_info.cc. // in gpu_info.cc.
......
...@@ -236,6 +236,8 @@ GPUTestConfig::OS GetCurrentOS() { ...@@ -236,6 +236,8 @@ GPUTestConfig::OS GetCurrentOS() {
return GPUTestConfig::kOsMacMavericks; return GPUTestConfig::kOsMacMavericks;
case 10: case 10:
return GPUTestConfig::kOsMacYosemite; return GPUTestConfig::kOsMacYosemite;
case 11:
return GPUTestConfig::kOsMacElCapitan;
} }
} }
#elif defined(OS_ANDROID) #elif defined(OS_ANDROID)
...@@ -358,6 +360,7 @@ bool GPUTestBotConfig::IsValid() const { ...@@ -358,6 +360,7 @@ bool GPUTestBotConfig::IsValid() const {
case kOsMacMountainLion: case kOsMacMountainLion:
case kOsMacMavericks: case kOsMacMavericks:
case kOsMacYosemite: case kOsMacYosemite:
case kOsMacElCapitan:
case kOsLinux: case kOsLinux:
case kOsChromeOS: case kOsChromeOS:
case kOsAndroid: case kOsAndroid:
......
...@@ -28,12 +28,14 @@ class GPU_EXPORT GPUTestConfig { ...@@ -28,12 +28,14 @@ class GPU_EXPORT GPUTestConfig {
kOsMacMountainLion = 1 << 7, kOsMacMountainLion = 1 << 7,
kOsMacMavericks = 1 << 8, kOsMacMavericks = 1 << 8,
kOsMacYosemite = 1 << 9, kOsMacYosemite = 1 << 9,
kOsMacElCapitan = 1 << 10,
kOsMac = kOsMacLeopard | kOsMacSnowLeopard | kOsMacLion | kOsMac = kOsMacLeopard | kOsMacSnowLeopard | kOsMacLion |
kOsMacMountainLion | kOsMacMavericks | kOsMacYosemite, kOsMacMountainLion | kOsMacMavericks | kOsMacYosemite |
kOsLinux = 1 << 10, kOsMacElCapitan,
kOsChromeOS = 1 << 11, kOsLinux = 1 << 11,
kOsAndroid = 1 << 12, kOsChromeOS = 1 << 12,
kOsWin10 = 1 << 13, kOsAndroid = 1 << 13,
kOsWin10 = 1 << 14,
kOsWin = kOsWinXP | kOsWinVista | kOsWin7 | kOsWin8 | kOsWin10, kOsWin = kOsWinXP | kOsWinVista | kOsWin7 | kOsWin8 | kOsWin10,
}; };
......
...@@ -68,6 +68,7 @@ enum Token { ...@@ -68,6 +68,7 @@ enum Token {
kConfigMacMountainLion, kConfigMacMountainLion,
kConfigMacMavericks, kConfigMacMavericks,
kConfigMacYosemite, kConfigMacYosemite,
kConfigMacElCapitan,
kConfigMac, kConfigMac,
kConfigLinux, kConfigLinux,
kConfigChromeOS, kConfigChromeOS,
...@@ -121,6 +122,7 @@ const TokenInfo kTokenData[] = { ...@@ -121,6 +122,7 @@ const TokenInfo kTokenData[] = {
{"mountainlion", GPUTestConfig::kOsMacMountainLion}, {"mountainlion", GPUTestConfig::kOsMacMountainLion},
{"mavericks", GPUTestConfig::kOsMacMavericks}, {"mavericks", GPUTestConfig::kOsMacMavericks},
{"yosemite", GPUTestConfig::kOsMacYosemite}, {"yosemite", GPUTestConfig::kOsMacYosemite},
{"elcapitan", GPUTestConfig::kOsMacElCapitan},
{"mac", GPUTestConfig::kOsMac}, {"mac", GPUTestConfig::kOsMac},
{"linux", GPUTestConfig::kOsLinux}, {"linux", GPUTestConfig::kOsLinux},
{"chromeos", GPUTestConfig::kOsChromeOS}, {"chromeos", GPUTestConfig::kOsChromeOS},
...@@ -216,8 +218,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) { ...@@ -216,8 +218,8 @@ bool GPUTestExpectationsParser::LoadTestExpectations(const std::string& data) {
entries_.clear(); entries_.clear();
error_messages_.clear(); error_messages_.clear();
std::vector<std::string> lines; std::vector<std::string> lines = base::SplitString(
base::SplitString(data, '\n', &lines); data, "\n", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
bool rt = true; bool rt = true;
for (size_t i = 0; i < lines.size(); ++i) { for (size_t i = 0; i < lines.size(); ++i) {
if (!ParseLine(lines[i], i + 1)) if (!ParseLine(lines[i], i + 1))
...@@ -263,8 +265,9 @@ GPUTestExpectationsParser::GetErrorMessages() const { ...@@ -263,8 +265,9 @@ GPUTestExpectationsParser::GetErrorMessages() const {
bool GPUTestExpectationsParser::ParseConfig( bool GPUTestExpectationsParser::ParseConfig(
const std::string& config_data, GPUTestConfig* config) { const std::string& config_data, GPUTestConfig* config) {
DCHECK(config); DCHECK(config);
std::vector<std::string> tokens; std::vector<std::string> tokens = base::SplitString(
base::SplitStringAlongWhitespace(config_data, &tokens); config_data, base::kWhitespaceASCII, base::KEEP_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
for (size_t i = 0; i < tokens.size(); ++i) { for (size_t i = 0; i < tokens.size(); ++i) {
Token token = ParseToken(tokens[i]); Token token = ParseToken(tokens[i]);
...@@ -281,6 +284,7 @@ bool GPUTestExpectationsParser::ParseConfig( ...@@ -281,6 +284,7 @@ bool GPUTestExpectationsParser::ParseConfig(
case kConfigMacMountainLion: case kConfigMacMountainLion:
case kConfigMacMavericks: case kConfigMacMavericks:
case kConfigMacYosemite: case kConfigMacYosemite:
case kConfigMacElCapitan:
case kConfigMac: case kConfigMac:
case kConfigLinux: case kConfigLinux:
case kConfigChromeOS: case kConfigChromeOS:
...@@ -313,8 +317,9 @@ bool GPUTestExpectationsParser::ParseConfig( ...@@ -313,8 +317,9 @@ bool GPUTestExpectationsParser::ParseConfig(
bool GPUTestExpectationsParser::ParseLine( bool GPUTestExpectationsParser::ParseLine(
const std::string& line_data, size_t line_number) { const std::string& line_data, size_t line_number) {
std::vector<std::string> tokens; std::vector<std::string> tokens = base::SplitString(
base::SplitStringAlongWhitespace(line_data, &tokens); line_data, base::kWhitespaceASCII, base::KEEP_WHITESPACE,
base::SPLIT_WANT_NONEMPTY);
int32 stage = kLineParserBegin; int32 stage = kLineParserBegin;
GPUTestExpectationEntry entry; GPUTestExpectationEntry entry;
entry.line_number = line_number; entry.line_number = line_number;
...@@ -338,6 +343,7 @@ bool GPUTestExpectationsParser::ParseLine( ...@@ -338,6 +343,7 @@ bool GPUTestExpectationsParser::ParseLine(
case kConfigMacMountainLion: case kConfigMacMountainLion:
case kConfigMacMavericks: case kConfigMacMavericks:
case kConfigMacYosemite: case kConfigMacYosemite:
case kConfigMacElCapitan:
case kConfigMac: case kConfigMac:
case kConfigLinux: case kConfigLinux:
case kConfigChromeOS: case kConfigChromeOS:
...@@ -458,6 +464,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig( ...@@ -458,6 +464,7 @@ bool GPUTestExpectationsParser::UpdateTestConfig(
case kConfigMacMountainLion: case kConfigMacMountainLion:
case kConfigMacMavericks: case kConfigMacMavericks:
case kConfigMacYosemite: case kConfigMacYosemite:
case kConfigMacElCapitan:
case kConfigMac: case kConfigMac:
case kConfigLinux: case kConfigLinux:
case kConfigChromeOS: case kConfigChromeOS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment