diff options
author | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 23:34:12 +0000 |
---|---|---|
committer | apatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 23:34:12 +0000 |
commit | 12b59b95ddb8a78a75380c0de81c6f99621c1767 (patch) | |
tree | 2c2f49e1b572a55804a128339338392cb321deec /o3d | |
parent | 85f9d0bc7f09e87a72deb4722466023cc777ee27 (diff) | |
download | chromium_src-12b59b95ddb8a78a75380c0de81c6f99621c1767.zip chromium_src-12b59b95ddb8a78a75380c0de81c6f99621c1767.tar.gz chromium_src-12b59b95ddb8a78a75380c0de81c6f99621c1767.tar.bz2 |
Moved all gpu plugin and command buffer tests into a single executable prior to move to Chrome tree.
Review URL: http://codereview.chromium.org/392017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r-- | o3d/build/o3d_all.gyp | 3 | ||||
-rw-r--r-- | o3d/gpu/command_buffer/client/cmd_buffer_helper_test.cc | 7 | ||||
-rw-r--r-- | o3d/gpu/command_buffer/client/fenced_allocator_test.cc | 5 | ||||
-rw-r--r-- | o3d/gpu/gpu.gyp | 98 | ||||
-rw-r--r-- | o3d/tests/tests.gyp | 9 |
5 files changed, 70 insertions, 52 deletions
diff --git a/o3d/build/o3d_all.gyp b/o3d/build/o3d_all.gyp index f30de4c..b55d97b 100644 --- a/o3d/build/o3d_all.gyp +++ b/o3d/build/o3d_all.gyp @@ -50,8 +50,7 @@ ['renderer=="cb"', { 'dependencies': [ - '../gpu/gpu.gyp:gpu_plugin_unittests', - '../gpu/gpu.gyp:np_utils_unittests', + '../gpu/gpu.gyp:gpu_all_unittests', ], }, ], diff --git a/o3d/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/o3d/gpu/command_buffer/client/cmd_buffer_helper_test.cc index b2f5bde..6f7dcfb 100644 --- a/o3d/gpu/command_buffer/client/cmd_buffer_helper_test.cc +++ b/o3d/gpu/command_buffer/client/cmd_buffer_helper_test.cc @@ -32,13 +32,15 @@ // Tests for the Command Buffer Helper. -#include "tests/common/win/testing_common.h" +#include "base/at_exit.h" #include "base/message_loop.h" #include "gpu/command_buffer/client/cmd_buffer_helper.h" #include "gpu/command_buffer/service/mocks.h" #include "gpu/gpu_plugin/command_buffer.h" #include "gpu/gpu_plugin/gpu_processor.h" #include "gpu/np_utils/np_object_pointer.h" +#include "gpu/np_utils/np_browser_stub.h" +#include "testing/gtest/include/gtest/gtest.h" namespace command_buffer { @@ -138,6 +140,9 @@ class CommandBufferHelperTest : public testing::Test { CommandBufferOffset get_helper_put() { return helper_->put_; } + base::AtExitManager at_exit_manager_; + MessageLoop message_loop_; + gpu_plugin::StubNPBrowser browser_; scoped_ptr<AsyncAPIMock> api_mock_; NPObjectPointer<CommandBuffer> command_buffer_; command_buffer::CommandParser* parser_; diff --git a/o3d/gpu/command_buffer/client/fenced_allocator_test.cc b/o3d/gpu/command_buffer/client/fenced_allocator_test.cc index ce76542..992acde 100644 --- a/o3d/gpu/command_buffer/client/fenced_allocator_test.cc +++ b/o3d/gpu/command_buffer/client/fenced_allocator_test.cc @@ -32,7 +32,6 @@ // This file contains the tests for the FencedAllocator class. -#include "tests/common/win/testing_common.h" #include "base/message_loop.h" #include "gpu/command_buffer/client/cmd_buffer_helper.h" #include "gpu/command_buffer/client/fenced_allocator.h" @@ -40,7 +39,9 @@ #include "gpu/command_buffer/service/mocks.h" #include "gpu/gpu_plugin/command_buffer.h" #include "gpu/gpu_plugin/gpu_processor.h" +#include "gpu/np_utils/np_browser_stub.h" #include "gpu/np_utils/np_object_pointer.h" +#include "testing/gtest/include/gtest/gtest.h" namespace command_buffer { @@ -100,6 +101,8 @@ class BaseFencedAllocatorTest : public testing::Test { helper_.release(); } + MessageLoop message_loop_; + gpu_plugin::StubNPBrowser browser_; scoped_ptr<AsyncAPIMock> api_mock_; NPObjectPointer<CommandBuffer> command_buffer_; command_buffer::CommandParser* parser_; diff --git a/o3d/gpu/gpu.gyp b/o3d/gpu/gpu.gyp index 60b56b8..2079e1e 100644 --- a/o3d/gpu/gpu.gyp +++ b/o3d/gpu/gpu.gyp @@ -38,7 +38,7 @@ ], }, { - 'target_name': 'command_buffer_common_test', + 'target_name': 'command_buffer_common_unittests', 'type': 'none', 'direct_dependent_settings': { 'sources': [ @@ -67,7 +67,7 @@ ], }, { - 'target_name': 'command_buffer_client_test', + 'target_name': 'command_buffer_client_unittests', 'type': 'none', 'direct_dependent_settings': { 'sources': [ @@ -80,9 +80,14 @@ { 'target_name': 'command_buffer_service', 'type': 'static_library', + 'include_dirs': [ + '..', + '../..', + ], 'all_dependent_settings': { 'include_dirs': [ '..', + '../..', ], 'conditions': [ ['OS == "win" and (renderer == "gl" or cb_service == "gl")', @@ -185,7 +190,7 @@ ], # 'conditions' }, { - 'target_name': 'command_buffer_service_test', + 'target_name': 'command_buffer_service_unittests', 'type': 'none', 'direct_dependent_settings': { 'sources': [ @@ -244,28 +249,20 @@ # gyp. At that point these can become part of the regular O3D unit tests. { 'target_name': 'np_utils_unittests', - 'type': 'executable', - 'dependencies': [ - 'np_utils', - '../../testing/gmock.gyp:gmock', - '../../testing/gmock.gyp:gmockmain', - '../../testing/gtest.gyp:gtest', - ], - 'include_dirs': [ - '../..', - ], - 'all_dependent_settings': { + 'type': 'none', + 'direct_dependent_settings': { 'include_dirs': [ + '..', '../..', ], - }, # 'all_dependent_settings' - 'sources': [ - 'np_utils/dispatched_np_object_unittest.cc', - 'np_utils/dynamic_np_object_unittest.cc', - 'np_utils/np_class_unittest.cc', - 'np_utils/np_object_pointer_unittest.cc', - 'np_utils/np_utils_unittest.cc', - ], + 'sources': [ + 'np_utils/dispatched_np_object_unittest.cc', + 'np_utils/dynamic_np_object_unittest.cc', + 'np_utils/np_class_unittest.cc', + 'np_utils/np_object_pointer_unittest.cc', + 'np_utils/np_utils_unittest.cc', + ], + }, }, # These can eventually be merged back into the gpu_plugin target. There @@ -279,8 +276,13 @@ 'command_buffer_service', 'np_utils', ], + 'include_dirs': [ + '..', + '../..', + ], 'all_dependent_settings': { 'include_dirs': [ + '..', '../..', ], }, # 'all_dependent_settings' @@ -304,8 +306,15 @@ 'np_utils', ], 'include_dirs': [ + '..', '../..', ], + 'all_dependent_settings': { + 'include_dirs': [ + '..', + '../..', + ], + }, # 'all_dependent_settings' 'sources': [ 'gpu_plugin/gpu_plugin.cc', 'gpu_plugin/gpu_plugin.h', @@ -316,29 +325,40 @@ 'gpu_plugin/gpu_plugin_object_factory.h', ], }, - - # This is a standalone executable until O3D is fully moved over to using - # gyp. At that point these can become part of the regular O3D unit tests. { 'target_name': 'gpu_plugin_unittests', + 'type': 'none', + 'direct_dependent_settings': { + 'include_dirs': [ + '..', + '../..', + ], + 'sources': [ + 'gpu_plugin/command_buffer_unittest.cc', + 'gpu_plugin/gpu_plugin_unittest.cc', + 'gpu_plugin/gpu_plugin_object_unittest.cc', + 'gpu_plugin/gpu_plugin_object_factory_unittest.cc', + 'gpu_plugin/gpu_processor_unittest.cc', + ], + }, + }, + { + 'target_name': 'gpu_all_unittests', 'type': 'executable', - 'dependencies': [ - 'command_buffer_service', - 'gpu_plugin', - 'np_utils', + 'dependencies': [ '../../testing/gmock.gyp:gmock', '../../testing/gmock.gyp:gmockmain', '../../testing/gtest.gyp:gtest', - ], - 'include_dirs': [ - '../..', - ], - 'sources': [ - 'gpu_plugin/command_buffer_unittest.cc', - 'gpu_plugin/gpu_plugin_unittest.cc', - 'gpu_plugin/gpu_plugin_object_unittest.cc', - 'gpu_plugin/gpu_plugin_object_factory_unittest.cc', - 'gpu_plugin/gpu_processor_unittest.cc', + 'command_buffer_client', + 'command_buffer_client_unittests', + 'command_buffer_common', + 'command_buffer_common_unittests', + 'command_buffer_service', + 'command_buffer_service_unittests', + 'gpu_plugin', + 'gpu_plugin_unittests', + 'np_utils', + 'np_utils_unittests', ], }, ] diff --git a/o3d/tests/tests.gyp b/o3d/tests/tests.gyp index 1942b35..5a5177a 100644 --- a/o3d/tests/tests.gyp +++ b/o3d/tests/tests.gyp @@ -109,15 +109,6 @@ ] }, ], - ['renderer == "cb" and cb_service != "remote"', - { - 'dependencies': [ - '../gpu/gpu.gyp:command_buffer_client_test', - '../gpu/gpu.gyp:command_buffer_common_test', - '../gpu/gpu.gyp:command_buffer_service_test', - ] - }, - ], ['OS == "mac"', { 'dependencies': [ |