andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +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': [ |
| 12 | '../build/common.gypi', |
| 13 | ], |
| 14 | 'targets': [ |
| 15 | { |
kjellander@webrtc.org | 46cec2a | 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 | c33d37c | 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 | { |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 56 | 'target_name': 'test_support', |
| 57 | 'type': 'static_library', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 58 | 'dependencies': [ |
| 59 | '<(DEPTH)/testing/gtest.gyp:gtest', |
| 60 | '<(DEPTH)/testing/gmock.gyp:gmock', |
andrew@webrtc.org | e41c6b2 | 2013-09-05 21:16:29 +0000 | [diff] [blame] | 61 | '<(DEPTH)/third_party/gflags/gflags.gyp:gflags', |
andrew@webrtc.org | 4c27c03 | 2013-03-22 17:13:23 +0000 | [diff] [blame] | 62 | '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 63 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 64 | 'sources': [ |
| 65 | 'test_suite.cc', |
| 66 | 'test_suite.h', |
henrike@webrtc.org | e25e28f | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 67 | 'testsupport/android/root_path_android.cc', |
| 68 | 'testsupport/android/root_path_android_chromium.cc', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 69 | 'testsupport/fileutils.cc', |
andrew@webrtc.org | d064f58 | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 70 | 'testsupport/fileutils.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 71 | 'testsupport/frame_reader.cc', |
andrew@webrtc.org | d064f58 | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 72 | 'testsupport/frame_reader.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 73 | 'testsupport/frame_writer.cc', |
andrew@webrtc.org | d064f58 | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 74 | 'testsupport/frame_writer.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 75 | 'testsupport/gtest_prod_util.h', |
phoglund@webrtc.org | b790741 | 2013-01-09 16:53:42 +0000 | [diff] [blame] | 76 | 'testsupport/gtest_disable.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 77 | 'testsupport/mock/mock_frame_reader.h', |
| 78 | 'testsupport/mock/mock_frame_writer.h', |
andrew@webrtc.org | d064f58 | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 79 | 'testsupport/packet_reader.cc', |
| 80 | 'testsupport/packet_reader.h', |
| 81 | 'testsupport/perf_test.cc', |
| 82 | 'testsupport/perf_test.h', |
andrew@webrtc.org | 8826e34 | 2013-03-25 16:23:37 +0000 | [diff] [blame] | 83 | 'testsupport/trace_to_stderr.cc', |
| 84 | 'testsupport/trace_to_stderr.h', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 85 | ], |
henrike@webrtc.org | e25e28f | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 86 | 'conditions': [ |
| 87 | # TODO(henrike): remove build_with_chromium==1 when the bots are using |
| 88 | # Chromium's buildbots. |
| 89 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 90 | 'dependencies': [ |
| 91 | '<(DEPTH)/base/base.gyp:base', |
| 92 | ], |
| 93 | 'sources!': [ |
| 94 | 'testsupport/android/root_path_android.cc', |
| 95 | ], |
henrike@webrtc.org | e25e28f | 2013-07-08 14:55:23 +0000 | [diff] [blame] | 96 | }, { |
| 97 | 'sources!': [ |
| 98 | 'testsupport/android/root_path_android_chromium.cc', |
| 99 | ], |
| 100 | }], |
| 101 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 102 | }, |
| 103 | { |
| 104 | # Depend on this target when you want to have test_support but also the |
| 105 | # main method needed for gtest to execute! |
| 106 | 'target_name': 'test_support_main', |
| 107 | 'type': 'static_library', |
| 108 | 'dependencies': [ |
| 109 | 'test_support', |
| 110 | ], |
| 111 | 'sources': [ |
| 112 | 'run_all_unittests.cc', |
| 113 | ], |
| 114 | }, |
| 115 | { |
| 116 | # Depend on this target when you want to have test_support and a special |
| 117 | # main for mac which will run your test on a worker thread and consume |
| 118 | # events on the main thread. Useful if you want to access a webcam. |
| 119 | # This main will provide all the scaffolding and objective-c black magic |
| 120 | # for you. All you need to do is to implement a function in the |
| 121 | # run_threaded_main_mac.h file (ImplementThisToRunYourTest). |
| 122 | 'target_name': 'test_support_main_threaded_mac', |
| 123 | 'type': 'static_library', |
| 124 | 'dependencies': [ |
| 125 | 'test_support', |
| 126 | ], |
| 127 | 'sources': [ |
| 128 | 'testsupport/mac/run_threaded_main_mac.h', |
| 129 | 'testsupport/mac/run_threaded_main_mac.mm', |
| 130 | ], |
| 131 | }, |
| 132 | { |
| 133 | 'target_name': 'test_support_unittests', |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 134 | 'type': '<(gtest_target_type)', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 135 | 'dependencies': [ |
kjellander@webrtc.org | 46cec2a | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 136 | 'channel_transport', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 137 | 'test_support_main', |
kjellander@webrtc.org | 46cec2a | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 138 | '<(DEPTH)/testing/gmock.gyp:gmock', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 139 | '<(DEPTH)/testing/gtest.gyp:gtest', |
| 140 | ], |
| 141 | 'sources': [ |
kjellander@webrtc.org | 46cec2a | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 142 | 'channel_transport/udp_transport_unittest.cc', |
| 143 | 'channel_transport/udp_socket_manager_unittest.cc', |
| 144 | 'channel_transport/udp_socket_wrapper_unittest.cc', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 145 | 'testsupport/unittest_utils.h', |
| 146 | 'testsupport/fileutils_unittest.cc', |
| 147 | 'testsupport/frame_reader_unittest.cc', |
| 148 | 'testsupport/frame_writer_unittest.cc', |
| 149 | 'testsupport/packet_reader_unittest.cc', |
andrew@webrtc.org | d064f58 | 2012-11-20 00:20:20 +0000 | [diff] [blame] | 150 | 'testsupport/perf_test_unittest.cc', |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 151 | ], |
kjellander@webrtc.org | 46cec2a | 2013-06-11 08:29:17 +0000 | [diff] [blame] | 152 | # Disable warnings to enable Win64 build, issue 1323. |
| 153 | 'msvs_disabled_warnings': [ |
| 154 | 4267, # size_t to int truncation. |
| 155 | ], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 156 | 'conditions': [ |
| 157 | # TODO(henrike): remove build_with_chromium==1 when the bots are |
| 158 | # using Chromium's buildbots. |
| 159 | ['build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 160 | 'dependencies': [ |
| 161 | '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code', |
| 162 | ], |
| 163 | }], |
| 164 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 165 | }, |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 166 | ], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 167 | 'conditions': [ |
kjellander@webrtc.org | 8e70108 | 2013-10-10 08:48:16 +0000 | [diff] [blame] | 168 | ['build_with_chromium==0', { |
| 169 | 'targets': [ |
| 170 | { |
| 171 | 'target_name': 'buildbot_tests_scripts', |
| 172 | 'type': 'none', |
| 173 | 'copies': [ |
| 174 | { |
| 175 | 'destination': '<(PRODUCT_DIR)', |
| 176 | 'files': [ |
| 177 | 'buildbot_tests.py', |
| 178 | '<(webrtc_root)/tools/e2e_quality/audio/run_audio_test.py', |
| 179 | ], |
| 180 | }, |
| 181 | { |
| 182 | 'destination': '<(PRODUCT_DIR)/perf', |
| 183 | 'files': [ |
| 184 | '<(DEPTH)/tools/perf/__init__.py', |
| 185 | '<(DEPTH)/tools/perf/perf_utils.py', |
| 186 | ], |
| 187 | }, |
| 188 | ], |
| 189 | }, # target buildbot_tests_scripts |
| 190 | ], |
| 191 | }], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 192 | # TODO(henrike): remove build_with_chromium==1 when the bots are using |
| 193 | # Chromium's buildbots. |
| 194 | ['include_tests==1 and build_with_chromium==1 and OS=="android" and gtest_target_type=="shared_library"', { |
| 195 | 'targets': [ |
| 196 | { |
| 197 | 'target_name': 'test_support_unittests_apk_target', |
| 198 | 'type': 'none', |
| 199 | 'dependencies': [ |
| 200 | '<(apk_tests_path):test_support_unittests_apk', |
| 201 | ], |
| 202 | }, |
| 203 | ], |
| 204 | }], |
kjellander@webrtc.org | 3540c82 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 205 | ['test_isolation_mode != "noop"', { |
| 206 | 'targets': [ |
| 207 | { |
| 208 | 'target_name': 'test_support_unittests_run', |
| 209 | 'type': 'none', |
| 210 | 'dependencies': [ |
kjellander@webrtc.org | 3540c82 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 211 | 'test_support_unittests', |
| 212 | ], |
| 213 | 'includes': [ |
kjellander@webrtc.org | 22a2893 | 2013-10-02 19:31:16 +0000 | [diff] [blame] | 214 | '../build/isolate.gypi', |
kjellander@webrtc.org | 3540c82 | 2013-08-22 07:57:00 +0000 | [diff] [blame] | 215 | 'test_support_unittests.isolate', |
| 216 | ], |
| 217 | 'sources': [ |
| 218 | 'test_support_unittests.isolate', |
| 219 | ], |
| 220 | }, |
| 221 | ], |
| 222 | }], |
henrike@webrtc.org | acb00f5 | 2013-08-02 16:53:47 +0000 | [diff] [blame] | 223 | ], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 224 | } |