blob: ff83ec53c9c3b11d096da181b7ad07209dce6ae5 [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 {
16 'target_name': 'test_support',
17 'type': 'static_library',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000018 'include_dirs': [
kjellander@webrtc.orgb2d74972013-01-26 16:36:40 +000019 # TODO(kjellander): Remove this by making all includes use full paths.
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000020 '.',
21 ],
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000022 'dependencies': [
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000023 '<(DEPTH)/testing/gtest.gyp:gtest',
24 '<(DEPTH)/testing/gmock.gyp:gmock',
andrew@webrtc.orgc1ffd332013-03-22 17:13:23 +000025 '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000026 ],
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000027 'all_dependent_settings': {
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000028 'include_dirs': [
kjellander@webrtc.orgb2d74972013-01-26 16:36:40 +000029 # TODO(kjellander): Remove this by making all includes use full paths.
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000030 '.',
31 ],
32 },
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000033 'sources': [
34 'test_suite.cc',
35 'test_suite.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000036 'testsupport/fileutils.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000037 'testsupport/fileutils.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000038 'testsupport/frame_reader.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000039 'testsupport/frame_reader.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000040 'testsupport/frame_writer.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000041 'testsupport/frame_writer.h',
kjellander@webrtc.org51198f12012-02-21 17:53:46 +000042 'testsupport/gtest_prod_util.h',
phoglund@webrtc.orgd0054682013-01-09 16:53:42 +000043 'testsupport/gtest_disable.h',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000044 'testsupport/mock/mock_frame_reader.h',
45 'testsupport/mock/mock_frame_writer.h',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000046 'testsupport/packet_reader.cc',
47 'testsupport/packet_reader.h',
48 'testsupport/perf_test.cc',
49 'testsupport/perf_test.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000050 ],
51 },
52 {
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000053 # Depend on this target when you want to have test_support but also the
54 # main method needed for gtest to execute!
55 'target_name': 'test_support_main',
56 'type': 'static_library',
57 'dependencies': [
58 'test_support',
59 ],
60 'sources': [
61 'run_all_unittests.cc',
62 ],
63 },
64 {
phoglund@webrtc.org54e22eb2012-08-08 08:27:46 +000065 # Depend on this target when you want to have test_support and a special
66 # main for mac which will run your test on a worker thread and consume
67 # events on the main thread. Useful if you want to access a webcam.
68 # This main will provide all the scaffolding and objective-c black magic
69 # for you. All you need to do is to implement a function in the
70 # run_threaded_main_mac.h file (ImplementThisToRunYourTest).
71 'target_name': 'test_support_main_threaded_mac',
72 'type': 'static_library',
73 'dependencies': [
74 'test_support',
75 ],
76 'sources': [
77 'testsupport/mac/run_threaded_main_mac.h',
78 'testsupport/mac/run_threaded_main_mac.mm',
79 ],
80 },
81 {
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000082 'target_name': 'test_support_unittests',
83 'type': 'executable',
84 'dependencies': [
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000085 'test_support_main',
andrew@webrtc.org81cf5e42012-06-27 01:41:54 +000086 '<(DEPTH)/testing/gtest.gyp:gtest',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000087 ],
kjellander@webrtc.org1a8d08a2011-11-03 23:28:47 +000088 'sources': [
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000089 'testsupport/unittest_utils.h',
kjellander@webrtc.org7951e812011-10-13 12:24:41 +000090 'testsupport/fileutils_unittest.cc',
kjellander@webrtc.org5b97b122011-12-08 07:42:18 +000091 'testsupport/frame_reader_unittest.cc',
92 'testsupport/frame_writer_unittest.cc',
93 'testsupport/packet_reader_unittest.cc',
andrew@webrtc.org2009f6b2012-11-20 00:20:20 +000094 'testsupport/perf_test_unittest.cc',
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000095 ],
96 },
kjellander@webrtc.org3e47a0a2013-01-25 10:10:53 +000097 {
98 'target_name': 'buildbot_tests_scripts',
99 'type': 'none',
100 'copies': [
101 {
102 'destination': '<(PRODUCT_DIR)',
103 'files': [
104 'buildbot_tests.py',
105 '<(DEPTH)/tools/e2e_quality/audio/run_audio_test.py',
106 ],
107 },
108 {
109 'destination': '<(PRODUCT_DIR)/perf',
110 'files': [
kjellander@webrtc.orgd3ecb612013-01-25 12:18:15 +0000111 '<(DEPTH)/tools/perf/__init__.py',
112 '<(DEPTH)/tools/perf/perf_utils.py',
kjellander@webrtc.org3e47a0a2013-01-25 10:10:53 +0000113 ],
114 },
115 ],
116 }, # target buildbot_tests_scripts
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +0000117 ],
118}