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

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

Issue 500133005: Fix broken path in GLES2 CTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | 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 <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 LOG(WARNING) << "Test " << test_name << " is bypassed"; 57 LOG(WARNING) << "Test " << test_name << " is bypassed";
58 return true; 58 return true;
59 } 59 }
60 60
61 base::FilePath test_path; 61 base::FilePath test_path;
62 PathService::Get(base::DIR_EXE, &test_path); 62 PathService::Get(base::DIR_EXE, &test_path);
63 base::FilePath program(test_path.Append(FILE_PATH_LITERAL( 63 base::FilePath program(test_path.Append(FILE_PATH_LITERAL(
64 "gles2_conform_test_windowless"))); 64 "gles2_conform_test_windowless")));
65 65
66 CommandLine cmdline(program); 66 CommandLine cmdline(program);
67 cmdline.AppendSwitch(std::string("-run=") + path); 67 cmdline.AppendArg(std::string("-run=") + path);
68 68
69 std::string output; 69 std::string output;
70 bool success = base::GetAppOutput(cmdline, &output); 70 bool success = base::GetAppOutput(cmdline, &output);
71 if (success) { 71 if (success) {
72 size_t success_index = output.find("Conformance PASSED all"); 72 size_t success_index = output.find("Conformance PASSED all");
73 size_t failed_index = output.find("FAILED"); 73 size_t failed_index = output.find("FAILED");
74 success = (success_index != std::string::npos) && 74 success = (success_index != std::string::npos) &&
75 (failed_index == std::string::npos); 75 (failed_index == std::string::npos);
76 } 76 }
77 if (!success) { 77 if (!success) {
78 LOG(ERROR) << output; 78 LOG(ERROR) << output;
79 } 79 }
80 return success; 80 return success;
81 } 81 }
82 82
83 int main(int argc, char** argv) { 83 int main(int argc, char** argv) {
84 base::AtExitManager exit_manager; 84 base::AtExitManager exit_manager;
85 #if defined(OS_MACOSX) 85 #if defined(OS_MACOSX)
86 base::mac::ScopedNSAutoreleasePool pool; 86 base::mac::ScopedNSAutoreleasePool pool;
87 #endif 87 #endif
88 ::testing::InitGoogleTest(&argc, argv); 88 ::testing::InitGoogleTest(&argc, argv);
89 return RUN_ALL_TESTS(); 89 return RUN_ALL_TESTS();
90 } 90 }
91 91
92 92
93 93
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698