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

Side by Side Diff: base/base.gyp

Issue 10399126: Add APK targets for content_unittests and net_unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 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 | « no previous file | build/apk_test.gypi » ('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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 # TODO(michaelbai): Removed the below once the fix upstreamed. 305 # TODO(michaelbai): Removed the below once the fix upstreamed.
306 'debug/stack_trace_unittest.cc', 306 'debug/stack_trace_unittest.cc',
307 'memory/mru_cache_unittest.cc', 307 'memory/mru_cache_unittest.cc',
308 'process_util_unittest.cc', 308 'process_util_unittest.cc',
309 'synchronization/cancellation_flag_unittest.cc', 309 'synchronization/cancellation_flag_unittest.cc',
310 ], 310 ],
311 'dependencies': [ 311 'dependencies': [
312 'android/jni_generator/jni_generator.gyp:jni_generator_tests', 312 'android/jni_generator/jni_generator.gyp:jni_generator_tests',
313 ], 313 ],
314 'conditions': [ 314 'conditions': [
315 ['"<(gtest_target_type)"=="shared_library"', { 315 ['gtest_target_type == "shared_library"', {
316 'dependencies': [ 316 'dependencies': [
317 '../testing/android/native_test.gyp:native_test_native_code', 317 '../testing/android/native_test.gyp:native_test_native_code',
318 ], 318 ],
319 }, { # gtest_target_type != shared_library 319 }, { # gtest_target_type != shared_library
320 'sources!': [ 320 'sources!': [
321 # The below files are excluded because of the missing JNI. 321 # The below files are excluded because of the missing JNI.
322 'android/jni_android_unittest.cc', 322 'android/jni_android_unittest.cc',
323 'android/path_utils_unittest.cc', 323 'android/path_utils_unittest.cc',
324 'android/scoped_java_ref_unittest.cc', 324 'android/scoped_java_ref_unittest.cc',
325 ], 325 ],
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 # build a stub dylib to provide these symbols at link time. 636 # build a stub dylib to provide these symbols at link time.
637 # This target is still useful to cause those symbols to be 637 # This target is still useful to cause those symbols to be
638 # treated as weak imports in dependents, who still must 638 # treated as weak imports in dependents, who still must
639 # #include closure_blocks_leopard_compat.h to get weak imports. 639 # #include closure_blocks_leopard_compat.h to get weak imports.
640 'type': 'none', 640 'type': 'none',
641 }], 641 }],
642 ], 642 ],
643 }, 643 },
644 ], 644 ],
645 }], 645 }],
646 # Special target to wrap a <(gtest_target_type)==shared_library 646 # Special target to wrap a gtest_target_type == shared_library
647 # base_unittests into an android apk for execution. 647 # base_unittests into an android apk for execution.
648 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath() 648 # TODO(jrg): lib.target comes from _InstallableTargetInstallPath()
649 # in the gyp make generator. What is the correct way to extract 649 # in the gyp make generator. What is the correct way to extract
650 # this path from gyp and into 'raw' for input to antfiles? 650 # this path from gyp and into 'raw' for input to antfiles?
651 # Hard-coding in the gypfile seems a poor choice. 651 # Hard-coding in the gypfile seems a poor choice.
652 # TODO(jrg): there has to be a shorter way to do all this. Try 652 ['OS == "android" and gtest_target_type == "shared_library"', {
653 # and convert this entire target cluster into ~5 lines that can be
654 # trivially copied to other projects with only a deps change, such
655 # as with a new gtest_target_type called
656 # 'shared_library_apk_wrapper' that does a lot of this magically.
657 ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
658 'targets': [ 653 'targets': [
659 { 654 {
660 'target_name': 'base_unittests_apk', 655 'target_name': 'base_unittests_apk',
661 'type': 'none', 656 'type': 'none',
662 'dependencies': [ 657 'dependencies': [
663 'base', # So that android/java/java.gyp:base_java is built 658 'base_java',
664 'base_unittests', 659 'base_unittests',
665 ], 660 ],
666 'actions': [ 661 'variables': {
667 { 662 'test_suite_name': 'base_unittests',
668 # Generate apk files (including source and antfile) from 663 'input_shlib_path': '<(PRODUCT_DIR)/lib.target/<(SHARED_LIB_PREFIX)b ase_unittests<(SHARED_LIB_SUFFIX)',
669 # a template, and builds them. 664 'input_jars_paths': ['<(PRODUCT_DIR)/lib.java/chromium_base.jar',],
670 'action_name': 'generate_and_build', 665 },
671 'inputs': [ 666 'includes': [ '../build/apk_test.gypi' ],
672 '../testing/android/AndroidManifest.xml',
673 '../testing/android/generate_native_test.py',
674 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
675 '<(PRODUCT_DIR)/lib.java/chromium_base.jar'
676 ],
677 'outputs': [
678 '<(PRODUCT_DIR)/base_unittests_apk/base_unittests-debug.apk',
679 ],
680 'action': [
681 '../testing/android/generate_native_test.py',
682 '--native_library',
683 '<(PRODUCT_DIR)/lib.target/libbase_unittests.so',
684 '--jar',
685 '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
686 '--output',
687 '<(PRODUCT_DIR)/base_unittests_apk',
688 '--ant-args',
689 '-DPRODUCT_DIR=<(PRODUCT_DIR)',
690 '--ant-compile'
691 ],
692 },
693 ]
694 }], 667 }],
695 }], 668 }],
696 ], 669 ],
697 } 670 }
OLDNEW
« no previous file with comments | « no previous file | build/apk_test.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698