Previously, it only detected ports that were bound to *, localhost or
127.0.0.1. This detects ports bound to any interface. I noticed this
while investigating 294878, and it could certainly be a source of
flake, but I don't think it's the main one.
BUG=294878
Review URL: https://codereview.chromium.org/634803002
Cr-Original-Commit-Position: refs/heads/master@{#299379}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: da7e64810f0305512cd20f0301c2ac1b21d8bc70
This patch revises the implementation of DeviceUtils.PushChangedFiles
and changes its interface (slightly).
PushChangedFiles now:
- takes a list of (host_path, device_path) tuples, each of which are
analogous to the original parameters.
- continues to use AndroidCommands.GetFilesChanged to determine which
files need pushing
- attempts to pick the fastest method out of:
- individual file pushes
- entire directory pushes
- zip-push-unzip
BUG=400440
Review URL: https://codereview.chromium.org/646523002
Cr-Original-Commit-Position: refs/heads/master@{#299098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b53e3ccca7fa26a51f3980f250f5527581324316
test_runner.py by default assumes that all unit tests apks
are built into CHROME_SRC_DIR/out. If we have custom build
directory other than out, test_runner.py fails to run the
unit tests. User should be able to run the tests from any
build directory
BUG=None
R=bulach,craigdh
Review URL: https://codereview.chromium.org/639853002
Cr-Original-Commit-Position: refs/heads/master@{#298841}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d57cba32d174aa08f18deee79a4f9e7b39b902a
Reason for revert:
While we do want to only attempt to push once, this isn't the right way to do it. We should push _before_ attempting to list the tests, then be done with it.
Also, this breaks https://codereview.chromium.org/537063002/
Original issue's description:
> [Android] Don't push deps when listing gtests.
>
> PushDataDeps takes a long time even when all files are on the device
> because calculating the digests of all the files takes _much_ longer
> on a device than it does on a host.
>
> Skipping the push step during test listing -- where the data deps are
> unnecessary -- means that we don't try to push files twice in each
> gtest run, so we skip all of the device-side MD5 calculations that
> would happen in the second run.
>
> BUG=400440
>
> Committed: https://crrev.com/5c10479a0c3572cd41062b453c3e85527b5cfbad
> Cr-Commit-Position: refs/heads/master@{#294667}
TBR=starodub@chromium.org,cjhopman@chromium.org,klundberg@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=400440
Review URL: https://codereview.chromium.org/627553002
Cr-Original-Commit-Position: refs/heads/master@{#297948}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fc3ea0426cee341318cdc8d3f9ebb729e1dd64c5
Instead of disabling it through a file under build/android, better to
disable it directory in C++ source code to avoid sutle issues in the
bots that was caused when renaming the test or the test suite target
name.
BUG=339980
TEST=ui_unittests_apk
R=sky@chromium.org,primiano@chromium.org
Review URL: https://codereview.chromium.org/611513003
Cr-Original-Commit-Position: refs/heads/master@{#297637}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4642d9377d3044c81d0f32298ba0c203976c8cc9
Start printing out the command used to run findbugs to allow for easier
debugging why findbugs might be failing.
BUG=None
Review URL: https://codereview.chromium.org/612883006
Cr-Original-Commit-Position: refs/heads/master@{#297463}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9c6ac85c45fae9c17ad08c4f37dc223aa4a38d5d
This adds the necessary commands to programmatically disable charging
on the Nexus 5 as well as fixing a bug in the dumpsys power monitor.
BUG=314481
Review URL: https://codereview.chromium.org/617453004
Cr-Original-Commit-Position: refs/heads/master@{#297428}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6d11d3ee12a5ef05d5570661737a900105186fc6
This copies the logic from tools/build/scripts/slave/runtest.py in swarming.
I changed test_env.py so that it sets CHROME_DEVEL_SANDBOX to be an empty string, instead of unsetting it. The latter doesn't work as Chrome triggers checks in content/browser/browser_main_loop.cc. This is what runtest.py does.
BUG=414808,336218
Review URL: https://codereview.chromium.org/605063004
Cr-Original-Commit-Position: refs/heads/master@{#297330}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 92ee4a3cbd8284c6f63cf8ca3eed384ca70b939e
This is in preparation for updating the buildbot code. First we need to
make sure we build those targets, otherwise buildbot will fail.
BUG=331829,373148,299841,103304
TEST=None
R=sky@chromium.org,maruel@chromium.org
Review URL: https://codereview.chromium.org/600833002
Cr-Original-Commit-Position: refs/heads/master@{#296877}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 430fc906824927713d5a318afb50654e95b699b0
I broke the uiautomator tests with my change to instrumentation test
running in https://codereview.chromium.org/558883003/. The revised
implementation never called _RunTest, which the uiautomator test runner
overrides to run its tests. As a result, we were trying to run the
uiautomator tests with 'am instrument', which (obviously) doesn't work.
This patch revises the implementation of the instrumentation test runner
s.t. it does call _RunTest again.
BUG=417492
Review URL: https://codereview.chromium.org/607583002
Cr-Original-Commit-Position: refs/heads/master@{#296835}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 10a670535f86258e35633d855a01dac0a3f11c51
Test APK in addition to instrumentation tests contains launching activity and foreground service what let duplicate ChromeShell debug socket to a differently named socket. If a device with running ChromeShell and DevToolsBridgeTest's service connect to a Desktop chrome (with USB debugging enabled) then chrome://inspect#devices will show 2 ChromeChell items. Both are debuggable (https://codereview.chromium.org/521573002/ should be applied to Desktop chrome to make the process less surprising). It's suitable for manual tests.
This CL doesn't care of a few known issues:
1. Data channel buffer overflow. Data channel automatically closed in this case.
2. Uncontrolled number of pending sockets. DevTools throttles opening sockets and and keeps sockets that exceeds a threshold hanging.
3. Uncontrolled number of threads (it's actually not a problem if #2 solved, thanks to DevTools throttling).
To keep this CL reasonably simple this issues will be addressed later.
TEST=org.chromium.components.devtools_bridge.SocketTunnelServerTest, see description fro manual testing.
BUG=383418
Committed: https://crrev.com/15044609893faf9b2c2a533aa9a136f288ea20a1
Cr-Commit-Position: refs/heads/master@{#296360}
Review URL: https://codereview.chromium.org/517233002
Cr-Original-Commit-Position: refs/heads/master@{#296377}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6c788d675dba4ec185375863cbc53c0803cc4b3e
Reason for revert:
Fails to compile on Android: https://build.chromium.org/p/chromium.linux/builders/Android%20Arm64%20Builder%20(dbg)/builds/2163
devtools_bridge/android/javatests/src/org/chromium/components/devtools_bridge/SocketTunnelServerTest.java:291: cannot find symbol
symbol: method sleep()
sleep();
^
Original issue's description:
> Implementation of DevTools socket tunneling service for remote debugging.
>
> Test APK in addition to instrumentation tests contains launching activity and foreground service what let duplicate ChromeShell debug socket to a differently named socket. If a device with running ChromeShell and DevToolsBridgeTest's service connect to a Desktop chrome (with USB debugging enabled) then chrome://inspect#devices will show 2 ChromeChell items. Both are debuggable (https://codereview.chromium.org/521573002/ should be applied to Desktop chrome to make the process less surprising). It's suitable for manual tests.
>
> This CL doesn't care of a few known issues:
> 1. Data channel buffer overflow. Data channel automatically closed in this case.
> 2. Uncontrolled number of pending sockets. DevTools throttles opening sockets and and keeps sockets that exceeds a threshold hanging.
> 3. Uncontrolled number of threads (it's actually not a problem if #2 solved, thanks to DevTools throttling).
>
> To keep this CL reasonably simple this issues will be addressed later.
>
> TEST=org.chromium.components.devtools_bridge.SocketTunnelServerTest, see description fro manual testing.
> BUG=383418
>
> Committed: https://crrev.com/15044609893faf9b2c2a533aa9a136f288ea20a1
> Cr-Commit-Position: refs/heads/master@{#296360}
TBR=mnaganov@chromium.org,tedchoc@chromium.org,erikwright@chromium.org,serya@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=383418
Review URL: https://codereview.chromium.org/597063002
Cr-Original-Commit-Position: refs/heads/master@{#296361}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cf0900dae461d90af8ed7604da098690d7c744c3
Test APK in addition to instrumentation tests contains launching activity and foreground service what let duplicate ChromeShell debug socket to a differently named socket. If a device with running ChromeShell and DevToolsBridgeTest's service connect to a Desktop chrome (with USB debugging enabled) then chrome://inspect#devices will show 2 ChromeChell items. Both are debuggable (https://codereview.chromium.org/521573002/ should be applied to Desktop chrome to make the process less surprising). It's suitable for manual tests.
This CL doesn't care of a few known issues:
1. Data channel buffer overflow. Data channel automatically closed in this case.
2. Uncontrolled number of pending sockets. DevTools throttles opening sockets and and keeps sockets that exceeds a threshold hanging.
3. Uncontrolled number of threads (it's actually not a problem if #2 solved, thanks to DevTools throttling).
To keep this CL reasonably simple this issues will be addressed later.
TEST=org.chromium.components.devtools_bridge.SocketTunnelServerTest, see description fro manual testing.
BUG=383418
Review URL: https://codereview.chromium.org/517233002
Cr-Original-Commit-Position: refs/heads/master@{#296360}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15044609893faf9b2c2a533aa9a136f288ea20a1
This patch also removes a call to AdbInterface.StartInstrumentation and
implements some of the functionality of am_instrument_parser.py.
BUG=408585
Review URL: https://codereview.chromium.org/558883003
Cr-Original-Commit-Position: refs/heads/master@{#295491}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cbcc115def0fe5d2cf4c2018fccbbc16fd4c5aba
PushDataDeps takes a long time even when all files are on the device
because calculating the digests of all the files takes _much_ longer
on a device than it does on a host.
Skipping the push step during test listing -- where the data deps are
unnecessary -- means that we don't try to push files twice in each
gtest run, so we skip all of the device-side MD5 calculations that
would happen in the second run.
BUG=400440
Review URL: https://codereview.chromium.org/560133002
Cr-Original-Commit-Position: refs/heads/master@{#294667}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5c10479a0c3572cd41062b453c3e85527b5cfbad
Simplified the logic to save, set, and restore the command line used to
launch a browser. For efficiency, functions are implemented as single
shell commands to run on the device.
This reduces about 20% of the time taken to start a new browser, and
overall 5% of the total running time of telemety unit tests.
BUG=379378
Review URL: https://codereview.chromium.org/547623002
Cr-Original-Commit-Position: refs/heads/master@{#294401}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ed4ecc3210f219f40b77ce5efae5d668915b0ed1
during Telemetry tests consists of sending an "adb force-stop" command
to the device, in order to force kill any previous browsers which did
not close as expected.
Sending a kill -9 to the process is, however, more efficient.
This CL also adds some efficiency improvements to DeviceUtils.KillAll.
The change amounts to a 6-7% speedup when running all of telemetry
unittests.
BUG=379378
Review URL: https://codereview.chromium.org/536343003
Cr-Original-Commit-Position: refs/heads/master@{#294368}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1fd28e9eb7414c43c3811f684832296a85289b2a
This changes the "test" template to create a shared_library (instead of
an executable) on Android. After this, we can actually run
base_unittests with
`build/android/test_runner.py gtest -s base_unnittests`
as normal (though may need to CHROMIUM_OUT_DIR and BUILDTYPE as
appropriate).
This requires adding the following targets:
//testing/android:native_test_native_code
//testing/android:native_test_util
//testing/android:native_test_jni_headers
//tools/android/md5sum:md5sum
//tools/android/md5sum:md5sum_bin
//tools/android/md5sum:md5sum_prepare_dist
//tools/android/md5sum:md5sum_copy_host
Also, makes it so that native executables are stripped (just like shared
libraries). Adds a simple create_native_execuatable_dist template that
sets up a dist directory for the executable (see
build/android/gyp/native_app_dependencies.gyp).
BUG=359249
TBR=rlarocque
Review URL: https://codereview.chromium.org/557463002
Cr-Original-Commit-Position: refs/heads/master@{#294032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e65ead8fb1a1976682356cf824445476584e70f0
Currently, the findbugs_diff.py and friends ignore the
CHROMIUM_OUT_DIR environment variable, and hardcodes the out folder
to just be 'out'. This is problematic for developers who use a
different out folder.
This CL makes the generic findbugs util library read the environment
variable, and then default to 'out' if it is not set.
BUG=None
Review URL: https://codereview.chromium.org/553783007
Cr-Original-Commit-Position: refs/heads/master@{#293990}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bb78a46883c8b9a3201b6e2e457dda93de8b7072
Original description from commit 63e36e6bdaa65d1152dd62f9831128c752bc0408:
ui: Move ui_unittests.gyp into ui/base.
ui_unittests.gyp -> ui_base_tests.gyp (follow gfx_tests.gyp pattern).
ui_unittests_bundle.gypi -> ui/base/ui_base_tests_bundle.gypi
ui_unittests.isolate -> ui_base_tests.isolate
Add a TODO assigned to me to rename ui_unittests target to
ui_base_unittests when buildbot is updated.
It was reverted in commit 6297a2f1e441c46d6f8ca37a3798fe6fbdd6cc4c,
because a test from ui_unittests in ios_dbg_simulator started to
failing.
BUG=331829,373148,299841,103304
TEST=ui_unittests
R=sky@chromium.org,rohitrao@chromium.org
Review URL: https://codereview.chromium.org/518423002
Cr-Original-Commit-Position: refs/heads/master@{#293134}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2148b92f9cc676bf2b64dc7e47ef65daac393031
Remove a bunch of code that is already longer used or
will become unused when https://review.webrtc.org/22149004/
and https://codereview.chromium.org/505153002/ are landed.
Remove hardcoded paths to the WebRTC isolate files to make
it easier for us to make changes to them, since we can pass
the path to the .isolate file on test execution instead
(keeping the configuration in the WebRTC buildbot recipe instead).
Previously we had to roll our Chromium revision in WebRTC DEPS
every time a change was made before it became used.
Add support for a CHECKOUT_SOURCE_ROOT environment variable
used to make it possible to override the hardcoded path traversal
that is done to find the src/ directory (since it's different for
WebRTC bots). I considered passing a flag into the test_runner.py
scripts instead of using an environment variable, but my opinion is
that it would pollute the code too much since
constants.DIR_SOURCE_ROOT is used in 70 different places.
BUG=webrtc:3741
TEST=local building and test execution using command lines like this:
cd /path/to/webrtc/src
export CHECKOUT_SOURCE_ROOT=`pwd`
build/android/test_runner.py gtest -s tools_unittests --isolate-file-path=webrtc/tools/tools_unittests.isolate
R=navabi@chromium.org
Review URL: https://codereview.chromium.org/500423004
Cr-Original-Commit-Position: refs/heads/master@{#292861}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f0a439da1aba8e22b30ede87087418e806f7fa75
Changed implementation to make a single shell call, rather than
pushing files and executing several shell calls.
When running telemetry unittests on android, reduces total execution
time about 12%.
BUG=379378
Review URL: https://codereview.chromium.org/514123005
Cr-Original-Commit-Position: refs/heads/master@{#292405}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4bda9f96e6edbc4c208abde787c842f828f2f798
ui_unittests.gyp -> ui_base_tests.gyp (follow gfx_tests.gyp pattern).
ui_unittests_bundle.gypi -> ui/base/ui_base_tests_bundle.gypi
ui_unittests.isolate -> ui_base_tests.isolate
Add a TODO assigned to me to rename ui_unittests target to
ui_base_unittests when buildbot is updated.
BUG=331829,373148,299841,103304
TEST=ui_unittests
R=sky@chromium.org
Review URL: https://codereview.chromium.org/506483002
Cr-Original-Commit-Position: refs/heads/master@{#292146}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 63e36e6bdaa65d1152dd62f9831128c752bc0408
heap_profiler_unittests was previously a native executable target.
It turns out that we don't have the harness in place to run native
executable tests reliably on all Android versions due to the PIE
vs non-PIE issue (L vs ICS, see crbug.com/373219).
This caused a revert in crrev.com/416003005.
This change is making heap_profiler_unittests an apk target, following
the same pattern of the other tests we have in the codebase.
This change is also re-adding the tests to the the bot list.
BUG=393964
Review URL: https://codereview.chromium.org/465223005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@291197 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The implementation of thread local storage on Android does not free slots
in a fixed size datastructure with 256 slots. When a large number of tests
run in a single process it is easy to exceed the limit. We don't have
control over how many slots are burnt per test, so we just assume that
one slot is burnt per test. We split the tests so only 256 run in a given
process.
BUG=354405
Review URL: https://codereview.chromium.org/453953003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@289386 4ff67af0-8c30-449e-8e8b-ad334ec8d88c