Commit 87a80855 authored by bulach@chromium.org's avatar bulach@chromium.org

Android: cleanup gtest_target_type conditions.

For a long time (crrev.com/133053) OS==android implies:
gtest_target_type=shared_library
Cleanup the spurious conditions and obsolete TODOs.

BUG=

Review URL: https://codereview.chromium.org/278443003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271222 0039d316-1c4b-4281-b951-d872f2087c98
parent 93748d64
...@@ -663,13 +663,7 @@ ...@@ -663,13 +663,7 @@
['OS == "android"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'android/jni_generator/jni_generator.gyp:jni_generator_tests', 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
], '../testing/android/native_test.gyp:native_test_native_code',
'conditions': [
['gtest_target_type == "shared_library"', {
'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code',
],
}],
], ],
}], }],
['OS == "ios" and _toolset != "host"', { ['OS == "ios" and _toolset != "host"', {
...@@ -805,7 +799,7 @@ ...@@ -805,7 +799,7 @@
'../testing/perf/perf_test.cc' '../testing/perf/perf_test.cc'
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -1430,7 +1424,7 @@ ...@@ -1430,7 +1424,7 @@
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
'target_name': 'base_perftests_apk', 'target_name': 'base_perftests_apk',
...@@ -1461,13 +1455,7 @@ ...@@ -1461,13 +1455,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type == shared_library ['OS == "android"', {
# base_unittests into an android apk for execution.
# TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
# in the gyp make generator. What is the correct way to extract
# this path from gyp and into 'raw' for input to antfiles?
# Hard-coding in the gypfile seems a poor choice.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'base_unittests_apk', 'target_name': 'base_unittests_apk',
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
'<(DEPTH)/tools/android/android_tools.gyp:android_tools', '<(DEPTH)/tools/android/android_tools.gyp:android_tools',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'variables': { 'variables': {
# These are used to configure java_apk.gypi included below. # These are used to configure java_apk.gypi included below.
'apk_name': '<(test_suite_name)', 'apk_name': '<(test_suite_name)',
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
'gyp_managed_install': 0, 'gyp_managed_install': 0,
}, },
'includes': [ 'java_apk.gypi' ], 'includes': [ 'java_apk.gypi' ],
}], # 'OS == "android" and gtest_target_type == "shared_library" }], # 'OS == "android"
], # conditions ], # conditions
} }
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
'.', '.',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', ['OS == "android"',
{ {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
...@@ -323,7 +323,7 @@ ...@@ -323,7 +323,7 @@
'.', '.',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', ['OS == "android"',
{ {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
...@@ -375,9 +375,7 @@ ...@@ -375,9 +375,7 @@
}, },
], ],
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"',
# cc_unittests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"',
{ {
'targets': [ 'targets': [
{ {
......
...@@ -2600,12 +2600,8 @@ ...@@ -2600,12 +2600,8 @@
['exclude', '^utility/importer/'], ['exclude', '^utility/importer/'],
['exclude', '^utility/media_galleries/'], ['exclude', '^utility/media_galleries/'],
], ],
'conditions': [ 'dependencies': [
['gtest_target_type == "shared_library"', { '../testing/android/native_test.gyp:native_test_native_code',
'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code',
],
}],
], ],
}], # OS == android }], # OS == android
['OS!="android" and OS!="ios" and chromeos==0 and configuration_policy==1', { ['OS!="android" and OS!="ios" and chromeos==0 and configuration_policy==1', {
...@@ -2780,9 +2776,7 @@ ...@@ -2780,9 +2776,7 @@
], ],
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# unit_tests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'unit_tests_java', 'target_name': 'unit_tests_java',
......
...@@ -437,7 +437,7 @@ ...@@ -437,7 +437,7 @@
'../third_party/libusb/libusb.gyp:libusb', '../third_party/libusb/libusb.gyp:libusb',
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
] ]
...@@ -580,7 +580,7 @@ ...@@ -580,7 +580,7 @@
'visitedlink/test/visitedlink_perftest.cc', 'visitedlink/test/visitedlink_perftest.cc',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -591,7 +591,7 @@ ...@@ -591,7 +591,7 @@
}, },
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
'target_name': 'components_unittests_apk', 'target_name': 'components_unittests_apk',
......
...@@ -880,7 +880,7 @@ ...@@ -880,7 +880,7 @@
'../third_party/libvpx/libvpx.gyp:libvpx', '../third_party/libvpx/libvpx.gyp:libvpx',
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -954,7 +954,7 @@ ...@@ -954,7 +954,7 @@
'test/run_all_perftests.cc', 'test/run_all_perftests.cc',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -1283,7 +1283,7 @@ ...@@ -1283,7 +1283,7 @@
'sources!': [ 'sources!': [
# These tests depend on single process mode, which is disabled # These tests depend on single process mode, which is disabled
# in official builds. # in official builds.
'renderer/browser_render_view_browsertest.cc', 'renderer/browser_render_view_browsertest.cc',
'renderer/dom_serializer_browsertest.cc', 'renderer/dom_serializer_browsertest.cc',
'renderer/resource_fetcher_browsertest.cc', 'renderer/resource_fetcher_browsertest.cc',
'renderer/savable_resources_browsertest.cc', 'renderer/savable_resources_browsertest.cc',
...@@ -1492,10 +1492,7 @@ ...@@ -1492,10 +1492,7 @@
}, },
] ]
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# content_unittests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'content_gl_tests_apk', 'target_name': 'content_gl_tests_apk',
......
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
'config/gpu_util_unittest.cc', 'config/gpu_util_unittest.cc',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
'command_buffer/tests/occlusion_query_unittest.cc', 'command_buffer/tests/occlusion_query_unittest.cc',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -591,7 +591,7 @@ ...@@ -591,7 +591,7 @@
}, },
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'targets': [ 'targets': [
{ {
'target_name': 'gl_tests_apk', 'target_name': 'gl_tests_apk',
......
...@@ -49,9 +49,7 @@ ...@@ -49,9 +49,7 @@
] ]
}, },
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# gpu_unittests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'gpu_unittests_apk', 'target_name': 'gpu_unittests_apk',
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
'unix_domain_socket_util_unittest.cc', 'unix_domain_socket_util_unittest.cc',
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
'ipc_test_base.h', 'ipc_test_base.h',
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -167,10 +167,7 @@ ...@@ -167,10 +167,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# ipc_tests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'ipc_tests_apk', 'target_name': 'ipc_tests_apk',
......
...@@ -799,7 +799,7 @@ ...@@ -799,7 +799,7 @@
], ],
}, },
], ],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
# TODO(mmenke): This depends on test_support_base, which depends on # TODO(mmenke): This depends on test_support_base, which depends on
# icu. Figure out a way to remove that dependency. # icu. Figure out a way to remove that dependency.
'dependencies': [ 'dependencies': [
...@@ -1627,10 +1627,7 @@ ...@@ -1627,10 +1627,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# net_unittests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'net_unittests_apk', 'target_name': 'net_unittests_apk',
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
], ],
'type': 'shared_library', 'type': 'shared_library',
'conditions': [ 'conditions': [
[ 'OS == "android" and gtest_target_type == "shared_library"', { [ 'OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -319,8 +319,7 @@ ...@@ -319,8 +319,7 @@
} }
], ],
}], }],
# Strategy copied from base_unittests_apk in base/base.gyp. [ 'OS=="android"', {
[ 'OS=="android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'sandbox_linux_jni_unittests_apk', 'target_name': 'sandbox_linux_jni_unittests_apk',
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
}], }],
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -117,9 +117,7 @@ ...@@ -117,9 +117,7 @@
}, },
], ],
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# sql_unittests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'sql_unittests_apk', 'target_name': 'sql_unittests_apk',
......
...@@ -439,7 +439,7 @@ ...@@ -439,7 +439,7 @@
'internal_api/sync_backup_manager_unittest.cc', 'internal_api/sync_backup_manager_unittest.cc',
'internal_api/sync_core_proxy_impl_unittest.cc', 'internal_api/sync_core_proxy_impl_unittest.cc',
'internal_api/sync_encryption_handler_impl_unittest.cc', 'internal_api/sync_encryption_handler_impl_unittest.cc',
'internal_api/sync_manager_impl_unittest.cc', 'internal_api/sync_manager_impl_unittest.cc',
'internal_api/sync_rollback_manager_base_unittest.cc', 'internal_api/sync_rollback_manager_base_unittest.cc',
'internal_api/sync_rollback_manager_unittest.cc', 'internal_api/sync_rollback_manager_unittest.cc',
'internal_api/syncapi_server_connection_manager_unittest.cc', 'internal_api/syncapi_server_connection_manager_unittest.cc',
...@@ -518,7 +518,7 @@ ...@@ -518,7 +518,7 @@
'../base/allocator/allocator.gyp:allocator', '../base/allocator/allocator.gyp:allocator',
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -677,9 +677,7 @@ ...@@ -677,9 +677,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# sync_unit_tests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'sync_unit_tests_apk', 'target_name': 'sync_unit_tests_apk',
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
'use_snappy': 0, 'use_snappy': 0,
}, },
}], }],
['OS=="android" and gtest_target_type == "shared_library"', { ['OS=="android"', {
# Wrap env_chromium_unittests into an android apk for execution.
'targets': [{ 'targets': [{
'target_name': 'env_chromium_unittests_apk', 'target_name': 'env_chromium_unittests_apk',
'type': 'none', 'type': 'none',
...@@ -196,7 +195,7 @@ ...@@ -196,7 +195,7 @@
'env_chromium_unittest.cc', 'env_chromium_unittest.cc',
], ],
'conditions': [ 'conditions': [
['OS=="android" and gtest_target_type == "shared_library"', { ['OS=="android"', {
'type': 'shared_library', 'type': 'shared_library',
'dependencies': [ 'dependencies': [
'../../testing/android/native_test.gyp:native_test_native_code', '../../testing/android/native_test.gyp:native_test_native_code',
......
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
'event_unittest.cc', 'event_unittest.cc',
], ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../../testing/android/native_test.gyp:native_test_native_code', '../../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -330,10 +330,7 @@ ...@@ -330,10 +330,7 @@
}, },
], ],
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# ui_unittests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'events_unittests_apk', 'target_name': 'events_unittests_apk',
......
...@@ -548,10 +548,7 @@ ...@@ -548,10 +548,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# gfx_unittests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'gfx_unittests_apk', 'target_name': 'gfx_unittests_apk',
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ], 'msvs_disabled_warnings': [ 4267, ],
}], }],
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code', '../testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -254,10 +254,7 @@ ...@@ -254,10 +254,7 @@
}, },
], ],
}], }],
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# ui_unittests into an android apk for execution.
# See base.gyp for TODO(jrg)s about this strategy.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'ui_unittests_apk', 'target_name': 'ui_unittests_apk',
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
'<(DEPTH)' '<(DEPTH)'
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android"', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/testing/android/native_test.gyp:native_test_native_code', '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
], ],
...@@ -50,9 +50,7 @@ ...@@ -50,9 +50,7 @@
}, },
], ],
'conditions': [ 'conditions': [
# Special target to wrap a gtest_target_type==shared_library ['OS == "android"', {
# package webkit_compositor_bindings_unittests into an android apk for execution.
['OS == "android" and gtest_target_type == "shared_library"', {
'targets': [ 'targets': [
{ {
'target_name': 'webkit_compositor_bindings_unittests_apk', 'target_name': 'webkit_compositor_bindings_unittests_apk',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment