Changing usage of gtest_main target, to use test_support_main instead.
Review URL: http://webrtc-codereview.appspot.com/252002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@884 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -9,49 +9,20 @@
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'rtp_format_vp8_unittest',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'rtp_rtcp',
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gtest.gyp:gtest_main',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'rtp_format_vp8_unittest.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'rtcp_format_remb_unittest',
|
||||
'target_name': 'rtp_rtcp_unittests',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'rtp_rtcp',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
'<(webrtc_root)/../test/test.gyp:test_support_main',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gtest.gyp:gtest_main',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
'../../../',
|
||||
],
|
||||
'sources': [
|
||||
'rtp_format_vp8_unittest.cc',
|
||||
'rtcp_format_remb_unittest.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'rtp_utility_test',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'rtp_rtcp',
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gtest.gyp:gtest_main',
|
||||
],
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
'sources': [
|
||||
'rtp_utility_test.cc',
|
||||
],
|
||||
},
|
||||
|
@ -13,9 +13,9 @@
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'rtp_rtcp',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
'<(webrtc_root)/../test/test.gyp:test_support_main',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest_main',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../../source',
|
||||
|
@ -23,12 +23,10 @@
|
||||
'include_dirs': [
|
||||
'../interface',
|
||||
'<(webrtc_root)/common_video/interface',
|
||||
'<(webrtc_root)/../testing/gtest/include',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../interface',
|
||||
'<(webrtc_root)/../testing/gtest/include',
|
||||
],
|
||||
},
|
||||
'sources': [
|
||||
|
@ -11,10 +11,6 @@
|
||||
{
|
||||
'target_name': 'video_coding_test_lib',
|
||||
'type': '<(library)',
|
||||
'dependencies': [
|
||||
],
|
||||
'include_dirs': [
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'../test',
|
||||
@ -46,7 +42,6 @@
|
||||
'../source',
|
||||
],
|
||||
'sources': [
|
||||
|
||||
# headers
|
||||
'../test/codec_database_test.h',
|
||||
'../test/generic_codec_test.h',
|
||||
@ -80,27 +75,23 @@
|
||||
'../test/video_rtp_play_mt.cc',
|
||||
'../test/video_rtp_play.cc',
|
||||
'../test/video_source.cc',
|
||||
|
||||
], # source
|
||||
|
||||
'conditions': [
|
||||
|
||||
['OS=="linux"', {
|
||||
'cflags': [
|
||||
'-fexceptions',
|
||||
],
|
||||
}],
|
||||
|
||||
], # conditions
|
||||
},
|
||||
{
|
||||
'target_name': 'video_coding_unit_test',
|
||||
'target_name': 'video_coding_unittests',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'webrtc_video_coding',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
'<(webrtc_root)/../test/test.gyp:test_support_main',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest_main',
|
||||
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../../../interface',
|
||||
|
@ -372,6 +372,9 @@ void TestSize(VideoFrame& sourceFrame, WebRtc_UWord32 targetWidth,
|
||||
fclose(standAloneFile);
|
||||
}
|
||||
|
||||
// TODO(kjellander): Get rid of this main and use test_support_main instead
|
||||
// This can be done by inheriting TestSuite instead of testing::Test and
|
||||
// override Initialize().
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
|
@ -9,14 +9,12 @@
|
||||
{
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'VPMUnitTest',
|
||||
'target_name': 'video_processing_unittests',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'video_processing',
|
||||
'webrtc_utility',
|
||||
# The tests are based on gtest
|
||||
'../../testing/gtest.gyp:gtest',
|
||||
'../../testing/gtest.gyp:gtest_main',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
],
|
||||
'include_dirs': [
|
||||
'../../../../system_wrappers/interface',
|
||||
@ -24,7 +22,6 @@
|
||||
'../../../../modules/video_processing/main/source',
|
||||
],
|
||||
'sources': [
|
||||
|
||||
# headers
|
||||
'unit_test/unit_test.h',
|
||||
|
||||
@ -35,17 +32,13 @@
|
||||
'unit_test/deflickering_test.cc',
|
||||
'unit_test/denoising_test.cc',
|
||||
'unit_test/unit_test.cc',
|
||||
|
||||
], # source
|
||||
|
||||
'conditions': [
|
||||
|
||||
['OS=="linux"', {
|
||||
'cflags': [
|
||||
'-fexceptions',
|
||||
],
|
||||
}],
|
||||
|
||||
], # conditions
|
||||
},
|
||||
],
|
||||
|
@ -18,7 +18,7 @@
|
||||
'dependencies': [
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'all_dependent_settings': {
|
||||
'include_dirs': [
|
||||
'.',
|
||||
],
|
||||
@ -31,14 +31,25 @@
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'test_support_unittests',
|
||||
'type': 'executable',
|
||||
# Depend on this target when you want to have test_support but also the
|
||||
# main method needed for gtest to execute!
|
||||
'target_name': 'test_support_main',
|
||||
'type': 'static_library',
|
||||
'dependencies': [
|
||||
'test_support',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
],
|
||||
'sources': [
|
||||
'run_all_unittests.cc',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'test_support_unittests',
|
||||
'type': 'executable',
|
||||
'dependencies': [
|
||||
'test_support_main',
|
||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||
],
|
||||
'sources': [
|
||||
'testsupport/fileutils_unittest.cc',
|
||||
],
|
||||
},
|
||||
|
Reference in New Issue
Block a user