blob: 7f12a7194581ec767f9794aa13d49d98d8d841f1 [file] [log] [blame]
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +00001# 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.org81cf5e42012-06-27 01:41:54 +000012 '../build/common.gypi',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000013 ],
14 'targets': [
15 {
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +000016 '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 {
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000045 'target_name': 'test_support',
46 'type': 'static_library',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000047 'include_dirs': [
kjellander@webrtc.orgb2d74972013-01-26 16:36:40 +000048 # TODO(kjellander): Remove this by making all includes use full paths.
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000049 '.',
50 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000051 'dependencies': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000052 '<(DEPTH)/testing/gtest.gyp:gtest',
53 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.orgc1ffd332013-03-22 17:13:23 +000054 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000055 ],
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000056 'all_dependent_settings': {
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000057 'include_dirs': [
kjellander@webrtc.orgb2d74972013-01-26 16:36:40 +000058 # TODO(kjellander): Remove this by making all includes use full paths.
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000059 '.',
60 ],
61 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000062 'sources': [
63 'test_suite.cc',
64 'test_suite.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000065 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000066 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000067 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000068 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000069 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000070 'testsupport/frame_writer.h',
kjellander@webrtc.org51198f12012-02-21 17:53:46 +000071 'testsupport/gtest_prod_util.h',
phoglund@webrtc.orgd0054682013-01-09 16:53:42 +000072 'testsupport/gtest_disable.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000073 'testsupport/mock/mock_frame_reader.h',
74 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000075 'testsupport/packet_reader.cc',
76 'testsupport/packet_reader.h',
77 'testsupport/perf_test.cc',
78 'testsupport/perf_test.h',
andrew@webrtc.orgb87cc852013-03-25 16:23:37 +000079 'testsupport/trace_to_stderr.cc',
80 'testsupport/trace_to_stderr.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000081 ],
82 },
83 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000084 # Depend on this target when you want to have test_support but also the
85 # main method needed for gtest to execute!
86 'target_name': 'test_support_main',
87 'type': 'static_library',
88 'dependencies': [
89 'test_support',
90 ],
91 'sources': [
92 'run_all_unittests.cc',
93 ],
94 },
95 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +000096 # Depend on this target when you want to have test_support and a special
97 # main for mac which will run your test on a worker thread and consume
98 # events on the main thread. Useful if you want to access a webcam.
99 # This main will provide all the scaffolding and objective-c black magic
100 # for you. All you need to do is to implement a function in the
101 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
102 'target_name': 'test_support_main_threaded_mac',
103 'type': 'static_library',
104 'dependencies': [
105 'test_support',
106 ],
107 'sources': [
108 'testsupport/mac/run_threaded_main_mac.h',
109 'testsupport/mac/run_threaded_main_mac.mm',
110 ],
111 },
112 {
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000113 'target_name': 'test_support_unittests',
114 'type': 'executable',
115 'dependencies': [
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000116 'channel_transport',
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000117 'test_support_main',
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000118 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +0000119 '<(DEPTH)/testing/gtest.gyp:gtest',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000120 ],
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +0000121 'sources': [
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000122 'channel_transport/udp_transport_unittest.cc',
123 'channel_transport/udp_socket_manager_unittest.cc',
124 'channel_transport/udp_socket_wrapper_unittest.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000125 'testsupport/unittest_utils.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +0000126 'testsupport/fileutils_unittest.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +0000127 'testsupport/frame_reader_unittest.cc',
128 'testsupport/frame_writer_unittest.cc',
129 'testsupport/packet_reader_unittest.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +0000130 'testsupport/perf_test_unittest.cc',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000131 ],
kjellander@webrtc.org6c35e0b2013-06-11 08:29:17 +0000132 # Disable warnings to enable Win64 build, issue 1323.
133 'msvs_disabled_warnings': [
134 4267, # size_t to int truncation.
135 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000136 },
kjellander@webrtc.org3e47a0a2013-01-25 10:10:53 +0000137 {
138 'target_name': 'buildbot_tests_scripts',
139 'type': 'none',
140 'copies': [
141 {
142 'destination': '<(PRODUCT_DIR)',
143 'files': [
144 'buildbot_tests.py',
145 '<(DEPTH)/tools/e2e_quality/audio/run_audio_test.py',
146 ],
147 },
148 {
149 'destination': '<(PRODUCT_DIR)/perf',
150 'files': [
kjellander@webrtc.orgd3ecb612013-01-25 12:18:15 +0000151 '<(DEPTH)/tools/perf/__init__.py',
152 '<(DEPTH)/tools/perf/perf_utils.py',
kjellander@webrtc.org3e47a0a2013-01-25 10:10:53 +0000153 ],
154 },
155 ],
156 }, # target buildbot_tests_scripts
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000157 ],
158}