1 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style license that can be 3 # found in the LICENSE file. 4 5 { 6 'targets': [ 7 { 8 # GN version: //mojo/public/c/test_support 9 'target_name': 'mojo_test_support', 10 'defines': [ 11 'MOJO_TEST_SUPPORT_IMPLEMENTATION', 12 ], 13 'include_dirs': [ 14 '..', 15 ], 16 'direct_dependent_settings': { 17 'include_dirs': [ 18 '..', 19 ], 20 }, 21 'sources': [ 22 'public/c/test_support/test_support.h', 23 'public/c/test_support/test_support_export.h', 24 # TODO(vtl): Convert this to thunks http://crbug.com/386799 25 'public/tests/test_support_private.cc', 26 'public/tests/test_support_private.h', 27 ], 28 'conditions': [ 29 ['OS=="ios"', { 30 'type': 'static_library', 31 }, { 32 'type': 'shared_library', 33 }], 34 ['OS=="mac"', { 35 'xcode_settings': { 36 # Make it a run-path dependent library. 37 'DYLIB_INSTALL_NAME_BASE': '@loader_path', 38 }, 39 }], 40 ], 41 }, 42 { 43 # GN version: //mojo/public/cpp/test_support:test_utils 44 'target_name': 'mojo_public_test_utils', 45 'type': 'static_library', 46 'dependencies': [ 47 '../base/base.gyp:base', 48 '../testing/gtest.gyp:gtest', 49 'mojo_test_support', 50 ], 51 'sources': [ 52 'public/cpp/test_support/lib/test_support.cc', 53 'public/cpp/test_support/lib/test_utils.cc', 54 'public/cpp/test_support/test_utils.h', 55 ], 56 }, 57 { 58 # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_test_utils 59 'target_name': 'mojo_public_bindings_test_utils', 60 'type': 'static_library', 61 'dependencies': [ 62 '../base/base.gyp:base', 63 ], 64 'sources': [ 65 'public/cpp/bindings/tests/validation_test_input_parser.cc', 66 'public/cpp/bindings/tests/validation_test_input_parser.h', 67 ], 68 }, 69 # TODO(vtl): Reorganize the mojo_public_*_unittests. 70 { 71 # GN version: //mojo/public/cpp/bindings/tests:mojo_public_bindings_unittests 72 'target_name': 'mojo_public_bindings_unittests', 73 'type': 'executable', 74 'dependencies': [ 75 '../testing/gtest.gyp:gtest', 76 'mojo_cpp_bindings', 77 'mojo_environment_standalone', 78 'mojo_public_test_utils', 79 'mojo_run_all_unittests', 80 'mojo_public_bindings_test_utils', 81 'mojo_public_test_interfaces', 82 'mojo_utility', 83 ], 84 'sources': [ 85 'public/cpp/bindings/tests/array_unittest.cc', 86 'public/cpp/bindings/tests/bounds_checker_unittest.cc', 87 'public/cpp/bindings/tests/buffer_unittest.cc', 88 'public/cpp/bindings/tests/connector_unittest.cc', 89 'public/cpp/bindings/tests/handle_passing_unittest.cc', 90 'public/cpp/bindings/tests/interface_ptr_unittest.cc', 91 'public/cpp/bindings/tests/request_response_unittest.cc', 92 'public/cpp/bindings/tests/router_unittest.cc', 93 'public/cpp/bindings/tests/sample_service_unittest.cc', 94 'public/cpp/bindings/tests/serialization_warning_unittest.cc', 95 'public/cpp/bindings/tests/string_unittest.cc', 96 'public/cpp/bindings/tests/struct_unittest.cc', 97 'public/cpp/bindings/tests/type_conversion_unittest.cc', 98 'public/cpp/bindings/tests/validation_unittest.cc', 99 ], 100 }, 101 { 102 # GN version: //mojo/public/cpp/environment/tests:mojo_public_environment_unittests 103 'target_name': 'mojo_public_environment_unittests', 104 'type': 'executable', 105 'dependencies': [ 106 '../testing/gtest.gyp:gtest', 107 'mojo_environment_standalone', 108 'mojo_public_test_utils', 109 'mojo_run_all_unittests', 110 'mojo_utility', 111 ], 112 'include_dirs': [ '..' ], 113 'sources': [ 114 'public/cpp/environment/tests/async_waiter_unittest.cc', 115 'public/cpp/environment/tests/logger_unittest.cc', 116 'public/cpp/environment/tests/logging_unittest.cc', 117 ], 118 }, 119 { 120 # GN version: //mojo/public/cpp/application/tests:mojo_public_application_unittests 121 'target_name': 'mojo_public_application_unittests', 122 'type': 'executable', 123 'dependencies': [ 124 '../base/base.gyp:base', 125 '../testing/gtest.gyp:gtest', 126 'mojo_application_standalone', 127 'mojo_utility', 128 'mojo_environment_standalone', 129 'mojo_run_all_unittests', 130 ], 131 'sources': [ 132 'public/cpp/application/tests/service_registry_unittest.cc', 133 ], 134 }, 135 { 136 # GN version: //mojo/public/cpp/application/tests:mojo_public_system_unittests 137 'target_name': 'mojo_public_system_unittests', 138 'type': 'executable', 139 'dependencies': [ 140 '../testing/gtest.gyp:gtest', 141 'mojo_public_test_utils', 142 'mojo_run_all_unittests', 143 ], 144 'include_dirs': [ '..' ], 145 'sources': [ 146 '<@(mojo_public_system_unittest_sources)', 147 ], 148 }, 149 { 150 # GN version: //mojo/public/cpp/application/tests:mojo_public_utility_unittests 151 'target_name': 'mojo_public_utility_unittests', 152 'type': 'executable', 153 'dependencies': [ 154 '../testing/gtest.gyp:gtest', 155 'mojo_public_test_utils', 156 'mojo_run_all_unittests', 157 'mojo_utility', 158 ], 159 'include_dirs' : [ '..' ], 160 'sources': [ 161 'public/cpp/utility/tests/mutex_unittest.cc', 162 'public/cpp/utility/tests/run_loop_unittest.cc', 163 'public/cpp/utility/tests/thread_unittest.cc', 164 ], 165 'conditions': [ 166 # See crbug.com/342893: 167 ['OS=="win"', { 168 'sources!': [ 169 'public/cpp/utility/tests/mutex_unittest.cc', 170 'public/cpp/utility/tests/thread_unittest.cc', 171 ], 172 }], 173 ], 174 }, 175 { 176 # GN version: //mojo/public/c/system/tests:perftests 177 'target_name': 'mojo_public_system_perftests', 178 'type': 'executable', 179 'dependencies': [ 180 '../base/base.gyp:base', 181 '../testing/gtest.gyp:gtest', 182 'mojo_public_test_utils', 183 'mojo_run_all_perftests', 184 'mojo_utility', 185 ], 186 'sources': [ 187 'public/c/system/tests/core_perftest.cc', 188 ], 189 }, 190 { 191 # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces 192 'target_name': 'mojo_public_test_interfaces', 193 'type': 'static_library', 194 'sources': [ 195 'public/interfaces/bindings/tests/math_calculator.mojom', 196 'public/interfaces/bindings/tests/rect.mojom', 197 'public/interfaces/bindings/tests/sample_factory.mojom', 198 'public/interfaces/bindings/tests/sample_import.mojom', 199 'public/interfaces/bindings/tests/sample_import2.mojom', 200 'public/interfaces/bindings/tests/sample_interfaces.mojom', 201 'public/interfaces/bindings/tests/sample_service.mojom', 202 'public/interfaces/bindings/tests/serialization_test_structs.mojom', 203 'public/interfaces/bindings/tests/test_structs.mojom', 204 'public/interfaces/bindings/tests/validation_test_interfaces.mojom', 205 ], 206 'includes': [ 'public/tools/bindings/mojom_bindings_generator.gypi' ], 207 'export_dependent_settings': [ 208 'mojo_cpp_bindings', 209 ], 210 'dependencies': [ 211 'mojo_cpp_bindings', 212 ], 213 }, 214 { 215 # GN version: //mojo/public/js/bindings/tests:mojo_js_unittests 216 'target_name': 'mojo_js_unittests', 217 'type': 'executable', 218 'dependencies': [ 219 '../gin/gin.gyp:gin_test', 220 'mojo_common_test_support', 221 'mojo_environment_standalone', 222 'mojo_js_bindings_lib', 223 'mojo_public_test_interfaces', 224 'mojo_run_all_unittests', 225 'mojo_utility', 226 ], 227 'sources': [ 228 'public/js/bindings/tests/run_js_tests.cc', 229 ], 230 }, 231 ], 232 } 233