Граф коммитов

11 Коммитов

Автор SHA1 Сообщение Дата
davileen 1805399694 Fix "Class resolved by unexpected DEX" in uiautomator tests
Attemping to run uiautomator tests on a Nexus fails with the following error:

W/dalvikvm(32338): Class resolved by unexpected DEX: Lorg/chromium/chrome/shell/uiautomator/DummyTest;(0x416544d0):0x5b738000 ref [Lcom/android/uiautomator/testrunner/              UiAutomatorTestCase;] Lcom/android/uiautomator/testrunner/UiAutomatorTestCase;(0x416544d0):0x5b6dc000
W/dalvikvm(32338): (Lorg/chromium/chrome/shell/uiautomator/DummyTest; had used a different Lcom/android/uiautomator/testrunner/UiAutomatorTestCase; during pre-verification)
W/dalvikvm(32338): Unable to resolve superclass of Lorg/chromium/chrome/shell/uiautomator/DummyTest; (96)
W/dalvikvm(32338): Link of class 'Lorg/chromium/chrome/shell/uiautomator/DummyTest;' failed
D/AndroidRuntime(32338): Shutting down VM
W/dalvikvm(32338): threadid=1: thread exiting with uncaught exception (group=0x4164abc0)
E/UiAutomatorTestRunner(32338): uncaught exception
E/UiAutomatorTestRunner(32338): java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation

This error occurs because uiautomator.jar is built into
out/Debug/lib.java/chrome_shell_uiautomator_tests.dex.jar. This results in two
different implementations of uiautomator classes on the device hence the
dalvik error.

The 'chrome_shell_uiautomator_tests' gyp target uses the uiautomator_test.gypi
include. uiautomator.gypi dexes all dependent jars into a single .dex.jar.
Since chrome_shell_uiautomator_tests has a transitive dependence,
through chrome_shell_uiautomator_tests_java, on uiautomator.gyp,
the uiautomator jar used for compilation will be built into its output.

If we ignore chrome_shell_uiautomator_tests and instead just build
chrome_shell_uiautomator_tests_java we can successfully run uiautomator tests.
This gyp target already generates dexed jars through java.gypi (which calls
dex_action.gypi).

This commit removes uiautomator_test.gypi and renames
chrome_shell_uiautomator_tests_java to chrome_shell_uiautomator_tests.

BUG=434080

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

Cr-Original-Commit-Position: refs/heads/master@{#306315}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 57dc71e6bf75f6f249c941a70c9139e1316516f9
2014-12-02 01:32:45 +00:00
aurimas@chromium.org ceaa28fb3c Start using proguard.jar directly instead of proguard.sh
android_tools/sdk/tools/proguard/bin/proguard.sh was removed with SDK tools
update. https://gerrit.chromium.org/gerrit/#/c/70802/ updates SDK tools
and we want to roll to start using it.

BUG=393019

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282498 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-11 01:49:41 +00:00
cjhopman@chromium.org 8a71208e73 Update some gyp targets to use dex_action.gypi
This makes the way that we invoke dex more consistent (and easier to
change).

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@276518 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-12 03:40:40 +00:00
thakis@chromium.org d4c5dfb682 android: Remove a few unnecessary md5sum invocations.
When the list of implicit inputs of a build edge shrinks, ninja doesn't
rerun it.  The Android build uses complex build actions (e.g. ant) whose
output depend on directory contents and whatnot, and the Android build
by adding "dir/*.java" or similar as implicit inputs.  So it's important
that ninja does rerun these actions when their list of implicit inputs
shrinks.  As a workaround, the Android build passes the md5 of the list of
implicit inputs as "--ignored" parameter to the build action (ninja does
rerun edges whose commandline changes.)

Due to copypasta, this --ignored flag is used in a few places where it's
not actually used (on edges where all inputs are already passed as regular
commandline parameters).

Also remove the --ignored parameter from proguard.py as nothing passes it
any more.

BUG=177552
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@254414 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-02 20:22:16 +00:00
aruslan@chromium.org 99f883e128 [Android] Extend proguard preprocessing to prebuilt Java libraries.
* Adds support for running proguard on prebuilt libraries
before they are added to the final release APK.

BUG=272790
NOTRY=True

Review URL: https://chromiumcodereview.appspot.com/22802005

git-svn-id: http://src.chromium.org/svn/trunk/src/build@218353 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-19 22:45:34 +00:00
navabi@google.com 45bd690053 Some of the build tools have moved in the SDK (e.g. aapt, aidl) from
sdk/platform-tools/ to sdk/build-tools/<tools-version>/. The tools version is 18.0.1.

BUG=263966

Review URL: https://chromiumcodereview.appspot.com/21977003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@216612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-09 06:48:18 +00:00
yfriedman@chromium.org 8ee2ab72e0 Fix incorrect paths introduced in https://chromiumcodereview.appspot.com/13473017
These are only used downstream, so the failure was invisible upstream.

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13691002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192496 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 04:13:50 +00:00
cjhopman@chromium.org 05938fc5f8 CheckCallDie: add option to suppress successful output
Some commands that are called by build scripts are particularly verbose
(ant, dex, readelf). For these commands, the output (when successful)
is not useful (unlike javac, for example). Add an option
(suppress_output) to build_util.CheckCallDie to disable printing of
stdout/stderr when the call is successful.

Also, move remaining build scripts in build/android to
build/android/gyp.

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13473017

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192409 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-04 23:04:40 +00:00
cjhopman@chromium.org 5684a94e39 Add input content checking to some build scripts
Some build steps, particularly javac, have really loose input rules.
I.e. javac steps are re-built when any input jar changes. Often, this
leads to unnecessary rebuilds of all the following steps.

Other build tools (ninja, goma), will check the contents of the inputs
to a step, and if those inputs haven't changed that tool doesn't
actually re-run the command for creating the output.

This change brings that same benefit to some of the Android python
build scripts. Particularly those that will save a significant amount
of time by adding input content checks.

The checking checks both the input files and the command that will be
run. It compares this against a stored md5 digest. If it has not
changed, then the output does not need to be recreated (though it is
still touched to trigger following steps).

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13432002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192265 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-04 09:35:50 +00:00
cjhopman@chromium.org 561e3ec42e Make write_library_dependencies.py find all transitive dependencies
For the component build, it is impractical/impossible to explicitly
list all library dependencies. This list is required (in dependency
order) for several of the apk-building steps.

For now, we will generate this list as follows:
Use readelf to find all transitive dependencies
Topologically sort those dependencies

Once we can expose this information from gyp
(http://crbug.com/2255588), it is straightforward to update this action
to use the gyp-exposed list of libraries.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13261024

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192103 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-03 18:20:22 +00:00
nyquist@chromium.org 7ec0ffc678 Add helper gypi for predexing of prebuilt jars.
After https://codereview.chromium.org/12913009/ landed we need to change
the gyp targets that include prebuilt jars. Some of these live in
external repositories.

This adds a helper gypi for those targets so they are configured
correctly. This should also make it easier going forward to update such
targets.

BUG=158821,224600

Review URL: https://chromiumcodereview.appspot.com/13234002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191299 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-29 04:56:56 +00:00