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

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

Issue 474523003: Enable command line arguments for GLES2 CTS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased with arg change 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 | gpu/gles2_conform_support/native/main.cc » ('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 <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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) { 56 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) {
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* currentCmdLine = CommandLine::ForCurrentProcess();
66 CommandLine cmdline(program); 67 CommandLine cmdline(program);
68 cmdline.AppendArguments(*currentCmdLine, false);
69 cmdline.AppendSwitch(std::string("--"));
67 cmdline.AppendArg(std::string("-run=") + path); 70 cmdline.AppendArg(std::string("-run=") + path);
68 71
69 std::string output; 72 std::string output;
70 bool success = base::GetAppOutput(cmdline, &output); 73 bool success = base::GetAppOutput(cmdline, &output);
71 if (success) { 74 if (success) {
72 size_t success_index = output.find("Conformance PASSED all"); 75 size_t success_index = output.find("Conformance PASSED all");
73 size_t failed_index = output.find("FAILED"); 76 size_t failed_index = output.find("FAILED");
74 success = (success_index != std::string::npos) && 77 success = (success_index != std::string::npos) &&
75 (failed_index == std::string::npos); 78 (failed_index == std::string::npos);
76 } 79 }
77 if (!success) { 80 if (!success) {
78 LOG(ERROR) << output; 81 LOG(ERROR) << output;
79 } 82 }
80 return success; 83 return success;
81 } 84 }
82 85
83 int main(int argc, char** argv) { 86 int main(int argc, char** argv) {
84 base::AtExitManager exit_manager; 87 base::AtExitManager exit_manager;
88 CommandLine::Init(argc, argv);
85 #if defined(OS_MACOSX) 89 #if defined(OS_MACOSX)
86 base::mac::ScopedNSAutoreleasePool pool; 90 base::mac::ScopedNSAutoreleasePool pool;
87 #endif 91 #endif
88 ::testing::InitGoogleTest(&argc, argv); 92 ::testing::InitGoogleTest(&argc, argv);
89 return RUN_ALL_TESTS(); 93 return RUN_ALL_TESTS();
90 } 94 }
91 95
92 96
93 97
OLDNEW
« no previous file with comments | « no previous file | gpu/gles2_conform_support/native/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698