| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'chromium_code': 1, | 7 'chromium_code': 1, |
| 8 }, | 8 }, |
| 9 'target_defaults': { | 9 'target_defaults': { |
| 10 'sources/': [ | 10 'sources/': [ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 'ipc_tests.cc', | 56 'ipc_tests.cc', |
| 57 'ipc_tests.h', | 57 'ipc_tests.h', |
| 58 'sync_socket_unittest.cc', | 58 'sync_socket_unittest.cc', |
| 59 ], | 59 ], |
| 60 'conditions': [ | 60 'conditions': [ |
| 61 ['toolkit_uses_gtk == 1', { | 61 ['toolkit_uses_gtk == 1', { |
| 62 'dependencies': [ | 62 'dependencies': [ |
| 63 '../build/linux/system.gyp:gtk', | 63 '../build/linux/system.gyp:gtk', |
| 64 ], | 64 ], |
| 65 }], | 65 }], |
| 66 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { | 66 ['OS == "android" and gtest_target_type == "shared_library"', { |
| 67 'dependencies': [ | 67 'dependencies': [ |
| 68 '../testing/android/native_test.gyp:native_test_native_code', | 68 '../testing/android/native_test.gyp:native_test_native_code', |
| 69 ], | 69 ], |
| 70 }], | 70 }], |
| 71 ['os_posix == 1 and OS != "mac" and OS != "android"', { | 71 ['os_posix == 1 and OS != "mac" and OS != "android"', { |
| 72 'conditions': [ | 72 'conditions': [ |
| 73 ['linux_use_tcmalloc==1', { | 73 ['linux_use_tcmalloc==1', { |
| 74 'dependencies': [ | 74 'dependencies': [ |
| 75 '../base/allocator/allocator.gyp:allocator', | 75 '../base/allocator/allocator.gyp:allocator', |
| 76 ], | 76 ], |
| 77 }], | 77 }], |
| 78 ], | 78 ], |
| 79 }] | 79 }] |
| 80 ], | 80 ], |
| 81 }, | 81 }, |
| 82 { | 82 { |
| 83 'target_name': 'test_support_ipc', | 83 'target_name': 'test_support_ipc', |
| 84 'type': 'static_library', | 84 'type': 'static_library', |
| 85 'dependencies': [ | 85 'dependencies': [ |
| 86 'ipc', | 86 'ipc', |
| 87 '../base/base.gyp:base', | 87 '../base/base.gyp:base', |
| 88 ], | 88 ], |
| 89 'sources': [ | 89 'sources': [ |
| 90 'ipc_test_sink.cc', | 90 'ipc_test_sink.cc', |
| 91 'ipc_test_sink.h', | 91 'ipc_test_sink.h', |
| 92 ], | 92 ], |
| 93 }, | 93 }, |
| 94 ], | 94 ], |
| 95 'conditions': [ | 95 'conditions': [ |
| 96 # Special target to wrap a <(gtest_target_type)==shared_library | 96 # Special target to wrap a gtest_target_type==shared_library |
| 97 # ipc_tests into an android apk for execution. | 97 # ipc_tests into an android apk for execution. |
| 98 # See base.gyp for TODO(jrg)s about this strategy. | 98 # See base.gyp for TODO(jrg)s about this strategy. |
| 99 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', { | 99 ['OS == "android" and gtest_target_type == "shared_library"', { |
| 100 'targets': [ | 100 'targets': [ |
| 101 { | 101 { |
| 102 'target_name': 'ipc_tests_apk', | 102 'target_name': 'ipc_tests_apk', |
| 103 'type': 'none', | 103 'type': 'none', |
| 104 'dependencies': [ | 104 'dependencies': [ |
| 105 '../base/base.gyp:base_java', |
| 105 'ipc_tests', | 106 'ipc_tests', |
| 106 ], | 107 ], |
| 107 'actions': [ | 108 'variables': { |
| 108 { | 109 'test_suite_name': 'ipc_tests', |
| 109 # Generate apk files (including source and antfile) from | 110 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)i
pc_tests<(SHARED_LIB_SUFFIX)', |
| 110 # a template, and builds them. | 111 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',], |
| 111 'action_name': 'generate_and_build', | 112 }, |
| 112 'inputs': [ | 113 'includes': [ '../build/apk_test.gypi' ], |
| 113 '../testing/android/AndroidManifest.xml', | |
| 114 '../testing/android/generate_native_test.py', | |
| 115 '<(PRODUCT_DIR)/lib.target/libipc_tests.so', | |
| 116 '<(PRODUCT_DIR)/lib.java/chromium_base.jar' | |
| 117 ], | |
| 118 'outputs': [ | |
| 119 '<(PRODUCT_DIR)/ipc_tests_apk/ipc_tests-debug.apk', | |
| 120 ], | |
| 121 'action': [ | |
| 122 '../testing/android/generate_native_test.py', | |
| 123 '--native_library', | |
| 124 '<(PRODUCT_DIR)/lib.target/libipc_tests.so', | |
| 125 # TODO(jrg): find a better way to specify jar | |
| 126 # dependencies. Hard coding seems fragile. | |
| 127 '--jar', | |
| 128 '<(PRODUCT_DIR)/lib.java/chromium_base.jar', | |
| 129 '--output', | |
| 130 '<(PRODUCT_DIR)/ipc_tests_apk', | |
| 131 '--ant-args', | |
| 132 '-DPRODUCT_DIR=<(PRODUCT_DIR)', | |
| 133 '--ant-compile' | |
| 134 ], | |
| 135 }, | |
| 136 ], | |
| 137 }], | 114 }], |
| 138 }], | 115 }], |
| 139 ], | 116 ], |
| 140 } | 117 } |
| OLD | NEW |