You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

375 lines
13 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #
  2. # libjingle
  3. # Copyright 2012, Google Inc.
  4. #
  5. # Redistribution and use in source and binary forms, with or without
  6. # modification, are permitted provided that the following conditions are met:
  7. #
  8. # 1. Redistributions of source code must retain the above copyright notice,
  9. # this list of conditions and the following disclaimer.
  10. # 2. Redistributions in binary form must reproduce the above copyright notice,
  11. # this list of conditions and the following disclaimer in the documentation
  12. # and/or other materials provided with the distribution.
  13. # 3. The name of the author may not be used to endorse or promote products
  14. # derived from this software without specific prior written permission.
  15. #
  16. # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  17. # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  18. # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  19. # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  20. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  21. # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  22. # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  23. # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  24. # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  25. # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. #
  27. {
  28. 'includes': ['build/common.gypi'],
  29. 'targets': [
  30. {
  31. # TODO(ronghuawu): Use gtest.gyp from chromium.
  32. 'target_name': 'gunit',
  33. 'type': 'static_library',
  34. 'sources': [
  35. '<(DEPTH)/third_party/gtest/src/gtest-all.cc',
  36. ],
  37. 'include_dirs': [
  38. '<(DEPTH)/third_party/gtest/include',
  39. '<(DEPTH)/third_party/gtest',
  40. ],
  41. 'direct_dependent_settings': {
  42. 'include_dirs': [
  43. '<(DEPTH)/third_party/gtest/include',
  44. ],
  45. },
  46. 'conditions': [
  47. ['OS=="android"', {
  48. 'include_dirs': [
  49. '<(android_ndk_include)',
  50. ]
  51. }],
  52. ],
  53. }, # target gunit
  54. {
  55. 'target_name': 'libjingle_unittest_main',
  56. 'type': 'static_library',
  57. 'dependencies': [
  58. 'gunit',
  59. ],
  60. 'sources': [
  61. 'base/unittest_main.cc',
  62. ],
  63. }, # target libjingle_unittest_main
  64. {
  65. 'target_name': 'libjingle_unittest',
  66. 'type': 'executable',
  67. 'dependencies': [
  68. 'gunit',
  69. 'libjingle.gyp:libjingle',
  70. 'libjingle_unittest_main',
  71. ],
  72. 'sources': [
  73. 'base/asynchttprequest_unittest.cc',
  74. 'base/atomicops_unittest.cc',
  75. 'base/autodetectproxy_unittest.cc',
  76. 'base/bandwidthsmoother_unittest.cc',
  77. 'base/base64_unittest.cc',
  78. 'base/basictypes_unittest.cc',
  79. 'base/buffer_unittest.cc',
  80. 'base/bytebuffer_unittest.cc',
  81. 'base/byteorder_unittest.cc',
  82. 'base/cpumonitor_unittest.cc',
  83. 'base/crc32_unittest.cc',
  84. 'base/event_unittest.cc',
  85. 'base/filelock_unittest.cc',
  86. 'base/fileutils_unittest.cc',
  87. 'base/helpers_unittest.cc',
  88. 'base/host_unittest.cc',
  89. 'base/httpbase_unittest.cc',
  90. 'base/httpcommon_unittest.cc',
  91. 'base/httpserver_unittest.cc',
  92. 'base/ipaddress_unittest.cc',
  93. 'base/logging_unittest.cc',
  94. 'base/md5digest_unittest.cc',
  95. 'base/messagedigest_unittest.cc',
  96. 'base/messagequeue_unittest.cc',
  97. 'base/multipart_unittest.cc',
  98. 'base/nat_unittest.cc',
  99. 'base/network_unittest.cc',
  100. 'base/nullsocketserver_unittest.cc',
  101. 'base/optionsfile_unittest.cc',
  102. 'base/pathutils_unittest.cc',
  103. 'base/physicalsocketserver_unittest.cc',
  104. 'base/proxy_unittest.cc',
  105. 'base/proxydetect_unittest.cc',
  106. 'base/ratelimiter_unittest.cc',
  107. 'base/ratetracker_unittest.cc',
  108. 'base/referencecountedsingletonfactory_unittest.cc',
  109. 'base/rollingaccumulator_unittest.cc',
  110. 'base/sha1digest_unittest.cc',
  111. 'base/sharedexclusivelock_unittest.cc',
  112. 'base/signalthread_unittest.cc',
  113. 'base/sigslot_unittest.cc',
  114. 'base/socket_unittest.cc',
  115. 'base/socketaddress_unittest.cc',
  116. 'base/stream_unittest.cc',
  117. 'base/stringencode_unittest.cc',
  118. 'base/stringutils_unittest.cc',
  119. # TODO(ronghuawu): Reenable this test.
  120. # 'base/systeminfo_unittest.cc',
  121. 'base/task_unittest.cc',
  122. 'base/testclient_unittest.cc',
  123. 'base/thread_unittest.cc',
  124. 'base/timeutils_unittest.cc',
  125. 'base/urlencode_unittest.cc',
  126. 'base/versionparsing_unittest.cc',
  127. 'base/virtualsocket_unittest.cc',
  128. # TODO(ronghuawu): Reenable this test.
  129. # 'base/windowpicker_unittest.cc',
  130. 'xmllite/qname_unittest.cc',
  131. 'xmllite/xmlbuilder_unittest.cc',
  132. 'xmllite/xmlelement_unittest.cc',
  133. 'xmllite/xmlnsstack_unittest.cc',
  134. 'xmllite/xmlparser_unittest.cc',
  135. 'xmllite/xmlprinter_unittest.cc',
  136. 'xmpp/hangoutpubsubclient_unittest.cc',
  137. 'xmpp/jid_unittest.cc',
  138. 'xmpp/mucroomconfigtask_unittest.cc',
  139. 'xmpp/mucroomdiscoverytask_unittest.cc',
  140. 'xmpp/mucroomlookuptask_unittest.cc',
  141. 'xmpp/mucroomuniquehangoutidtask_unittest.cc',
  142. 'xmpp/pingtask_unittest.cc',
  143. 'xmpp/pubsubclient_unittest.cc',
  144. 'xmpp/pubsubtasks_unittest.cc',
  145. 'xmpp/util_unittest.cc',
  146. 'xmpp/xmppengine_unittest.cc',
  147. 'xmpp/xmpplogintask_unittest.cc',
  148. 'xmpp/xmppstanzaparser_unittest.cc',
  149. ], # sources
  150. 'conditions': [
  151. ['OS=="linux"', {
  152. 'sources': [
  153. 'base/latebindingsymboltable_unittest.cc',
  154. # TODO(ronghuawu): Reenable this test.
  155. # 'base/linux_unittest.cc',
  156. 'base/linuxfdwalk_unittest.cc',
  157. ],
  158. }],
  159. ['OS=="win"', {
  160. 'sources': [
  161. 'base/win32_unittest.cc',
  162. 'base/win32regkey_unittest.cc',
  163. 'base/win32socketserver_unittest.cc',
  164. 'base/win32toolhelp_unittest.cc',
  165. 'base/win32window_unittest.cc',
  166. # TODO(ronghuawu): Reenable this test.
  167. # 'base/win32windowpicker_unittest.cc',
  168. 'base/winfirewall_unittest.cc',
  169. ],
  170. }],
  171. ['OS=="mac"', {
  172. 'sources': [
  173. 'base/macsocketserver_unittest.cc',
  174. 'base/macutils_unittest.cc',
  175. 'base/macwindowpicker_unittest.cc',
  176. ],
  177. }],
  178. ['os_posix==1', {
  179. 'sources': [
  180. 'base/sslidentity_unittest.cc',
  181. 'base/sslstreamadapter_unittest.cc',
  182. ],
  183. }],
  184. ], # conditions
  185. }, # target libjingle_unittest
  186. {
  187. 'target_name': 'libjingle_sound_unittest',
  188. 'type': 'executable',
  189. 'dependencies': [
  190. 'gunit',
  191. 'libjingle.gyp:libjingle_sound',
  192. 'libjingle_unittest_main',
  193. ],
  194. 'sources': [
  195. 'sound/automaticallychosensoundsystem_unittest.cc',
  196. ],
  197. }, # target libjingle_sound_unittest
  198. {
  199. 'target_name': 'libjingle_media_unittest',
  200. 'type': 'executable',
  201. 'dependencies': [
  202. 'gunit',
  203. 'libjingle.gyp:libjingle_media',
  204. 'libjingle_unittest_main',
  205. ],
  206. # TODO(ronghuawu): Avoid the copies.
  207. # https://code.google.com/p/libjingle/issues/detail?id=398
  208. 'copies': [
  209. {
  210. 'destination': '<(DEPTH)/../talk/media/testdata',
  211. 'files': [
  212. 'media/testdata/1.frame_plus_1.byte',
  213. 'media/testdata/captured-320x240-2s-48.frames',
  214. 'media/testdata/h264-svc-99-640x360.rtpdump',
  215. 'media/testdata/video.rtpdump',
  216. 'media/testdata/voice.rtpdump',
  217. ],
  218. },
  219. ],
  220. 'sources': [
  221. # TODO(ronghuawu): Reenable this test.
  222. # 'media/base/capturemanager_unittest.cc',
  223. 'media/base/codec_unittest.cc',
  224. 'media/base/filemediaengine_unittest.cc',
  225. 'media/base/rtpdataengine_unittest.cc',
  226. 'media/base/rtpdump_unittest.cc',
  227. 'media/base/rtputils_unittest.cc',
  228. 'media/base/testutils.cc',
  229. 'media/base/videocapturer_unittest.cc',
  230. 'media/base/videocommon_unittest.cc',
  231. # TODO(ronghuawu): Reenable this test.
  232. # 'media/devices/devicemanager_unittest.cc',
  233. 'media/devices/dummydevicemanager_unittest.cc',
  234. 'media/devices/filevideocapturer_unittest.cc',
  235. ],
  236. 'conditions': [
  237. ['OS=="win"', {
  238. 'msvs_settings': {
  239. 'VCLinkerTool': {
  240. 'AdditionalDependencies': [
  241. # TODO(ronghuawu): Since we've included strmiids in
  242. # libjingle_media target, we shouldn't need this here.
  243. # Find out why it doesn't work without this.
  244. 'strmiids.lib',
  245. ],
  246. },
  247. },
  248. }],
  249. ],
  250. }, # target libjingle_media_unittest
  251. {
  252. 'target_name': 'libjingle_p2p_unittest',
  253. 'type': 'executable',
  254. 'dependencies': [
  255. '<(DEPTH)/third_party/libsrtp/libsrtp.gyp:libsrtp',
  256. 'gunit',
  257. 'libjingle.gyp:libjingle',
  258. 'libjingle.gyp:libjingle_p2p',
  259. 'libjingle_unittest_main',
  260. ],
  261. 'include_dirs': [
  262. '<(DEPTH)/third_party/libsrtp/srtp',
  263. ],
  264. 'sources': [
  265. # TODO(ronghuawu): testutils.cc should be moved to some common place.
  266. 'media/base/testutils.cc',
  267. 'p2p/base/dtlstransportchannel_unittest.cc',
  268. 'p2p/base/p2ptransportchannel_unittest.cc',
  269. 'p2p/base/port_unittest.cc',
  270. 'p2p/base/portallocatorsessionproxy_unittest.cc',
  271. 'p2p/base/pseudotcp_unittest.cc',
  272. 'p2p/base/relayport_unittest.cc',
  273. 'p2p/base/relayserver_unittest.cc',
  274. 'p2p/base/session_unittest.cc',
  275. 'p2p/base/stun_unittest.cc',
  276. 'p2p/base/stunport_unittest.cc',
  277. 'p2p/base/stunrequest_unittest.cc',
  278. 'p2p/base/stunserver_unittest.cc',
  279. 'p2p/base/transport_unittest.cc',
  280. 'p2p/base/transportdescriptionfactory_unittest.cc',
  281. 'p2p/client/connectivitychecker_unittest.cc',
  282. 'p2p/client/portallocator_unittest.cc',
  283. 'session/media/channel_unittest.cc',
  284. 'session/media/channelmanager_unittest.cc',
  285. 'session/media/currentspeakermonitor_unittest.cc',
  286. 'session/media/mediarecorder_unittest.cc',
  287. 'session/media/mediamessages_unittest.cc',
  288. 'session/media/mediasession_unittest.cc',
  289. 'session/media/mediasessionclient_unittest.cc',
  290. 'session/media/rtcpmuxfilter_unittest.cc',
  291. 'session/media/srtpfilter_unittest.cc',
  292. 'session/media/ssrcmuxfilter_unittest.cc',
  293. ],
  294. 'conditions': [
  295. ['OS=="win"', {
  296. 'msvs_settings': {
  297. 'VCLinkerTool': {
  298. 'AdditionalDependencies': [
  299. 'strmiids.lib',
  300. ],
  301. },
  302. },
  303. }],
  304. ],
  305. }, # target libjingle_p2p_unittest
  306. {
  307. 'target_name': 'libjingle_peerconnection_unittest',
  308. 'type': 'executable',
  309. 'dependencies': [
  310. 'gunit',
  311. 'libjingle.gyp:libjingle',
  312. 'libjingle.gyp:libjingle_p2p',
  313. 'libjingle.gyp:libjingle_peerconnection',
  314. 'libjingle_unittest_main',
  315. ],
  316. # TODO(ronghuawu): Reenable below unit tests that require gmock.
  317. 'sources': [
  318. 'app/webrtc/dtmfsender_unittest.cc',
  319. 'app/webrtc/jsepsessiondescription_unittest.cc',
  320. 'app/webrtc/localaudiosource_unittest.cc',
  321. 'app/webrtc/localvideosource_unittest.cc',
  322. # 'app/webrtc/mediastream_unittest.cc',
  323. # 'app/webrtc/mediastreamhandler_unittest.cc',
  324. 'app/webrtc/mediastreamsignaling_unittest.cc',
  325. 'app/webrtc/peerconnection_unittest.cc',
  326. 'app/webrtc/peerconnectionfactory_unittest.cc',
  327. 'app/webrtc/peerconnectioninterface_unittest.cc',
  328. # 'app/webrtc/peerconnectionproxy_unittest.cc',
  329. # 'app/webrtc/statscollector_unittest.cc',
  330. 'app/webrtc/test/fakeaudiocapturemodule.cc',
  331. 'app/webrtc/test/fakeaudiocapturemodule_unittest.cc',
  332. 'app/webrtc/videotrack_unittest.cc',
  333. 'app/webrtc/webrtcsdp_unittest.cc',
  334. 'app/webrtc/webrtcsession_unittest.cc',
  335. ],
  336. }, # target libjingle_peerconnection_unittest
  337. ],
  338. 'conditions': [
  339. ['libjingle_java == 1', {
  340. 'targets': [
  341. {
  342. 'target_name': 'libjingle_peerconnection_test_jar',
  343. 'type': 'none',
  344. 'actions': [
  345. {
  346. 'variables': {
  347. 'java_src_dir': 'app/webrtc/javatests/src',
  348. 'java_files': [
  349. 'app/webrtc/javatests/src/org/webrtc/PeerConnectionTest.java',
  350. ],
  351. },
  352. 'action_name': 'create_jar',
  353. 'inputs': [
  354. 'build/build_jar.sh',
  355. '<@(java_files)',
  356. '<(PRODUCT_DIR)/libjingle_peerconnection.jar',
  357. '<(DEPTH)/third_party/junit/junit-4.11.jar',
  358. ],
  359. 'outputs': [
  360. '<(PRODUCT_DIR)/libjingle_peerconnection_test.jar',
  361. ],
  362. 'action': [
  363. 'build/build_jar.sh', '<@(_outputs)', '<(INTERMEDIATE_DIR)',
  364. '<(java_src_dir)', '',
  365. '<(PRODUCT_DIR)/libjingle_peerconnection.jar:<(DEPTH)/third_party/junit/junit-4.11.jar',
  366. '<@(java_files)'
  367. ],
  368. },
  369. ],
  370. },
  371. ],
  372. }],
  373. ],
  374. }