Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: gpu/gles2_conform_support/gles2_conform_test.cc

Issue 2259523002: Fix gles2_conform_test failures when Mac switching to core profile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | ui/gl/gl_version_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/gles2_conform_support/gles2_conform_test.h" 5 #include "gpu/gles2_conform_support/gles2_conform_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 PathService::Get(base::DIR_EXE, &test_path); 104 PathService::Get(base::DIR_EXE, &test_path);
105 base::FilePath program(test_path.Append(FILE_PATH_LITERAL( 105 base::FilePath program(test_path.Append(FILE_PATH_LITERAL(
106 "gles2_conform_test_windowless"))); 106 "gles2_conform_test_windowless")));
107 107
108 base::CommandLine cmd_line(program); 108 base::CommandLine cmd_line(program);
109 cmd_line.AppendArguments(*current_cmd_line, false); 109 cmd_line.AppendArguments(*current_cmd_line, false);
110 cmd_line.AppendSwitch(std::string("--")); 110 cmd_line.AppendSwitch(std::string("--"));
111 cmd_line.AppendArg(std::string("-run=") + path); 111 cmd_line.AppendArg(std::string("-run=") + path);
112 112
113 std::string output; 113 std::string output;
114 bool success = base::GetAppOutput(cmd_line, &output); 114 bool success = base::GetAppOutputAndError(cmd_line, &output);
115 if (success) { 115 if (success) {
116 size_t success_index = output.find("Conformance PASSED all"); 116 size_t success_index = output.find("Conformance PASSED all");
117 size_t failed_index = output.find("FAILED"); 117 size_t failed_index = output.find("FAILED");
118 success = (success_index != std::string::npos) && 118 success = (success_index != std::string::npos) &&
119 (failed_index == std::string::npos); 119 (failed_index == std::string::npos);
120 } 120 }
121 if (!success) { 121 if (!success) {
122 LOG(ERROR) << output; 122 LOG(ERROR) << output;
123 } 123 }
124 return success; 124 return success;
125 } 125 }
126 126
127 int main(int argc, char** argv) { 127 int main(int argc, char** argv) {
128 base::CommandLine::Init(argc, argv); 128 base::CommandLine::Init(argc, argv);
129 #if defined(OS_MACOSX) 129 #if defined(OS_MACOSX)
130 base::mac::ScopedNSAutoreleasePool pool; 130 base::mac::ScopedNSAutoreleasePool pool;
131 #endif 131 #endif
132 ::testing::InitGoogleTest(&argc, argv); 132 ::testing::InitGoogleTest(&argc, argv);
133 base::TestSuite test_suite(argc, argv); 133 base::TestSuite test_suite(argc, argv);
134 int rt = base::LaunchUnitTestsSerially( 134 int rt = base::LaunchUnitTestsSerially(
135 argc, 135 argc,
136 argv, 136 argv,
137 base::Bind(&RunHelper, base::Unretained(&test_suite))); 137 base::Bind(&RunHelper, base::Unretained(&test_suite)));
138 return rt; 138 return rt;
139 } 139 }
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | ui/gl/gl_version_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698