andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 1 | # Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | # TODO(andrew): consider moving test_support to src/base/test. |
| 10 | { |
| 11 | 'includes': [ |
andrew@webrtc.org | 81cf5e4 | 2012-06-27 01:41:54 +0000 | [diff] [blame] | 12 | '../build/common.gypi', |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 13 | ], |
| 14 | 'targets': [ |
| 15 | { |
kjellander@webrtc.org | 6c35e0b | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 16 | 'target_name': 'channel_transport', |
| 17 | 'type': 'static_library', |
| 18 | 'dependencies': [ |
| 19 | '<(DEPTH)/testing/gtest.gyp:gtest', |
| 20 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
| 21 | ], |
| 22 | 'sources': [ |
| 23 | 'channel_transport/channel_transport.cc', |
| 24 | 'channel_transport/include/channel_transport.h', |
| 25 | 'channel_transport/traffic_control_win.cc', |
| 26 | 'channel_transport/traffic_control_win.h', |
| 27 | 'channel_transport/udp_socket_manager_posix.cc', |
| 28 | 'channel_transport/udp_socket_manager_posix.h', |
| 29 | 'channel_transport/udp_socket_manager_wrapper.cc', |
| 30 | 'channel_transport/udp_socket_manager_wrapper.h', |
| 31 | 'channel_transport/udp_socket_posix.cc', |
| 32 | 'channel_transport/udp_socket_posix.h', |
| 33 | 'channel_transport/udp_socket_wrapper.cc', |
| 34 | 'channel_transport/udp_socket_wrapper.h', |
| 35 | 'channel_transport/udp_socket2_manager_win.cc', |
| 36 | 'channel_transport/udp_socket2_manager_win.h', |
| 37 | 'channel_transport/udp_socket2_win.cc', |
| 38 | 'channel_transport/udp_socket2_win.h', |
| 39 | 'channel_transport/udp_transport.h', |
| 40 | 'channel_transport/udp_transport_impl.cc', |
| 41 | 'channel_transport/udp_transport_impl.h', |
| 42 | ], |
| 43 | }, |
| 44 | { |
pbos@webrtc.org | 724947b | 2013-12-11 16:26:16 +0000 | [diff] [blame] | 45 | 'target_name': 'frame_generator', |
| 46 | 'type': 'static_library', |
| 47 | 'sources': [ |
| 48 | 'frame_generator.cc', |
| 49 | 'frame_generator.h', |
| 50 | ], |
| 51 | 'dependencies': [ |
| 52 | '<(webrtc_root)/common_video/common_video.gyp:common_video', |
| 53 | ], |
| 54 | }, |
| 55 | { |
asapersson@webrtc.org | 0f2809a | 2014-02-21 08:14:45 +0000 | [diff] [blame] | 56 | 'target_name': 'rtcp_packet_parser', |
| 57 | 'type': 'static_library', |
| 58 | 'sources': [ |
| 59 | 'rtcp_packet_parser.cc', |
| 60 | 'rtcp_packet_parser.h', |
| 61 | ], |
| 62 | 'dependencies': [ |
| 63 | '<(webrtc_root)/modules/modules.gyp:rtp_rtcp', |
| 64 | ], |
| 65 | }, |
| 66 | { |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 67 | 'target_name': 'test_support', |
| 68 | 'type': 'static_library', |
| 69 | 'dependencies': [ |
andrew@webrtc.org | 81cf5e4 | 2012-06-27 01:41:54 +0000 | [diff] [blame] | 70 | '<(DEPTH)/testing/gtest.gyp:gtest', |
| 71 | '<(DEPTH)/testing/gmock.gyp:gmock', |
andrew@webrtc.org | aa3d1c8 | 2013-09-05 21:16:29 +0000 | [diff] [blame] | 72 | '<(DEPTH)/third_party/gflags/gflags.gyp:gflags', |
andrew@webrtc.org | c1ffd33 | 2013-03-22 17:13:23 +0000 | [diff] [blame] | 73 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 74 | ], |
| 75 | 'sources': [ |
| 76 | 'test_suite.cc', |
| 77 | 'test_suite.h', |
henrike@webrtc.org | 34773d9 | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 78 | 'testsupport/android/root_path_android.cc', |
| 79 | 'testsupport/android/root_path_android_chromium.cc', |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 80 | 'testsupport/fileutils.cc', |
andrew@webrtc.org | 2009f6b | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 81 | 'testsupport/fileutils.h', |
kjellander@webrtc.org | 5b97b12 | 2011-12-08 07:42:18 +0000 | [diff] [blame] | 82 | 'testsupport/frame_reader.cc', |
andrew@webrtc.org | 2009f6b | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 83 | 'testsupport/frame_reader.h', |
kjellander@webrtc.org | 5b97b12 | 2011-12-08 07:42:18 +0000 | [diff] [blame] | 84 | 'testsupport/frame_writer.cc', |
andrew@webrtc.org | 2009f6b | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 85 | 'testsupport/frame_writer.h', |
kjellander@webrtc.org | 51198f1 | 2012-02-21 17:53:46 +0000 | [diff] [blame] | 86 | 'testsupport/gtest_prod_util.h', |
phoglund@webrtc.org | d005468 | 2013-01-09 16:53:42 +0000 | [diff] [blame] | 87 | 'testsupport/gtest_disable.h', |
kjellander@webrtc.org | 5b97b12 | 2011-12-08 07:42:18 +0000 | [diff] [blame] | 88 | 'testsupport/mock/mock_frame_reader.h', |
| 89 | 'testsupport/mock/mock_frame_writer.h', |
andrew@webrtc.org | 2009f6b | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 90 | 'testsupport/packet_reader.cc', |
| 91 | 'testsupport/packet_reader.h', |
| 92 | 'testsupport/perf_test.cc', |
| 93 | 'testsupport/perf_test.h', |
andrew@webrtc.org | b87cc85 | 2013-03-25 16:23:37 +0000 | [diff] [blame] | 94 | 'testsupport/trace_to_stderr.cc', |
| 95 | 'testsupport/trace_to_stderr.h', |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 96 | ], |
henrike@webrtc.org | 34773d9 | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 97 | 'conditions': [ |
| 98 | # TODO(henrike): remove build_with_chromium==1 when the bots are using |
| 99 | # Chromium's buildbots. |
| 100 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 101 | 'dependencies': [ |
| 102 | '<(DEPTH)/base/base.gyp:base', |
| 103 | ], |
| 104 | 'sources!': [ |
| 105 | 'testsupport/android/root_path_android.cc', |
| 106 | ], |
henrike@webrtc.org | 34773d9 | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 107 | }, { |
| 108 | 'sources!': [ |
| 109 | 'testsupport/android/root_path_android_chromium.cc', |
| 110 | ], |
| 111 | }], |
| 112 | ], |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 113 | }, |
| 114 | { |
kjellander@webrtc.org | 1a8d08a | 2011-11-03 23:28:47 +0000 | [diff] [blame] | 115 | # Depend on this target when you want to have test_support but also the |
| 116 | # main method needed for gtest to execute! |
| 117 | 'target_name': 'test_support_main', |
| 118 | 'type': 'static_library', |
| 119 | 'dependencies': [ |
| 120 | 'test_support', |
| 121 | ], |
| 122 | 'sources': [ |
| 123 | 'run_all_unittests.cc', |
| 124 | ], |
| 125 | }, |
| 126 | { |
phoglund@webrtc.org | 54e22eb | 2012-08-08 08:27:46 +0000 | [diff] [blame] | 127 | # Depend on this target when you want to have test_support and a special |
| 128 | # main for mac which will run your test on a worker thread and consume |
| 129 | # events on the main thread. Useful if you want to access a webcam. |
| 130 | # This main will provide all the scaffolding and objective-c black magic |
| 131 | # for you. All you need to do is to implement a function in the |
| 132 | # run_threaded_main_mac.h file (ImplementThisToRunYourTest). |
| 133 | 'target_name': 'test_support_main_threaded_mac', |
| 134 | 'type': 'static_library', |
| 135 | 'dependencies': [ |
| 136 | 'test_support', |
| 137 | ], |
| 138 | 'sources': [ |
| 139 | 'testsupport/mac/run_threaded_main_mac.h', |
| 140 | 'testsupport/mac/run_threaded_main_mac.mm', |
| 141 | ], |
| 142 | }, |
| 143 | { |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 144 | 'target_name': 'test_support_unittests', |
henrike@webrtc.org | 89c6740 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 145 | 'type': '<(gtest_target_type)', |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 146 | 'dependencies': [ |
kjellander@webrtc.org | 6c35e0b | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 147 | 'channel_transport', |
kjellander@webrtc.org | 1a8d08a | 2011-11-03 23:28:47 +0000 | [diff] [blame] | 148 | 'test_support_main', |
kjellander@webrtc.org | 6c35e0b | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 149 | '<(DEPTH)/testing/gmock.gyp:gmock', |
andrew@webrtc.org | 81cf5e4 | 2012-06-27 01:41:54 +0000 | [diff] [blame] | 150 | '<(DEPTH)/testing/gtest.gyp:gtest', |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 151 | ], |
kjellander@webrtc.org | 1a8d08a | 2011-11-03 23:28:47 +0000 | [diff] [blame] | 152 | 'sources': [ |
kjellander@webrtc.org | 6c35e0b | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 153 | 'channel_transport/udp_transport_unittest.cc', |
| 154 | 'channel_transport/udp_socket_manager_unittest.cc', |
| 155 | 'channel_transport/udp_socket_wrapper_unittest.cc', |
kjellander@webrtc.org | 5b97b12 | 2011-12-08 07:42:18 +0000 | [diff] [blame] | 156 | 'testsupport/unittest_utils.h', |
kjellander@webrtc.org | 7951e81 | 2011-10-13 12:24:41 +0000 | [diff] [blame] | 157 | 'testsupport/fileutils_unittest.cc', |
kjellander@webrtc.org | 5b97b12 | 2011-12-08 07:42:18 +0000 | [diff] [blame] | 158 | 'testsupport/frame_reader_unittest.cc', |
| 159 | 'testsupport/frame_writer_unittest.cc', |
| 160 | 'testsupport/packet_reader_unittest.cc', |
andrew@webrtc.org | 2009f6b | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 161 | 'testsupport/perf_test_unittest.cc', |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 162 | ], |
kjellander@webrtc.org | 6c35e0b | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 163 | # Disable warnings to enable Win64 build, issue 1323. |
| 164 | 'msvs_disabled_warnings': [ |
| 165 | 4267, # size_t to int truncation. |
| 166 | ], |
henrike@webrtc.org | 89c6740 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 167 | 'conditions': [ |
| 168 | # TODO(henrike): remove build_with_chromium==1 when the bots are |
| 169 | # using Chromium's buildbots. |
| 170 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 171 | 'dependencies': [ |
| 172 | '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code', |
| 173 | ], |
| 174 | }], |
| 175 | ], |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 176 | }, |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 177 | ], |
henrike@webrtc.org | 89c6740 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 178 | 'conditions': [ |
kjellander@webrtc.org | 5b3b6b1 | 2013-10-10 08:48:16 +0000 | [diff] [blame] | 179 | ['build_with_chromium==0', { |
| 180 | 'targets': [ |
| 181 | { |
| 182 | 'target_name': 'buildbot_tests_scripts', |
| 183 | 'type': 'none', |
| 184 | 'copies': [ |
| 185 | { |
| 186 | 'destination': '<(PRODUCT_DIR)', |
| 187 | 'files': [ |
| 188 | 'buildbot_tests.py', |
| 189 | '<(webrtc_root)/tools/e2e_quality/audio/run_audio_test.py', |
| 190 | ], |
| 191 | }, |
| 192 | { |
| 193 | 'destination': '<(PRODUCT_DIR)/perf', |
| 194 | 'files': [ |
| 195 | '<(DEPTH)/tools/perf/__init__.py', |
| 196 | '<(DEPTH)/tools/perf/perf_utils.py', |
| 197 | ], |
| 198 | }, |
| 199 | ], |
| 200 | }, # target buildbot_tests_scripts |
| 201 | ], |
| 202 | }], |
henrike@webrtc.org | 89c6740 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 203 | # TODO(henrike): remove build_with_chromium==1 when the bots are using |
| 204 | # Chromium's buildbots. |
| 205 | ['include_tests==1 and build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 206 | 'targets': [ |
| 207 | { |
| 208 | 'target_name': 'test_support_unittests_apk_target', |
| 209 | 'type': 'none', |
| 210 | 'dependencies': [ |
| 211 | '<(apk_tests_path):test_support_unittests_apk', |
| 212 | ], |
| 213 | }, |
| 214 | ], |
| 215 | }], |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 216 | ['test_isolation_mode != "noop"', { |
| 217 | 'targets': [ |
| 218 | { |
| 219 | 'target_name': 'test_support_unittests_run', |
| 220 | 'type': 'none', |
| 221 | 'dependencies': [ |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 222 | 'test_support_unittests', |
| 223 | ], |
| 224 | 'includes': [ |
kjellander@webrtc.org | 2a97317 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 225 | '../build/isolate.gypi', |
kjellander@webrtc.org | 3365422 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 226 | 'test_support_unittests.isolate', |
| 227 | ], |
| 228 | 'sources': [ |
| 229 | 'test_support_unittests.isolate', |
| 230 | ], |
| 231 | }, |
| 232 | ], |
| 233 | }], |
henrike@webrtc.org | 89c6740 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 234 | ], |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 235 | } |