Commit 40bc90fe authored by Scott Violet's avatar Scott Violet Committed by Commit Bot

chromeos: forces kOverrideUseSoftwareGLForTests for ash_unittests

Without this tests that try to connect to ash a service hang. I get the
following gl errors:

libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
[171208:171216:0802/122357.849400:5628725490183:ERROR:gl_context_glx.cc(227)] Couldn't make context current with X drawable.
[171208:171216:0802/122357.849448:5628725490229:ERROR:gpu_info_collector.cc(68)] gl::GLContext::MakeCurrent() failed

BUG=869739
TEST=test only change

Change-Id: Ib3fa4e01c715664e17bdcafd1af0ca98c34ff2dc
Reviewed-on: https://chromium-review.googlesource.com/1161171Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581250}
parent 24e79626
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_switches.h"
#include "ui/compositor/test/context_factories_for_test.h" #include "ui/compositor/test/context_factories_for_test.h"
#include "ui/gfx/gfx_paths.h" #include "ui/gfx/gfx_paths.h"
#include "ui/gl/gl_switches.h"
#include "ui/gl/test/gl_surface_test_support.h" #include "ui/gl/test/gl_surface_test_support.h"
namespace ash { namespace ash {
...@@ -26,6 +27,12 @@ AshTestSuite::~AshTestSuite() = default; ...@@ -26,6 +27,12 @@ AshTestSuite::~AshTestSuite() = default;
void AshTestSuite::Initialize() { void AshTestSuite::Initialize() {
base::TestSuite::Initialize(); base::TestSuite::Initialize();
// Force software-gl. This is necessary for tests that trigger launching ash
// in its own process
base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
cmd_line->AppendSwitch(switches::kOverrideUseSoftwareGLForTests);
gl::GLSurfaceTestSupport::InitializeOneOff(); gl::GLSurfaceTestSupport::InitializeOneOff();
gfx::RegisterPathProvider(); gfx::RegisterPathProvider();
......
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