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 '../src/build/common.gypi', 13 ], 14 'targets': [ 15 { 16 'target_name': 'test_support', 17 'type': 'static_library', 18 'include_dirs': [ 19 '.', 20 ], 21 'direct_dependent_settings': { 22 'include_dirs': [ 23 '.', # Some includes are hierarchical 24 ], 25 }, 26 'dependencies': [ 27 '<(webrtc_root)/../testing/gtest.gyp:gtest', 28 '<(webrtc_root)/../testing/gmock.gyp:gmock', 29 ], 30 'all_dependent_settings': { 31 'include_dirs': [ 32 '.', 33 ], 34 }, 35 'sources': [ 36 'test_suite.cc', 37 'test_suite.h', 38 'testsupport/fileutils.h', 39 'testsupport/fileutils.cc', 40 'testsupport/frame_reader.h', 41 'testsupport/frame_reader.cc', 42 'testsupport/frame_writer.h', 43 'testsupport/frame_writer.cc', 44 'testsupport/packet_reader.h', 45 'testsupport/packet_reader.cc', 46 'testsupport/mock/mock_frame_reader.h', 47 'testsupport/mock/mock_frame_writer.h', 48 ], 49 }, 50 { 51 # Depend on this target when you want to have test_support but also the 52 # main method needed for gtest to execute! 53 'target_name': 'test_support_main', 54 'type': 'static_library', 55 'dependencies': [ 56 'test_support', 57 ], 58 'sources': [ 59 'run_all_unittests.cc', 60 ], 61 }, 62 { 63 'target_name': 'test_support_unittests', 64 'type': 'executable', 65 'dependencies': [ 66 'test_support_main', 67 '<(webrtc_root)/../testing/gtest.gyp:gtest', 68 ], 69 'sources': [ 70 'testsupport/unittest_utils.h', 71 'testsupport/fileutils_unittest.cc', 72 'testsupport/frame_reader_unittest.cc', 73 'testsupport/frame_writer_unittest.cc', 74 'testsupport/packet_reader_unittest.cc', 75 ], 76 }, 77 ], 78 } 79