When running tests, we should only be reinstalling the test apk if it
is different than the one currently installed. So, before reinstalling,
query the package manager for the path to the installed apk, and then
only reinstall if the md5sum of the installed apk differs from the one
we are about to install.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/14601004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@199835 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
After recent upgradation to third_party/android_tools/ndk, there is no
linux-x86 toolchain directory any more, but linux-x86_64 instead. This
causes failure of adb_gdb and gdb_apk which hard-coded linux-x86
in the scripts. As envsetup.sh already set correct $ANDROID_TOOLCHAIN,
now use it in the scripts instead of the hardcoded one.
BUG=none
NOTRY=true (presubmit passed)
Review URL: https://chromiumcodereview.appspot.com/15028013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@199567 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
After recent change in android_tools to update ndk, the scripts can reuse
android_host_arch variable for MIPS too. This is important, as the release
now contains 64-bit host toolchain set.
BUG=130022
TEST=build content_shell_apk
Review URL: https://chromiumcodereview.appspot.com/15085019
git-svn-id: http://src.chromium.org/svn/trunk/src/build@199492 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
They must match the trace names printed by PrintPerfResult, which are also
escaped with the same method.
This patch allows the buildbot log processor to work with the updated page
cyclers.
BUG=None
TEST=tools/perf/run_multipage_benchmarks --browser=system page_cycler tools/perf/page_sets/intl_es_fr_pt-BR.json --pageset-repeat=2
NOTRY=True
Review URL: https://chromiumcodereview.appspot.com/14780004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@198765 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
lsof -np is not able (permission denied when running as non-root to be exact)
to retrieve file descriptor information for processes running under a different
UID. This can make IsHostPortUsed() return false when the provided port is
actually used.
Trying to connect to a port rather than binding it should not introduce any
side-effect on the system that could affect next runs as the TODO suggested. It
is also always sane not to depend on an external process (lsof) output format.
BUG=229685
R=bulach@chromium.org
Review URL: https://codereview.chromium.org/14567016
git-svn-id: http://src.chromium.org/svn/trunk/src/build@198683 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
There are several attributes introduced in API 17, mostly for BiDi(RTL) support, e.g., paddingStart.
This build script will generate another set of resource that is API 14 compatible by
converting those API 17 attributes to API 14 attributes, e.g., paddingStart -> paddingLeft.
The goal of this script is for programmers to use those attributes without worrying
about backward-compatibility care and related bugs. About the bugs, please refer to crbug.com/235118 .
BUG=235118
Review URL: https://chromiumcodereview.appspot.com/14476011
git-svn-id: http://src.chromium.org/svn/trunk/src/build@198325 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In the component build, the device executable requires shared libraries
to run. When building, use build/android/native_app_dependencies.gypi
to copy the executable+libraries to a dist directory.
Then, in android_commands.py we need to copy that directory to the
device and specify LD_LIBRARY_PATH when running the executable.
NOTRY=true
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14646030
git-svn-id: http://src.chromium.org/svn/trunk/src/build@198183 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Small set of changes in gyp files to enable build for libchromeview for
MIPS-Android.
It also includes minor change in base/debug/stack_trace_android.cc to
redefine SIGSTKFLT for MIPS, since MIPS does not have SIGSTKFLT.
BUG=130022
TEST=build libchromeview
Review URL: https://chromiumcodereview.appspot.com/14241008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@196938 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This patch deprecates armv7 and adds arm_version that takes an integer
value representing the ARM architecture level.
In addition arm_arch, arm_tune, arm_fpu, arm_float_abi and arm_thumb can
be set to fine tune CPU related compiler flags, defaults are provided for
ARM versions 5 to 7.
BUG=234135
Review URL: https://chromiumcodereview.appspot.com/14065005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@196702 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Historically, WebSettings management is used to be in the ContentSettings class,
while only WebView actually needs it. Chrome for Android is only interested in
the value of the "JavaScript enabled" setting.
This change leaves zoom-related settings intact, as moving them will require
decoupling of the ZoomManager class from the ContentView* family of classes,
which deserves a separate change.
BUG=b/8296421
Review URL: https://chromiumcodereview.appspot.com/14271024
git-svn-id: http://src.chromium.org/svn/trunk/src/build@196399 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
If a user reinstalls/uninstalls/etc an APK, then the next build of that
APK should always install it (regardless of whether the md5sum of the
inputs matches the recording or not).
Adds an option to CheckCallAndRecord to force the call.
NOTRY=true
BUG=158821,234048
Review URL: https://codereview.chromium.org/14254005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@196170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
If the device folder is not specific to debug/release, then switching
configurations changes the state on the device without updating the
corresponding records on the host (i.e. it only updates the ones for
that configuration).
NOTRY=true
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14238023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195852 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
DomOperationsTests.*, DomSerializerTests.* and ResourceFetcherTests.* depended on TestShell loading URLs correctly. That couldn't be done with RenderViewTest harness since ResourceDispatcher code isn't hooked up. I added a mechanism for the browser test harness to run code on the renderer thread when running in --single-process mode. That way a "browser test" can poke at the renderer code. single-process mode doesn't work on Linux Aura, so disabled those tests there for now (bug 234172). DomSerializerTests.* fail on Android. They never ran there before since test_shell_tests never worked there, so just disabled them there with a note to investigate.
Note CppBoundClassTest is trivial and doesn't depend on loading, so I just made it a RenderViewTest.
I removed plugin_tests.cc:
-PluginTest.Refresh won't work with sharding. It's for a use case we don't care much about anyways, so a regression, if it happens, isn't critical.
-PluginTest.DeleteFrameDuringEvent is a duplicate of PluginTest.SelfDeletePluginInvokeInSynchronousMouseUp
-PluginTest.ForceReload is for in process plugins (i.e. test shell), doesn't apply to our multi-process plugins
-PluginTest.PluginVisibilty is currently disabled and failing. I thought about porting it and fixing it, but it seemed low priority since it'd be flaky to test this with our multi-process plugins. This code also doesn't change anymore, and if we had a regression we would catch this pretty quickly. If we regress we can write a test then.
mock_spellcheck_unittest.cc: was testing a mock object used in TestShell. Since TestShell is going away, there's no need for this test. if the object breaks and no existing tests break, then it's a non-issue.
memory_file_util.cc wasn't used other than in its unittest. I removed the code and its test.
CppBoundClassTest.* could be converted to a RenderViewTest. The remaining tests (HostVarTrackerTest.*, papiPluginInstanceTest.*, PpapiCustomInterfaceFactoryTest.*, QuotaFileIOTest.*, WebkitGlueUserAgentTest.* were converted to content_unittests.
I will delete the unused webkit/data in a follow up patch (try servers are failing on applying the delete).
BUG=126514,234172,111601,51622
Review URL: https://codereview.chromium.org/14304004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195701 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This allows developers to force the values of individual flags in their
chrome/supplement.gypi. Add documentation for how a user can do that.
Also add a comment about the fastbuild option, but do not ever set it
by default.
NOTRY=true
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14366023
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195334 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This changes the content size update path for android_webview to use
the preferred size RenderView mechanism instead of the
CompositorFrameMetadata.
The reason for the change is due to the fact that the CompositorFrameMetadata
is not updated when the view size is 0x0, which is a common use case
for the WebView when it's layout mode is set to "wrap content".
BUG=b/8187850
TEST=AndroidWebViewTests
Review URL: https://chromiumcodereview.appspot.com/12567020
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195135 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
On new versions of Android, re-installing an APK creates a new /lib/
folder for native libraries. This means we need to recreate all the
symlinks in that directory (not just the ones that have changed).
To make all these links quickly, it should run as a single adb command.
To make that simple, we first create a simple script that, when run,
creates all the symlinks for an APK. Then, after any install, we send a
single adb command to run that script.
This also requires that the apk_install script only triggers its
dependents when it actually installs an apk.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14017010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@195124 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Repurposes the gyp scripts for processing native libraries for an apk and use them for a native library (i.e. forwarder).
Additionally, adjusts the forwarder python script to set LD_LIBRARY_PATH when invoking the forwarder.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14322004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@194833 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This action is triggered whenever the top-level library is re-linked. This file
being touched then triggers generating a Java file, and then
rebuilding/installing the APK. This is all unnecessary.
Instead, only write this file if the output has changed. Then, since the ninja
generator uses restat=1, dependent actions will only be retriggered when this
actual changes (almost never).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13891010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@194780 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds a function md5_check.CallAndRecordIfStale that makes the
common (and currently only) use of Md5Checker much simpler (i.e just
call this function). All the users of md5_check are updated to use this
function, and everything else in md5_check is no longer part of the
public API.
Also, adds tests for the md5_check module. These are only run manually currently.
BUG=158821
Review URL: https://codereview.chromium.org/14263006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@194377 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The native component build creates .TOC files for each of the native
libraries. These files contain the compile-time visible API of the
corresponding library. That is, if something changes in the native
library that could have an effect on linking of dependent libraries,
then that change will be reflected in the .TOC file. Then, these .TOC
files can be used to determine if linking of dependents is required.
This change brings that same magic to Java.
When building a .jar, we also create a .jar.TOC that includes the
signatures for public/protected classes/functions/variables (including
the values for constants since they can be inlined dependents).
When compiling a Java library, use an Md5Checker over the .java files
and the classpaths .jar.TOC (using the .jar if the .TOC isn't available
as is currently the case for prebuilt jars).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/14203002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@194080 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
After much work, we can build gtest APKs without first transforming .java files, resource files, or the AndroidManifest.xml. We can directly use java_apk.gypi and build like all other APKs.
Do that.
Also, native_test_apk.xml was the last user of common.xml and sdk-targets.xml, and so those can now be removed.
Review URL: https://chromiumcodereview.appspot.com/13828003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193576 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Splits apk-package.xml into apk-package.xml and
apk-package-resources.xml and adds a new gyp action for
package-resources.
This continues the simplification of gyp actions (i.e. each individual
action should be simple).
Also, allows more accurate specification of inputs for
-package-resources vs -package (and allows -package-resources to be
done in parallel with javac/dex/etc.).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13811027
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193491 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
I have worked with a couple developers to dogfood the installation and running
of AVD's using the build/android scripts. The following suggestions have been
taken are are implemented by this change:
- Use configuration of AVD for Galaxy Nexus by Google as default config
- allows developers to use software keyboard
- uses the Galaxy Nexus skin with Back/Home/Apps buttons at bottom
- Defaults (one x86 AVD) are printed on the help page
- Does not require virtualization support for ARM emulator (only x86)
BUG=164911
Review URL: https://chromiumcodereview.appspot.com/13543008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193281 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Often this action is triggered and only actually needs to strip few/no
native libraries (i.e if only base.so changes there is no need to strip
all the other libraries). Add modified time checking to this action.
Since the input files are very large, using md5 checking is too slow
(i.e. it is not much, if any, faster than just doing the strip).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13504003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@193003 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
content_browsertests were timing out on the Android FYI bots since it
took more than 7 minutes to push the test files to the device. This
extends the timeout to 20 minutes, as a stopgap until we can reduce
the number of files that need to be pushed.
BUG=138275
Review URL: https://chromiumcodereview.appspot.com/13674021
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192682 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Currently, normal APKs and instrumentation APKs are both built using
java_apk.gypi (which includes all kinds of new hotness). Native
unittest APKs, though use apk_test.gypi and thus the complicated
native_test_apk.xml and Android's Ant build.xml. That is bad.
This change updates apk_test.gypi to include java_apk.gypi and so
brings these two ways of building APKs into alignment. It also very
slightly updates the configurability of java_apk.gypi and
apk-package.xml.
There are still a couple of targets in WebKit that use
generate_native_test.py and native_test_apk.xml directly that need to
be updated to use apk_test.gypi before those two scripts can be
simplified/removed.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13564003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192662 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
With gyp_managed_install no shared libraries should be packaged in the
APK (except gdbserver).
When toggling gyp_managed_install, there may be left over libraries in
<(intermediate_dir)/libs. APK packaging should use a different
directory when doing a managed install, so that it does not include the
library from a non-gyp_managed_install build.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13651003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192617 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The md5 stamp path includes the device serial (i.e. the stamp is
library-device specific).
Also, this no longer creates a shell for-loop as the command to send to
adb. adb shell has a ~1000 character limit for commands, and the
for-loop was exceeding that limit. Now that we only create links for
libraries that actually have changed, there is not as much benefit to
creating all the links in one adb command.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13537006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192484 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
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
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
The SystemMonitor is a mixed monitor which not only monitors
the power state changes but also the devices changes. This
patch is to separate the power monitor from SystemMonitor
as a new class PowerMonitor which is dedicated to monitor
power state.
The next step is to seek a opportunity to refactor SystemMonitor
as something like DeviceMonitor.
BUG=149059
TEST=base_unittests --gtest_filter=PowerMonitorTest.*
Review URL: https://chromiumcodereview.appspot.com/10959020
git-svn-id: http://src.chromium.org/svn/trunk/src/build@192114 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
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
When an APK is installed, any native libraries it contains are
extracted to the APK's lib folder on the device. It is actually
possible to add, change, or remove libraries in that folder directly.
This means, that when gyp is managing the install of APKs, the APK does
not actually need to include the native library, and that can be pushed
separately.
This does several nice things:
libraries can be pushed while a .apk is building
.apk no longer needs to be rebuilt+reinstalled when a library changes
if native library isn't changed, it doesn't need to be zipped+installed
w/ component build, only changed libraries will need to be reinstalled
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13334003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191888 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Add a gyp variable "android_managed_install" which defaults to off/0.
When this variable is 1, building an apk target will install that
target.
This will allow us to do crazy things with the install like pushing
native libraries independent from the apk they belong to.
This currently just does an "adb install -r <(apk_path)". I.e. it only
works for (the typical) single device attached workflow. This could
be made configurable to handle other cases (or maybe just install to all
devices attached, or just to the first device).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13269002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191840 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
First, this allows us to correctly have the output of the copy/strip
action be an input to the apk package action.
Second, this step now uses the list of libraries created by ordered
libraries step. This is required to support the component build where
we can not manually list the required libraries.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/13058003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191754 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
At build time, we know what native libraries an apk needs to load.
Instead of requiring those .apks to specify this again in code, instead
generate a .java file containing a list of the libraries to load.
This is done using a pattern similar to resources, content_java is built
with a placeholder NativeLibraries.java (i.e. without an actual value
for its libraries list). The corresponding .class file is not included
in content_java.jar. Then, when building an apk we generate the "real"
NativeLibraries.java (with the real String[]) and include that in the
.apk.
This is designed to also support the component build, where, we will
have to calculate the list of libraries at build time, and sort them in
dependency order (because Android's linker, for some reason, doesn't do
that itself).
BUG=158821
TBR=brettw@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12939021
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191695 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The python build scripts use subprocess.check_call() for external
commands (aapt, javac, etc). On a failure, it prints the python
stacktrace, followed by the command being run (in a form that can be
copy-pasted and actually work), followed by the output from the command.
Previously, it was printing command output, then command, then
stacktrace which is much less useful.
Review URL: https://chromiumcodereview.appspot.com/12913028
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191300 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
A frame with a timestamp of INT64_MAX actually means that the fence
object associated with the frame is still pending or that the frame has
not yet been displayed. Update the comment in SurfaceStatsCollector to
make this more obvious.
No functional changes.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/13188002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@191158 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Libraries could previously access dependencies' resources in Java code
but not in XML layout files. This enables accessing these resources in
layout files as well, with the compromise that resources can now be
accessed using the wrong package name in Java code. Since resource
names are global anyway (an APK can't contain two resources with the
same name), this is deemed OK.
BUG=176069
Review URL: https://chromiumcodereview.appspot.com/13107002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190896 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Proguard should only be run in Release mode (in gyp, proguard_enabled is
not set based on the configuration). This is the way that we had
been determining whether or not to run proguard before recent Ant
refactoring.
Also, proguard needs the path to the android.jar
BUG=224079
Review URL: https://chromiumcodereview.appspot.com/12922004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190876 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In preparation for rewriting these actions in python, split apk-build.xml into smaller ant scripts. This should not change the functionality and mostly is just splitting the file and identifying the properties and defines required for each of the new files.
Some of the configuration is moved out of ant and into gyp (i.e. the android_manifest_path is now gyp-configurable).
Also, the ant scripts now use the correct basedir! That is, these ant scripts actually understand relative paths. To go along with this, resource_dir is the relative path to the resource directory (rather than a path relative to java_in_dir).
BUG=158821
TBR=torne@chromium.org, brettw@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12963009
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190712 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This enables Android layouts and Java code to use strings from
generated_resources.grd directly. Strings tagged with
formatter_data="android_java" in generated_resources.grd are used to produce an
Android strings xml file.
BUG=176069
Review URL: https://chromiumcodereview.appspot.com/12529025
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190573 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This change is to fix resource-related issues with the current approach.
We can't include resources in the test_java target to share them between
the shell and test apks, so we need one apk to contain the shell and run
tests against.
To achieve this we apply the same trick as testshell does and build the
test code against the .jar created as a side-effect of building the shell
apk target.
This change completely removes the test_apk target.
BUG=None
TEST=AndroidWebViewTests
TBR=bulach@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12609013
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190404 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Output a warning instead of a failure when the layout test command
fails. We'll revert this when we've got a stable base, and it will
be easier for others to track webkit_unit_tests and TestWebKitAPI
failurse until that happens.
BUG=218257
Review URL: https://chromiumcodereview.appspot.com/12709003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190135 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
old design was causing many spurious messages to be sent to the UI thread.
- CleanupReference now triggers when GC sees the object has become weakly rather than
phantom reachable, as this can occur earlier but if sufficient for knowing we must
perform native cleanup.
- added some basic GC cleanup tests in CleanupReferenceTest.
Review URL: https://chromiumcodereview.appspot.com/12658010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@190110 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This adds a simple test shell (most code stolen from chrome testshell)
for android_webview testing.
The only currently supported rendering mode is s/w rendering.
BUG=None
Android_webview-only change, ran through trybots.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12317015
git-svn-id: http://src.chromium.org/svn/trunk/src/build@189246 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The perf governor was previously controlled by the PerfTestSetup class,
which set the perf governor to 'performance' mode in Startup() and
reset it to its original value on TearDown(). This had a number of
problems:
- We ended up with TearDown() being used in place of SetUp() when
starting tests where we didn't want performance mode. This looks
strange.
- There was no explicit way of setting the device's default
performance mode. We would call TearDown() and hope for the best. This
would not work if the device was already in performance mode at the
start of the test. We think this is sometimes happening on the
performance bots.
- SetUp() also cleared the caches, which should have no direct
connection with setting the performance mode.
This patch creates two new classes, PerfControl and CacheControl, to
manage the perf governor and cache. These replace PerfTestSetup.
PerfTestSetup has not yet been deleted to avoid the need for simultaneous
commits on the upstream and downstream repositories.
Review URL: https://chromiumcodereview.appspot.com/12720010
git-svn-id: http://src.chromium.org/svn/trunk/src/build@189097 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Update the Android SurfaceFlinger-based frame latency metrics to match
the numbers that are tracked downstream. The new method records the time
of the most recent vsync when a new frame is submitted to SurfaceFlinger.
These frame timestamps are used to derive the following animation quality
indicators:
1. Average frame rate (avg_surface_fps).
2. Maximum time between frames (max_frame_delay) in number elapsed
vsync periods.
3. Number of "janks" or dropped frames during the benchmark
(jank_count). This is calculated by first taking the frame
durations:
duration[i] = timestamp[i + 1] - timestamp[i]
and then seeing when the duration changes:
changes[i] = duration[i + 1] - duration[i]
Every time the frame duration increases by an additional vsync
interval multiple we count the frame as jank:
jank_count = sum{1 | max(0, round(changes[i] / vsync_interval)) > 0}
BUG=https://b/8364918
Review URL: https://chromiumcodereview.appspot.com/12438022
git-svn-id: http://src.chromium.org/svn/trunk/src/build@189006 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
> Android WebView: change how the SDK jar is found.
>
> Setting android_sdk has unintended consequences which have recently
> broken the build, but we still need to be able to point to the sdk
> jarfile for now until this dependency has been solved for real; use the
> newly introduced android_sdk_jar variable from r188737 to specify this
> and set android_sdk to a harmless but invalid value rather than a make
> variable expansion.
>
> BUG=
>
> Review URL: https://codereview.chromium.org/12917006TBR=torne@chromium.org
Review URL: https://codereview.chromium.org/12780016
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188769 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Setting android_sdk has unintended consequences which have recently
broken the build, but we still need to be able to point to the sdk
jarfile for now until this dependency has been solved for real; use the
newly introduced android_sdk_jar variable from r188737 to specify this
and set android_sdk to a harmless but invalid value rather than a make
variable expansion.
BUG=
Review URL: https://codereview.chromium.org/12917006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188747 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is a fairly straightforward translation of the ant build script
into two python actions.
Two things have been moved into the gyp file: adding android.jar to the
classpath and specifying the jar_excludes (currently just R.class and
R$*.class).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12853002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188594 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This change makes the behavior of apk-build.xml much clearer.
First, delete several empty targets:
-pre-build
-post-build
-set-mode-check
-post-package
-set-debug-files
Then, merge chains of targets (i.e. only -compile depends on
-pre-compile and so they can be merged into one target).
check-env --> -setup
-pre-compile and -post-compile --> -compile
-crunch --> -package-resources
-release-sign --> release
-do-debug --> debug
-release-obfuscation-check --> -set-release-mode
-debug-obfuscation-check --> -set-debug-mode
-build-setup --> -setup
Then, rearrange the targets so that they are in the order that they are
run.
Finally, delete some small unused things (mergemanifest, buildconfig).
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12808004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188548 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Use a "Start / Stop" method rather than __enter__ / __exit__
- Make "trace_tag" optional
- Remove printing results.
Note: N-sided patch, further cleanup to remove the constructor param and
the __enter__ / __exit__ methods will be done once this rolls.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12513011
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188167 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Android's build script uses record-build-info to determine when the build type
has changed and things need to be rebuilt. We use gyp to tell us when to
rebuild things and ant should always do it. Remove this macro and inline the
corresponding empty strings.
BUG=158821
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12617005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188128 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
A few changes here:
- move up from "scrolling_action" to "smoothness_benchmark" (which knows about results).
- changes surface_stats_collector itself to provide but not print the results.
- creates a Telemetry "platform.RawDisplayResult" abstraction so that
android_platform_backend.py can use that, and the rest of Telemetry doesn't know about
android-specific details.
- while at it, also ensure that DidRunAction is in a finally block after RunAction to ensure
proper cleanup (if needed).
BUG=170894
TEST=
Review URL: https://chromiumcodereview.appspot.com/12499006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@188037 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is mostly dealing with the code for library dependencies. Our
library dependencies are handled through gyp, and not by ant. The
dependency task that is removed calculates only empty paths for each of
its arguments (some are already set above and are immutable).
BUG=158821
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/12595008
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187911 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This removes a bunch of the ant properties and targets that are never
used in our builds. These are related to: installing apks, running
tests, emma instrumentation, lint, help, clean, building library
dependencies, building main apk for test apks, renderscript, and asking
for keystore password.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12701012
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187735 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Rename the "android_build_type" gyp variable to "android_webview_build"
to better describe what it does. There are still references in WebKit
and V8 that need to be changed before the original variable can be
removed.
BUG=184431
Review URL: https://codereview.chromium.org/12730006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187556 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
First check in a copy of
third_party/android_tools/sdk/tools/ant/build.xml as
build/android/ant/apk-build.xml
Previously we were overriding targets from this build.xml
in build/android/ant/sdk-targets.xml. Instead of doing this
override, just replace the actual targets in apk-build.xml.
Do the same for properties that we were overriding in
build/android/ant/chromium-apk.xml.
Both of these have no logical change on these build scripts.
Ant's targets and properties are immutable and so Ant was
doing this exact thing already.
BUG=158821
Review URL: https://chromiumcodereview.appspot.com/12599005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@187483 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
On Android we ask SurfaceFlinger about frame presentation times to
estimate metrics such as frame rate and jitter. This data is recorded on
a per-window basis. For applications that use SurfaceView, the
statistics are reported separately for the main application window and
the contained SurfaceView. Since we mainly care about the rendering
performance of web content, we should track the statistics for the
SurfaceView instead of the main Chrome window.
BUG=http://b/8254709
Review URL: https://chromiumcodereview.appspot.com/12432006
git-svn-id: http://src.chromium.org/svn/trunk/src/build@186801 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This creates a Java-layer ProfileSyncService that is the only class that
should be used from downstream Chrome for Android. The native
counterparts should not be used.
In the process, a hashing utility and also, some identity code and their
respective tests had to be upstreamed. No functional changes have been
made to them.
BUG=159203
TBR=sky@chromium.org
Review URL: https://codereview.chromium.org/12313075
git-svn-id: http://src.chromium.org/svn/trunk/src/build@186798 4ff67af0-8c30-449e-8e8b-ad334ec8d88c