From 6af9594d71f00794be88a33536c94e10f1fea9ac Mon Sep 17 00:00:00 2001 From: "mflodman@webrtc.org" Date: Thu, 24 May 2012 13:23:35 +0000 Subject: [PATCH] Added gyp variable to include/exclude all tests. BUG= TEST= Review URL: https://webrtc-codereview.appspot.com/597004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2292 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/build/common.gypi | 5 +++++ src/common_audio/resampler/resampler.gypi | 4 ++-- .../signal_processing/signal_processing.gypi | 4 ++-- src/common_audio/vad/vad.gypi | 4 ++-- src/common_video/jpeg/jpeg.gypi | 5 ++--- src/common_video/libyuv/libyuv.gypi | 8 ++++---- src/modules/audio_coding/codecs/cng/cng.gypi | 4 ++-- src/modules/audio_coding/codecs/g711/g711.gypi | 5 ++--- src/modules/audio_coding/codecs/g722/g722.gypi | 5 ++--- src/modules/audio_coding/codecs/ilbc/ilbc.gypi | 6 +++--- src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi | 4 ++-- .../audio_coding/main/source/audio_coding_module.gypi | 3 +-- src/modules/audio_coding/neteq/neteq.gypi | 5 ++--- .../source/audio_conference_mixer.gypi | 4 ++-- src/modules/audio_device/main/source/audio_device.gypi | 3 +-- src/modules/media_file/source/media_file.gypi | 4 ++-- src/modules/modules.gyp | 5 ++--- src/modules/udp_transport/source/udp_transport.gypi | 4 ++-- src/modules/utility/source/utility.gypi | 4 ++-- src/modules/video_capture/main/source/video_capture.gypi | 9 ++++----- .../codecs/test/video_codecs_test_framework.gypi | 7 +++---- .../codecs/test_framework/test_framework.gypi | 7 +++---- .../video_coding/codecs/tools/video_codecs_tools.gypi | 7 +++---- src/modules/video_coding/codecs/vp8/main/source/vp8.gypi | 7 +++---- src/modules/video_render/main/source/video_render.gypi | 4 ++-- src/system_wrappers/source/system_wrappers.gyp | 4 ++-- src/video_engine/video_engine.gyp | 3 +-- src/video_engine/video_engine_core.gypi | 4 ++-- src/voice_engine/main/source/voice_engine_core.gypi | 4 ++-- src/voice_engine/voice_engine.gyp | 2 +- 30 files changed, 68 insertions(+), 76 deletions(-) diff --git a/src/build/common.gypi b/src/build/common.gypi index 5601827f9..13695054b 100644 --- a/src/build/common.gypi +++ b/src/build/common.gypi @@ -66,6 +66,9 @@ # Disable the use of protocol buffers in production code. 'enable_protobuf%': 0, + # Don't include tests for Chromium builds. + 'include_tests%': 0, + 'webrtc_root%': '<(DEPTH)/third_party/webrtc', }, { # Settings for the standalone (not-in-Chromium) build. @@ -80,6 +83,8 @@ 'enable_protobuf%': 1, + 'include_tests%': 1, + 'webrtc_root%': '<(DEPTH)/src', # TODO(andrew): For now, disable the Chrome plugins, which causes a diff --git a/src/common_audio/resampler/resampler.gypi b/src/common_audio/resampler/resampler.gypi index 69f9b0e17..0e08ff450 100644 --- a/src/common_audio/resampler/resampler.gypi +++ b/src/common_audio/resampler/resampler.gypi @@ -29,7 +29,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets' : [ { 'target_name': 'resampler_unittests', @@ -44,7 +44,7 @@ ], }, # resampler_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/common_audio/signal_processing/signal_processing.gypi b/src/common_audio/signal_processing/signal_processing.gypi index c67bf7c84..14e3d3eec 100644 --- a/src/common_audio/signal_processing/signal_processing.gypi +++ b/src/common_audio/signal_processing/signal_processing.gypi @@ -59,7 +59,7 @@ }, # spl ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'signal_processing_unittests', @@ -74,7 +74,7 @@ ], }, # spl_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/common_audio/vad/vad.gypi b/src/common_audio/vad/vad.gypi index 9a4a1b02f..189c15d6b 100644 --- a/src/common_audio/vad/vad.gypi +++ b/src/common_audio/vad/vad.gypi @@ -37,7 +37,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets' : [ { 'target_name': 'vad_unittests', @@ -57,7 +57,7 @@ ], }, # vad_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/common_video/jpeg/jpeg.gypi b/src/common_video/jpeg/jpeg.gypi index 1738a3de0..c44b5b790 100644 --- a/src/common_video/jpeg/jpeg.gypi +++ b/src/common_video/jpeg/jpeg.gypi @@ -62,9 +62,8 @@ ], }, ], # targets - # Exclude the test target when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'jpeg_unittests', @@ -79,7 +78,7 @@ ], }, ] # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/common_video/libyuv/libyuv.gypi b/src/common_video/libyuv/libyuv.gypi index bace5a207..8e704488c 100644 --- a/src/common_video/libyuv/libyuv.gypi +++ b/src/common_video/libyuv/libyuv.gypi @@ -33,7 +33,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'libyuv_unittests', @@ -46,10 +46,10 @@ ], 'sources': [ 'libyuv_unittest.cc', - 'scaler_unittest.cc', - ], + 'scaler_unittest.cc', + ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/codecs/cng/cng.gypi b/src/modules/audio_coding/codecs/cng/cng.gypi index 2903cc22e..f7734b5e9 100644 --- a/src/modules/audio_coding/codecs/cng/cng.gypi +++ b/src/modules/audio_coding/codecs/cng/cng.gypi @@ -31,7 +31,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'cng_unittests', @@ -46,7 +46,7 @@ ], }, # CNG_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/codecs/g711/g711.gypi b/src/modules/audio_coding/codecs/g711/g711.gypi index 763e6db48..81b065de2 100644 --- a/src/modules/audio_coding/codecs/g711/g711.gypi +++ b/src/modules/audio_coding/codecs/g711/g711.gypi @@ -27,9 +27,8 @@ ], }, ], # targets - # Exclude the test target when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'g711_unittests', @@ -54,7 +53,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/codecs/g722/g722.gypi b/src/modules/audio_coding/codecs/g722/g722.gypi index c1e55d9fb..55d7c5d4c 100644 --- a/src/modules/audio_coding/codecs/g722/g722.gypi +++ b/src/modules/audio_coding/codecs/g722/g722.gypi @@ -27,9 +27,8 @@ ], }, ], # targets - # Exclude the test target when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'g722_unittests', @@ -54,7 +53,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/codecs/ilbc/ilbc.gypi b/src/modules/audio_coding/codecs/ilbc/ilbc.gypi index 57410c593..89ae27d0e 100644 --- a/src/modules/audio_coding/codecs/ilbc/ilbc.gypi +++ b/src/modules/audio_coding/codecs/ilbc/ilbc.gypi @@ -166,8 +166,8 @@ }, # iLBC ], # targets 'conditions': [ - ['build_with_chromium==0', { - 'targets': [ + ['include_tests==1', { + 'targets': [ { 'target_name': 'iLBCtest', 'type': 'executable', @@ -179,7 +179,7 @@ ], }, # iLBCtest ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi b/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi index 38754e685..ede3129b6 100644 --- a/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi +++ b/src/modules/audio_coding/codecs/pcm16b/pcm16b.gypi @@ -26,7 +26,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'pcm16b_unittests', @@ -41,7 +41,7 @@ ], }, # PCM16B_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_coding/main/source/audio_coding_module.gypi b/src/modules/audio_coding/main/source/audio_coding_module.gypi index 80114e0ae..8b581bf20 100644 --- a/src/modules/audio_coding/main/source/audio_coding_module.gypi +++ b/src/modules/audio_coding/main/source/audio_coding_module.gypi @@ -93,9 +93,8 @@ ], }, ], - # Exclude the test targets when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'audio_coding_module_test', diff --git a/src/modules/audio_coding/neteq/neteq.gypi b/src/modules/audio_coding/neteq/neteq.gypi index 5c0d080e1..ebeed6cba 100644 --- a/src/modules/audio_coding/neteq/neteq.gypi +++ b/src/modules/audio_coding/neteq/neteq.gypi @@ -84,9 +84,8 @@ ], }, ], # targets - # Exclude the test target when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'neteq_unittests', @@ -295,6 +294,6 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi b/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi index fd116c65a..d6bbbbc4d 100644 --- a/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi +++ b/src/modules/audio_conference_mixer/source/audio_conference_mixer.gypi @@ -43,7 +43,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'audio_conference_mixer_unittests', @@ -59,7 +59,7 @@ ], }, # audio_conference_mixer_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/audio_device/main/source/audio_device.gypi b/src/modules/audio_device/main/source/audio_device.gypi index b4cdc06cb..96161de83 100644 --- a/src/modules/audio_device/main/source/audio_device.gypi +++ b/src/modules/audio_device/main/source/audio_device.gypi @@ -166,9 +166,8 @@ ], # conditions }, ], - # Exclude the test targets when building with chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'audio_device_test_api', diff --git a/src/modules/media_file/source/media_file.gypi b/src/modules/media_file/source/media_file.gypi index 2f9ffe926..435f946a7 100644 --- a/src/modules/media_file/source/media_file.gypi +++ b/src/modules/media_file/source/media_file.gypi @@ -41,7 +41,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'media_file_unittests', @@ -56,7 +56,7 @@ ], }, # media_file_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/modules.gyp b/src/modules/modules.gyp index 01b673e1b..317e8ba9a 100644 --- a/src/modules/modules.gyp +++ b/src/modules/modules.gyp @@ -40,9 +40,8 @@ 'rtp_rtcp/source/rtp_rtcp.gypi', ], - # Test targets, excluded when building with Chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'includes': [ 'audio_coding/codecs/iSAC/isac_test.gypi', 'audio_coding/codecs/iSAC/isacfix_test.gypi', @@ -57,6 +56,6 @@ 'video_coding/codecs/tools/video_codecs_tools.gypi', 'video_processing/main/test/vpm_tests.gypi', ], # includes - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/udp_transport/source/udp_transport.gypi b/src/modules/udp_transport/source/udp_transport.gypi index 15a8db1ec..5e5b862c9 100644 --- a/src/modules/udp_transport/source/udp_transport.gypi +++ b/src/modules/udp_transport/source/udp_transport.gypi @@ -81,7 +81,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'udp_transport_unittests', @@ -99,7 +99,7 @@ ], }, # udp_transport_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/utility/source/utility.gypi b/src/modules/utility/source/utility.gypi index 7dcce8eba..4afd5bc1d 100644 --- a/src/modules/utility/source/utility.gypi +++ b/src/modules/utility/source/utility.gypi @@ -66,7 +66,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'webrtc_utility_unittests', @@ -81,7 +81,7 @@ ], }, # webrtc_utility_unittests ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/video_capture/main/source/video_capture.gypi b/src/modules/video_capture/main/source/video_capture.gypi index d338af69a..df985c9a7 100644 --- a/src/modules/video_capture/main/source/video_capture.gypi +++ b/src/modules/video_capture/main/source/video_capture.gypi @@ -131,11 +131,10 @@ ], # conditions }, ], - # Exclude the test targets when building with chromium. 'conditions': [ - ['build_with_chromium==0', { - 'targets': [ - { + ['include_tests==1', { + 'targets': [ + { 'target_name': 'video_capture_module_test', 'type': 'executable', 'dependencies': [ @@ -151,7 +150,7 @@ 'sources': [ '../test/video_capture_unittest.cc', ], - 'conditions': [ + 'conditions': [ # DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS ['OS=="mac" or OS=="linux"', { 'cflags': [ diff --git a/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi b/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi index 662d09d64..29109d568 100644 --- a/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi +++ b/src/modules/video_coding/codecs/test/video_codecs_test_framework.gypi @@ -7,9 +7,8 @@ # be found in the AUTHORS file in the root of the source tree. { - # Exclude the test target when building with chromium. - 'conditions': [ - ['build_with_chromium==0', { + 'conditions': [ + ['include_tests==1', { 'targets': [ { 'target_name': 'video_codecs_test_framework', @@ -61,7 +60,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/video_coding/codecs/test_framework/test_framework.gypi b/src/modules/video_coding/codecs/test_framework/test_framework.gypi index 3639e9a37..e785ae973 100644 --- a/src/modules/video_coding/codecs/test_framework/test_framework.gypi +++ b/src/modules/video_coding/codecs/test_framework/test_framework.gypi @@ -7,9 +7,8 @@ # be found in the AUTHORS file in the root of the source tree. { - # Exclude the test target when building with chromium. - 'conditions': [ - ['build_with_chromium==0', { + 'conditions': [ + ['include_tests==1', { 'targets': [ { 'target_name': 'test_framework', @@ -60,7 +59,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi b/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi index f43f285e6..4d65aa86b 100644 --- a/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi +++ b/src/modules/video_coding/codecs/tools/video_codecs_tools.gypi @@ -7,9 +7,8 @@ # be found in the AUTHORS file in the root of the source tree. { - # Exclude the test target when building with chromium. - 'conditions': [ - ['build_with_chromium==0', { + 'conditions': [ + ['include_tests==1', { 'targets': [ { 'target_name': 'video_quality_measurement', @@ -26,7 +25,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi b/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi index 5989fc895..9b2774f72 100644 --- a/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi +++ b/src/modules/video_coding/codecs/vp8/main/source/vp8.gypi @@ -58,9 +58,8 @@ ], }, ], # targets - # Exclude the test target when building with chromium. - 'conditions': [ - ['build_with_chromium==0', { + 'conditions': [ + ['include_tests==1', { 'targets': [ { 'target_name': 'vp8_test', @@ -111,7 +110,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], } diff --git a/src/modules/video_render/main/source/video_render.gypi b/src/modules/video_render/main/source/video_render.gypi index 6fe7c881e..ea1eefabe 100644 --- a/src/modules/video_render/main/source/video_render.gypi +++ b/src/modules/video_render/main/source/video_render.gypi @@ -165,7 +165,7 @@ 'WEBRTC_INCLUDE_INTERNAL_VIDEO_RENDER', ], }], - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'video_render_module_test', @@ -208,7 +208,7 @@ ] # conditions }, # video_render_module_test ], # targets - }], # build_with_chromium==0 + }], # include_tests==0 ], # conditions } diff --git a/src/system_wrappers/source/system_wrappers.gyp b/src/system_wrappers/source/system_wrappers.gyp index 72e6337b7..dbbf2cfdd 100644 --- a/src/system_wrappers/source/system_wrappers.gyp +++ b/src/system_wrappers/source/system_wrappers.gyp @@ -172,7 +172,7 @@ }, ], }], - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'system_wrappers_unittests', @@ -205,7 +205,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/video_engine/video_engine.gyp b/src/video_engine/video_engine.gyp index 1ca51425b..c02deae6d 100644 --- a/src/video_engine/video_engine.gyp +++ b/src/video_engine/video_engine.gyp @@ -12,9 +12,8 @@ './video_engine_core.gypi', ], - # Test targets, excluded when building with Chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'includes': [ 'test/libvietest/libvietest.gypi', 'test/auto_test/vie_auto_test.gypi', diff --git a/src/video_engine/video_engine_core.gypi b/src/video_engine/video_engine_core.gypi index fb792f665..e0cc1db3e 100644 --- a/src/video_engine/video_engine_core.gypi +++ b/src/video_engine/video_engine_core.gypi @@ -131,7 +131,7 @@ }, ], # targets 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'video_engine_core_unittests', @@ -152,7 +152,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/voice_engine/main/source/voice_engine_core.gypi b/src/voice_engine/main/source/voice_engine_core.gypi index 55ba64952..6c987f446 100644 --- a/src/voice_engine/main/source/voice_engine_core.gypi +++ b/src/voice_engine/main/source/voice_engine_core.gypi @@ -115,7 +115,7 @@ }, ], 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'targets': [ { 'target_name': 'voice_engine_unittests', @@ -146,7 +146,7 @@ ], }, ], # targets - }], # build_with_chromium + }], # include_tests ], # conditions } diff --git a/src/voice_engine/voice_engine.gyp b/src/voice_engine/voice_engine.gyp index f45a26959..6fdc0d774 100644 --- a/src/voice_engine/voice_engine.gyp +++ b/src/voice_engine/voice_engine.gyp @@ -14,7 +14,7 @@ # Test targets, excluded when building with Chromium. 'conditions': [ - ['build_with_chromium==0', { + ['include_tests==1', { 'includes': [ 'main/test/voice_engine_tests.gypi', ],