Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: base/base.gyp

Issue 10051021: apk-based test runner work for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/android/jni_android.h ('k') | build/all_android.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'includes': [ 9 'includes': [
10 '../build/win_precompile.gypi', 10 '../build/win_precompile.gypi',
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 'type': 'static_library', 121 'type': 'static_library',
122 'dependencies': [ 122 'dependencies': [
123 'test_support_base', 123 'test_support_base',
124 ], 124 ],
125 'sources': [ 125 'sources': [
126 'test/run_all_unittests.cc', 126 'test/run_all_unittests.cc',
127 ], 127 ],
128 }, 128 },
129 { 129 {
130 'target_name': 'base_unittests', 130 'target_name': 'base_unittests',
131 'type': 'executable', 131 'type': '<(gtest_target_type)',
132 'sources': [ 132 'sources': [
133 # Tests. 133 # Tests.
134 'android/jni_android_unittest.cc', 134 'android/jni_android_unittest.cc',
135 'android/scoped_java_ref_unittest.cc', 135 'android/scoped_java_ref_unittest.cc',
136 'at_exit_unittest.cc', 136 'at_exit_unittest.cc',
137 'atomicops_unittest.cc', 137 'atomicops_unittest.cc',
138 'base64_unittest.cc', 138 'base64_unittest.cc',
139 'bind_helpers_unittest.cc', 139 'bind_helpers_unittest.cc',
140 'bind_unittest.cc', 140 'bind_unittest.cc',
141 'bind_unittest.nc', 141 'bind_unittest.nc',
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 # TODO(michaelbai): The below files are excluded because of the 306 # TODO(michaelbai): The below files are excluded because of the
307 # missing JNI and should be added back once JNI is ready. 307 # missing JNI and should be added back once JNI is ready.
308 'android/jni_android_unittest.cc', 308 'android/jni_android_unittest.cc',
309 'android/scoped_java_ref_unittest.cc', 309 'android/scoped_java_ref_unittest.cc',
310 'debug/stack_trace_unittest.cc', 310 'debug/stack_trace_unittest.cc',
311 ], 311 ],
312 'dependencies': [ 312 'dependencies': [
313 'android/jni_generator/jni_generator.gyp:jni_generator_tests', 313 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
314 ], 314 ],
315 }], 315 }],
316 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
317 'dependencies': [
318 '../testing/android/native_test.gyp:native_test_native_code',
319 ],
320 }],
316 ['use_glib==1', { 321 ['use_glib==1', {
317 'sources!': [ 322 'sources!': [
318 'file_version_info_unittest.cc', 323 'file_version_info_unittest.cc',
319 ], 324 ],
320 'conditions': [ 325 'conditions': [
321 [ 'linux_use_tcmalloc==1', { 326 [ 'linux_use_tcmalloc==1', {
322 'dependencies': [ 327 'dependencies': [
323 'allocator/allocator.gyp:allocator', 328 'allocator/allocator.gyp:allocator',
324 ], 329 ],
325 }, 330 },
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 # build a stub dylib to provide these symbols at link time. 626 # build a stub dylib to provide these symbols at link time.
622 # This target is still useful to cause those symbols to be 627 # This target is still useful to cause those symbols to be
623 # treated as weak imports in dependents, who still must 628 # treated as weak imports in dependents, who still must
624 # #include closure_blocks_leopard_compat.h to get weak imports. 629 # #include closure_blocks_leopard_compat.h to get weak imports.
625 'type': 'none', 630 'type': 'none',
626 }], 631 }],
627 ], 632 ],
628 }, 633 },
629 ], 634 ],
630 }], 635 }],
636 # Special target to wrap a <(gtest_target_type)==shared_library
637 # base_unittests into an android apk for execution.
638 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
639 # in the gyp make generator. What is the correct way to extract
640 # this path from gyp and into 'raw' for input to antfiles?
641 # Hard-coding in the gypfile seems a poor choice.
642 # TODO(jrg): there has to be a shorter way to do all this. Try
643 # and convert this entire target cluster into ~5 lines that can be
644 # trivially copied to other projects with only a deps change, such
645 # as with a new gtest_target_type called
646 # 'shared_library_apk_wrapper' that does a lot of this magically.
647 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
648 'targets': [
649 {
650 'target_name': 'base_unittests_apk',
651 'type': 'none',
652 'dependencies': [
653 'base', # So that android/java/java.gyp:base_java is built
654 'base_unittests',
655 ],
656 'actions': [
657 {
658 # Generate apk files (including source and antfile) from
659 # a template, and builds them.
660 'action_name': 'generate_and_build',
661 'inputs': [
662 '../testing/android/generate_native_test.py',
663 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
664 '<(PRODUCT_DIR)/chromium_base.jar'
665 ],
666 'outputs': [
667 '<(PRODUCT_DIR)/ChromeNativeTests_base_unittests-debug.apk',
668 ],
669 'action': [
670 '../testing/android/generate_native_test.py',
671 '--native_library',
672 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
673 '--jar',
674 '<(PRODUCT_DIR)/chromium_base.jar',
675 '--output',
676 '<(PRODUCT_DIR)/base_unittests_apk',
677 '--ant-args',
678 '-DPRODUCT_DIR=<(PRODUCT_DIR)',
679 '--ant-compile'
680 ],
681 },
682 ]
683 }],
684 }],
631 ], 685 ],
632 } 686 }
OLDNEW
« no previous file with comments | « base/android/jni_android.h ('k') | build/all_android.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698