summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-30 23:43:00 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-30 23:43:00 +0000
commit4dfeae6e3ab0d3a63c872d61a0a82ac661892cfe (patch)
treec418d9fbf4af2c7dcc81c0e09dcfa952b3765c46 /gpu
parentc7747aac5caadabf2c1745cd2c69d44bd928710a (diff)
downloadchromium_src-4dfeae6e3ab0d3a63c872d61a0a82ac661892cfe.zip
chromium_src-4dfeae6e3ab0d3a63c872d61a0a82ac661892cfe.tar.gz
chromium_src-4dfeae6e3ab0d3a63c872d61a0a82ac661892cfe.tar.bz2
GTTF: enable new test launcher for gpu_unittests
Note that this is behind a flag for now, --brave-new-test-launcher. Makes gpu_unittests take 3s instead of 10s on my workstation. BUG=299202 R=piman@chromium.org Review URL: https://codereview.chromium.org/25050006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/common/unittest_main.cc22
-rw-r--r--gpu/gpu.gyp1
2 files changed, 22 insertions, 1 deletions
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index 08c4b34..44746c9 100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -3,11 +3,29 @@
// found in the LICENSE file.
#include "base/at_exit.h"
+#include "base/bind.h"
#include "base/command_line.h"
+#include "base/test/test_suite.h"
+#include "base/test/unit_test_launcher.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gl/gl_implementation.h"
+namespace {
+
+class NoAtExitBaseTestSuite : public base::TestSuite {
+ public:
+ NoAtExitBaseTestSuite(int argc, char** argv)
+ : base::TestSuite(argc, argv, false) {
+ }
+};
+
+int RunTestSuite(int argc, char** argv) {
+ return NoAtExitBaseTestSuite(argc, argv).Run();
+}
+
+} // namespace
+
int main(int argc, char** argv) {
// On Android, AtExitManager is created in
// testing/android/native_test_wrapper.cc before main() is called.
@@ -18,5 +36,7 @@ int main(int argc, char** argv) {
CommandLine::Init(argc, argv);
gfx::InitializeGLBindings(gfx::kGLImplementationMockGL);
testing::InitGoogleMock(&argc, argv);
- return RUN_ALL_TESTS();
+ return base::LaunchUnitTests(argc,
+ argv,
+ base::Bind(&RunTestSuite, argc, argv));
}
diff --git a/gpu/gpu.gyp b/gpu/gpu.gyp
index d992aa1..51122cd 100644
--- a/gpu/gpu.gyp
+++ b/gpu/gpu.gyp
@@ -122,6 +122,7 @@
'type': '<(gtest_target_type)',
'dependencies': [
'../base/base.gyp:base',
+ '../base/base.gyp:test_support_base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',