Skip to content

Commit

Permalink
Apply the bot config api based on the command line arguments.
Browse files Browse the repository at this point in the history
Allows for expectations based on the ANGLE renderer.

BUG=490149

Review URL: https://codereview.chromium.org/1277253002

Cr-Commit-Position: refs/heads/master@{#345331}
  • Loading branch information
vonture authored and Commit bot committed Aug 25, 2015
1 parent 091f125 commit 68c9284
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
31 changes: 30 additions & 1 deletion gpu/gles2_conform_support/gles2_conform_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,36 @@ bool RunGLES2ConformTest(const char* path) {
LOG(ERROR) << "Fail to load bot configuration";
return false;
}

// Set the bot config api based on the OS and command line
base::CommandLine* current_cmd_line = base::CommandLine::ForCurrentProcess();
int32 config_os = bot_config.os();
if ((config_os & gpu::GPUTestConfig::kOsWin) != 0) {
std::string angle_renderer =
current_cmd_line->HasSwitch("use-angle")
? current_cmd_line->GetSwitchValueASCII("use-angle")
: "d3d11";
if (angle_renderer == "d3d11") {
bot_config.set_api(gpu::GPUTestConfig::kAPID3D11);
} else if (angle_renderer == "d3d9") {
bot_config.set_api(gpu::GPUTestConfig::kAPID3D9);
} else if (angle_renderer == "gl") {
bot_config.set_api(gpu::GPUTestConfig::kAPIGLDesktop);
} else if (angle_renderer == "gles") {
bot_config.set_api(gpu::GPUTestConfig::kAPIGLES);
} else {
bot_config.set_api(gpu::GPUTestConfig::kAPIUnknown);
}
} else if ((config_os & gpu::GPUTestConfig::kOsMac) != 0 ||
config_os == gpu::GPUTestConfig::kOsLinux) {
bot_config.set_api(gpu::GPUTestConfig::kAPIGLDesktop);
} else if (config_os == gpu::GPUTestConfig::kOsChromeOS ||
config_os == gpu::GPUTestConfig::kOsAndroid) {
bot_config.set_api(gpu::GPUTestConfig::kAPIGLES);
} else {
bot_config.set_api(gpu::GPUTestConfig::kAPIUnknown);
}

if (!bot_config.IsValid()) {
LOG(ERROR) << "Invalid bot configuration";
return false;
Expand All @@ -63,7 +93,6 @@ bool RunGLES2ConformTest(const char* path) {
base::FilePath program(test_path.Append(FILE_PATH_LITERAL(
"gles2_conform_test_windowless")));

base::CommandLine* currentCmdLine = base::CommandLine::ForCurrentProcess();
base::CommandLine cmdline(program);
cmdline.AppendArguments(*currentCmdLine, false);
cmdline.AppendSwitch(std::string("--"));
Expand Down
8 changes: 8 additions & 0 deletions gpu/gles2_conform_support/gles2_conform_test_expectations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@
// 91531 MAC WIN LINUX : conformance_more_* = SKIP
// 91532 MAC NVIDIA 0x0640 : tex_image_and_sub_image_2d_with_video = PASS FAIL

517966 WIN OPENGL : GL2FixedTests_blend_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_buffer_clear_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_buffer_color_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_copy_texture_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_depth_buffer_clear_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_stencil_plane_clear_input_run = FAIL
517966 WIN OPENGL : GL2FixedTests_user_clip_planes_input_run = FAIL

253674 LION INTEL : GL2ExtensionTests_dFdy_input_run = FAIL
253674 LION INTEL : GL2FixedTests_point_sprites_input_run = FAIL
253674 LION INTEL : GL_control_flow_input_run = FAIL
Expand Down

0 comments on commit 68c9284

Please sign in to comment.