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': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'rtp_format_vp8_unittest',
|
'target_name': 'rtp_rtcp_unittests',
|
||||||
'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',
|
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'rtp_rtcp',
|
'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',
|
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
'../../testing/gtest.gyp:gtest',
|
|
||||||
'../../testing/gtest.gyp:gtest_main',
|
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'.',
|
|
||||||
'../../../',
|
'../../../',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
|
'rtp_format_vp8_unittest.cc',
|
||||||
'rtcp_format_remb_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',
|
'rtp_utility_test.cc',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'rtp_rtcp',
|
'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',
|
||||||
'<(webrtc_root)/../testing/gtest.gyp:gtest_main',
|
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../../source',
|
'../../source',
|
||||||
|
@ -23,12 +23,10 @@
|
|||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../interface',
|
'../interface',
|
||||||
'<(webrtc_root)/common_video/interface',
|
'<(webrtc_root)/common_video/interface',
|
||||||
'<(webrtc_root)/../testing/gtest/include',
|
|
||||||
],
|
],
|
||||||
'direct_dependent_settings': {
|
'direct_dependent_settings': {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../interface',
|
'../interface',
|
||||||
'<(webrtc_root)/../testing/gtest/include',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
|
@ -11,10 +11,6 @@
|
|||||||
{
|
{
|
||||||
'target_name': 'video_coding_test_lib',
|
'target_name': 'video_coding_test_lib',
|
||||||
'type': '<(library)',
|
'type': '<(library)',
|
||||||
'dependencies': [
|
|
||||||
],
|
|
||||||
'include_dirs': [
|
|
||||||
],
|
|
||||||
'direct_dependent_settings': {
|
'direct_dependent_settings': {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../test',
|
'../test',
|
||||||
@ -46,7 +42,6 @@
|
|||||||
'../source',
|
'../source',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
|
|
||||||
# headers
|
# headers
|
||||||
'../test/codec_database_test.h',
|
'../test/codec_database_test.h',
|
||||||
'../test/generic_codec_test.h',
|
'../test/generic_codec_test.h',
|
||||||
@ -80,27 +75,23 @@
|
|||||||
'../test/video_rtp_play_mt.cc',
|
'../test/video_rtp_play_mt.cc',
|
||||||
'../test/video_rtp_play.cc',
|
'../test/video_rtp_play.cc',
|
||||||
'../test/video_source.cc',
|
'../test/video_source.cc',
|
||||||
|
|
||||||
], # source
|
], # source
|
||||||
|
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
|
||||||
], # conditions
|
], # conditions
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'video_coding_unit_test',
|
'target_name': 'video_coding_unittests',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'webrtc_video_coding',
|
'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',
|
||||||
'<(webrtc_root)/../testing/gtest.gyp:gtest_main',
|
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../../../interface',
|
'../../../interface',
|
||||||
|
@ -372,6 +372,9 @@ void TestSize(VideoFrame& sourceFrame, WebRtc_UWord32 targetWidth,
|
|||||||
fclose(standAloneFile);
|
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)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
::testing::InitGoogleTest(&argc, argv);
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
@ -9,14 +9,12 @@
|
|||||||
{
|
{
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
'target_name': 'VPMUnitTest',
|
'target_name': 'video_processing_unittests',
|
||||||
'type': 'executable',
|
'type': 'executable',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'video_processing',
|
'video_processing',
|
||||||
'webrtc_utility',
|
'webrtc_utility',
|
||||||
# The tests are based on gtest
|
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||||
'../../testing/gtest.gyp:gtest',
|
|
||||||
'../../testing/gtest.gyp:gtest_main',
|
|
||||||
],
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'../../../../system_wrappers/interface',
|
'../../../../system_wrappers/interface',
|
||||||
@ -24,7 +22,6 @@
|
|||||||
'../../../../modules/video_processing/main/source',
|
'../../../../modules/video_processing/main/source',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
|
|
||||||
# headers
|
# headers
|
||||||
'unit_test/unit_test.h',
|
'unit_test/unit_test.h',
|
||||||
|
|
||||||
@ -35,17 +32,13 @@
|
|||||||
'unit_test/deflickering_test.cc',
|
'unit_test/deflickering_test.cc',
|
||||||
'unit_test/denoising_test.cc',
|
'unit_test/denoising_test.cc',
|
||||||
'unit_test/unit_test.cc',
|
'unit_test/unit_test.cc',
|
||||||
|
|
||||||
], # source
|
], # source
|
||||||
|
|
||||||
'conditions': [
|
'conditions': [
|
||||||
|
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-fexceptions',
|
'-fexceptions',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
|
|
||||||
], # conditions
|
], # conditions
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
||||||
],
|
],
|
||||||
'direct_dependent_settings': {
|
'all_dependent_settings': {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'.',
|
'.',
|
||||||
],
|
],
|
||||||
@ -31,14 +31,25 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'test_support_unittests',
|
# Depend on this target when you want to have test_support but also the
|
||||||
'type': 'executable',
|
# main method needed for gtest to execute!
|
||||||
|
'target_name': 'test_support_main',
|
||||||
|
'type': 'static_library',
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'test_support',
|
'test_support',
|
||||||
'<(webrtc_root)/../testing/gtest.gyp:gtest',
|
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
'run_all_unittests.cc',
|
'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',
|
'testsupport/fileutils_unittest.cc',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user