diff options
Diffstat (limited to 'o3d/tests')
-rw-r--r-- | o3d/tests/build.scons | 24 | ||||
-rw-r--r-- | o3d/tests/common/build.scons | 2 | ||||
-rw-r--r-- | o3d/tests/common/cross/main.cc | 2 | ||||
-rw-r--r-- | o3d/tests/common/mac/testing_common.mm (renamed from o3d/tests/common/mac/testing_common.cc) | 4 | ||||
-rw-r--r-- | o3d/tests/tests.gyp | 2 |
5 files changed, 30 insertions, 4 deletions
diff --git a/o3d/tests/build.scons b/o3d/tests/build.scons index ee252a2..7b4be1c 100644 --- a/o3d/tests/build.scons +++ b/o3d/tests/build.scons @@ -110,7 +110,7 @@ env.Prepend( 'technique', 'antlr3c', 'gtest', - 'skia' + 'skia', ] + env['ICU_LIBS'], ) @@ -123,6 +123,22 @@ env.Append( LIBS = env['RENDERER_LIBS'], ) +# Add libevent on posix platforms. +if env.Bit('mac') or env.Bit('linux'): + env.Append( + LIBS = [ + 'event', + ], + ) + +# Add cocoa framework on mac. +if env.Bit('mac'): + env.Append( + FRAMEWORKS = [ + 'Cocoa', + ], + ) + run_env = env.Clone() if env.Bit('linux'): run_env.Append(ENV = os.environ) @@ -181,6 +197,7 @@ tests = [ 'core/cross/draw_pass_test.cc', 'core/cross/effect_test.cc', 'core/cross/element_test.cc', + 'core/cross/event_manager_test.cc', 'core/cross/fake_vertex_source.cc', 'core/cross/features_test.cc', 'core/cross/field_test.cc', @@ -223,6 +240,7 @@ tests = [ 'import/cross/gz_compressor_test.cc', 'import/cross/gz_decompressor_test.cc', 'import/cross/json_object_test.cc', + 'import/cross/main_thread_archive_callback_client_test.cc', 'import/cross/memory_buffer_test.cc', 'import/cross/memory_stream_test.cc', 'import/cross/raw_data_test.cc', @@ -230,6 +248,7 @@ tests = [ 'import/cross/tar_processor_test.cc', 'import/cross/targz_generator_test.cc', 'import/cross/targz_processor_test.cc', + 'import/cross/threaded_stream_processor_test.cc', 'serializer/cross/serializer_test.cc', 'tests/common/cross/test_utils.cc', 'utils/cross/file_path_utils_test.cc', @@ -743,7 +762,8 @@ pulse_tests = [env.Alias('presubmit')] # OpenGL tests don't work with selenium yet. if 'RENDERER_D3D9' in env['CPPDEFINES']: pulse_tests += [env.Alias('selenium_firefox'), - env.Alias('selenium_ie')] + env.Alias('selenium_ie'), + env.Alias('selenium_chrome')] # Add selenium for mac. if env.Bit('mac'): pulse_tests += [env.Alias('selenium')] diff --git a/o3d/tests/common/build.scons b/o3d/tests/common/build.scons index 8add24f..69db65f 100644 --- a/o3d/tests/common/build.scons +++ b/o3d/tests/common/build.scons @@ -49,7 +49,7 @@ if env.Bit('linux'): if env.Bit('mac'): inputs += [ - "mac/testing_common.cc", + "mac/testing_common.mm", ] o3dcore_lib = env.ComponentLibrary("testing_common", inputs) diff --git a/o3d/tests/common/cross/main.cc b/o3d/tests/common/cross/main.cc index b4bdbd2..b8c3fc3 100644 --- a/o3d/tests/common/cross/main.cc +++ b/o3d/tests/common/cross/main.cc @@ -32,6 +32,7 @@ // defines the common main() for all unit tests #include <build/build_config.h> +#include "base/at_exit.h" #include "gtest/gtest.h" #ifdef OS_WIN @@ -39,6 +40,7 @@ int test_main(int argc, wchar_t **argv) { #else int test_main(int argc, char **argv) { #endif + ::base::AtExitManager at_exit_manager; testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); diff --git a/o3d/tests/common/mac/testing_common.cc b/o3d/tests/common/mac/testing_common.mm index 2f7cffa..c00ef34 100644 --- a/o3d/tests/common/mac/testing_common.cc +++ b/o3d/tests/common/mac/testing_common.mm @@ -63,6 +63,8 @@ const unsigned int kWindowHeight = 600; extern int test_main(int argc, char **argv); int main(int argc, char *argv[]) { + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + std::string error; if (!o3d::RendererInstallCheck(&error)) { return false; @@ -132,5 +134,7 @@ int main(int argc, char *argv[]) { g_program_path = NULL; g_program_name = NULL; + [pool release]; + return ret; } diff --git a/o3d/tests/tests.gyp b/o3d/tests/tests.gyp index 80e8da7..d205c11 100644 --- a/o3d/tests/tests.gyp +++ b/o3d/tests/tests.gyp @@ -86,7 +86,7 @@ ['OS == "mac"', { 'sources': [ - 'common/mac/testing_common.cc', + 'common/mac/testing_common.mm', ], 'link_settings': { 'libraries': [ |