diff options
author | shashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 18:19:18 +0000 |
---|---|---|
committer | shashishekhar@chromium.org <shashishekhar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 18:19:18 +0000 |
commit | 218b2f4a7766755e64120927d972d47cf95d35c2 (patch) | |
tree | d8a8fd59c36ecbd4a073142541bb2d328bee802e /build/android/pylib/test_options_parser.py | |
parent | d2e93ec8abd0e35820b1c671aa8a1b20316e3813 (diff) | |
download | chromium_src-218b2f4a7766755e64120927d972d47cf95d35c2.zip chromium_src-218b2f4a7766755e64120927d972d47cf95d35c2.tar.gz chromium_src-218b2f4a7766755e64120927d972d47cf95d35c2.tar.bz2 |
Add test jar generation logic for ant builds.
Add a new property generate.test.jar to ant scripts.
When this property is set, a jar containing all compiled
classes and referred classes is generated and placed in
out/{Debug|Release}/test.lib.java directory.
This makes it easier and cleaner to write ant build files for test apks.
New directory structure for the build:
Apks are placed in : out/{Debug|Release}/apks
All java libraries in : out/{Debug|Release}/lib.java
All test java libraries in : out/{Debug|Release}/test.lib.java
This CL also includes cleanup to work with the modified output
directory structure.
BUG=146583
Review URL: https://chromiumcodereview.appspot.com/10905138
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/pylib/test_options_parser.py')
-rw-r--r-- | build/android/pylib/test_options_parser.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/build/android/pylib/test_options_parser.py b/build/android/pylib/test_options_parser.py index 8492ec3..4edd5f9 100644 --- a/build/android/pylib/test_options_parser.py +++ b/build/android/pylib/test_options_parser.py @@ -85,10 +85,9 @@ def AddInstrumentationOptions(option_parser): 'of the result. (Default is 1)')) option_parser.add_option('--test-apk', dest='test_apk', help=('The name of the apk containing the tests ' - '(without the .apk extension) or for SDK ' - 'builds, the path to the APK from ' - 'out/(Debug|Release) (for example, ' - 'content_shell_test/ContentShellTest-debug).')) + '(without the .apk extension). For SDK ' + 'builds, the apk name without the debug ' + 'suffix(for example, ContentShellTest).')) option_parser.add_option('--screenshot', dest='screenshot_failures', action='store_true', help='Capture screenshots of test failures') @@ -119,13 +118,15 @@ def ValidateInstrumentationOptions(option_parser, options, args): elif options.python_only: options.run_java_tests = False + # In case of SDK Build, the jars and apks have a -debug suffix. options.test_apk_path = os.path.join(_SDK_OUT_DIR, options.build_type, - '%s.apk' % options.test_apk) + constants.SDK_BUILD_APKS_DIR, + '%s-debug.apk' % options.test_apk) options.test_apk_jar_path = os.path.join(_SDK_OUT_DIR, options.build_type, - '%s.jar' - % options.test_apk) + constants.SDK_BUILD_TEST_JAVALIB_DIR, + '%s-debug.jar' % options.test_apk) if options.annotation_str: options.annotation = options.annotation_str.split() elif options.test_filter: |