util_test.gyp 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # Copyright 2014 The Crashpad Authors. All rights reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. {
  15. 'includes': [
  16. '../build/crashpad.gypi',
  17. ],
  18. 'targets': [
  19. {
  20. 'target_name': 'crashpad_util_test',
  21. 'type': 'executable',
  22. 'dependencies': [
  23. 'util.gyp:crashpad_util',
  24. '../client/client.gyp:crashpad_client',
  25. '../compat/compat.gyp:crashpad_compat',
  26. '../test/test.gyp:crashpad_gmock_main',
  27. '../test/test.gyp:crashpad_test',
  28. '../third_party/gtest/gmock.gyp:gmock',
  29. '../third_party/gtest/gtest.gyp:gtest',
  30. '../third_party/mini_chromium/mini_chromium.gyp:base',
  31. '../third_party/zlib/zlib.gyp:zlib',
  32. ],
  33. 'include_dirs': [
  34. '..',
  35. ],
  36. 'sources': [
  37. 'file/delimited_file_reader_test.cc',
  38. 'file/directory_reader_test.cc',
  39. 'file/file_io_test.cc',
  40. 'file/file_reader_test.cc',
  41. 'file/filesystem_test.cc',
  42. 'file/string_file_test.cc',
  43. 'linux/auxiliary_vector_test.cc',
  44. 'linux/memory_map_test.cc',
  45. 'linux/proc_stat_reader_test.cc',
  46. 'linux/ptracer_test.cc',
  47. 'linux/scoped_ptrace_attach_test.cc',
  48. 'mac/launchd_test.mm',
  49. 'mac/mac_util_test.mm',
  50. 'mac/service_management_test.mm',
  51. 'mac/xattr_test.cc',
  52. 'mach/child_port_handshake_test.cc',
  53. 'mach/child_port_server_test.cc',
  54. 'mach/composite_mach_message_server_test.cc',
  55. 'mach/exc_client_variants_test.cc',
  56. 'mach/exc_server_variants_test.cc',
  57. 'mach/exception_behaviors_test.cc',
  58. 'mach/exception_ports_test.cc',
  59. 'mach/exception_types_test.cc',
  60. 'mach/mach_extensions_test.cc',
  61. 'mach/mach_message_server_test.cc',
  62. 'mach/mach_message_test.cc',
  63. 'mach/notify_server_test.cc',
  64. 'mach/scoped_task_suspend_test.cc',
  65. 'mach/symbolic_constants_mach_test.cc',
  66. 'mach/task_memory_test.cc',
  67. 'misc/arraysize_unsafe_test.cc',
  68. 'misc/clock_test.cc',
  69. 'misc/from_pointer_cast_test.cc',
  70. 'misc/initialization_state_dcheck_test.cc',
  71. 'misc/initialization_state_test.cc',
  72. 'misc/paths_test.cc',
  73. 'misc/scoped_forbid_return_test.cc',
  74. 'misc/random_string_test.cc',
  75. 'misc/reinterpret_bytes_test.cc',
  76. 'misc/time_test.cc',
  77. 'misc/uuid_test.cc',
  78. 'net/http_body_gzip_test.cc',
  79. 'net/http_body_test.cc',
  80. 'net/http_body_test_util.cc',
  81. 'net/http_body_test_util.h',
  82. 'net/http_multipart_builder_test.cc',
  83. 'net/http_transport_test.cc',
  84. 'net/url_test.cc',
  85. 'numeric/checked_address_range_test.cc',
  86. 'numeric/checked_range_test.cc',
  87. 'numeric/in_range_cast_test.cc',
  88. 'numeric/int128_test.cc',
  89. 'posix/process_info_test.cc',
  90. 'posix/scoped_mmap_test.cc',
  91. 'posix/signals_test.cc',
  92. 'posix/symbolic_constants_posix_test.cc',
  93. 'process/process_memory_range_test.cc',
  94. 'process/process_memory_test.cc',
  95. 'stdlib/aligned_allocator_test.cc',
  96. 'stdlib/map_insert_test.cc',
  97. 'stdlib/string_number_conversion_test.cc',
  98. 'stdlib/strlcpy_test.cc',
  99. 'stdlib/strnlen_test.cc',
  100. 'stdlib/thread_safe_vector_test.cc',
  101. 'string/split_string_test.cc',
  102. 'synchronization/semaphore_test.cc',
  103. 'thread/thread_log_messages_test.cc',
  104. 'thread/thread_test.cc',
  105. 'thread/worker_thread_test.cc',
  106. 'win/capture_context_test.cc',
  107. 'win/command_line_test.cc',
  108. 'win/critical_section_with_debug_info_test.cc',
  109. 'win/exception_handler_server_test.cc',
  110. 'win/get_function_test.cc',
  111. 'win/handle_test.cc',
  112. 'win/initial_client_data_test.cc',
  113. 'win/process_info_test.cc',
  114. 'win/registration_protocol_win_test.cc',
  115. 'win/safe_terminate_process_test.cc',
  116. 'win/scoped_process_suspend_test.cc',
  117. 'win/session_end_watcher_test.cc',
  118. ],
  119. 'conditions': [
  120. ['OS=="mac"', {
  121. 'link_settings': {
  122. 'libraries': [
  123. '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
  124. ],
  125. },
  126. }],
  127. ['OS=="win"', {
  128. 'dependencies': [
  129. 'crashpad_util_test_process_info_test_child',
  130. 'crashpad_util_test_safe_terminate_process_test_child',
  131. ],
  132. 'link_settings': {
  133. 'libraries': [
  134. '-ladvapi32.lib',
  135. '-limagehlp.lib',
  136. '-lrpcrt4.lib',
  137. '-luser32.lib',
  138. ],
  139. },
  140. }],
  141. ['OS=="android"', {
  142. # Things not yet ported to Android
  143. 'sources/' : [
  144. ['exclude', '^net/http_transport_test\\.cc$'],
  145. ]
  146. }],
  147. ['OS!="linux" and OS!="android"', {
  148. 'sources/': [
  149. ['exclude', '^process/'],
  150. ],
  151. }],
  152. ],
  153. 'target_conditions': [
  154. ['OS=="android"', {
  155. 'sources/': [
  156. ['include', '^linux/'],
  157. ],
  158. }],
  159. ],
  160. },
  161. ],
  162. 'conditions': [
  163. ['OS=="win"', {
  164. 'targets': [
  165. {
  166. 'target_name': 'crashpad_util_test_process_info_test_child',
  167. 'type': 'executable',
  168. 'sources': [
  169. 'win/process_info_test_child.cc',
  170. ],
  171. # Set an unusually high load address to make sure that the main
  172. # executable still appears as the first element in
  173. # ProcessInfo::Modules().
  174. 'msvs_settings': {
  175. 'VCLinkerTool': {
  176. 'AdditionalOptions': [
  177. '/BASE:0x78000000',
  178. ],
  179. 'RandomizedBaseAddress': '1', # /DYNAMICBASE:NO.
  180. 'FixedBaseAddress': '2', # /FIXED.
  181. },
  182. },
  183. },
  184. {
  185. 'target_name': 'crashpad_util_test_safe_terminate_process_test_child',
  186. 'type': 'executable',
  187. 'sources': [
  188. 'win/safe_terminate_process_test_child.cc',
  189. ],
  190. },
  191. ]
  192. }],
  193. ],
  194. }