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

144 Коммитов

Автор SHA1 Сообщение Дата
johnme@chromium.org 802e2f3b10 Revert 221736 "[android] Adds constants.GetOutDirectory() and co..."
Consistently causing WebKit Android (Nexus4) to fail provision_devices.

> [android] Adds constants.GetOutDirectory() and converts test scripts to use it.
> 
> BUG=260494
> TEST=None
> NOTRY=True
> 
> Review URL: https://chromiumcodereview.appspot.com/22903016

TBR=craigdh@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@222008 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-09 11:36:03 +00:00
craigdh@chromium.org babb42acc8 [android] Adds constants.GetOutDirectory() and converts test scripts to use it.
BUG=260494
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@221736 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-06 18:11:02 +00:00
craigdh@chromium.org 45ae941b82 [android] Explicitly specify whether to ignore file paths when pushing files.
When pushing data files avoids matching files whose relative paths do not match a file being pushed from the host.

BUG=284906
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@221477 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-05 18:38:52 +00:00
craigdh@chromium.org d7fa32d9f5 [android] Additional logging to collect more data about why files are being pushed.
BUG=166338
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@221060 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-03 23:09:31 +00:00
navabi@google.com d854400b25 Only check if setup wizard is disabled if doing provision check.
The provision check checks if setup wizard is disabled. If the device status
check is run with no-provision-check, don't try to get read the status of the
setup wizard from the device.

The reason for the change is that checking the status of the setup wizard has
caused problems in certain cases (see the discussion on the bug). While the
particular issue can be fixed elsewhere, it is better to not check the status if
we are not going to use it.

BUG=255157
TBR=ilevy@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@220696 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-30 23:36:51 +00:00
boliu@chromium.org e9ea00e87c [Android] Fix device file push location
On ICS, push location for Android WebView was:

file:///mnt/sdcard/chrome/test/data/device_files/database_access.html

And now is fixed to:

file:///mnt/sdcard/chrome/test/data/webview/database_access.html

BUG=277077
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@219585 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-26 19:30:52 +00:00
feng@chromium.org 448b146a13 Allow android pass flags to am start activity
Flags are useful to control how an activity is started. By default,
a new activity is created on the stack, but other flags can be
used to bring existing activity to the foreground instead of
creating a new one.

BUG=246689
R=bulach@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@218344 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-19 22:31:41 +00:00
bulach@chromium.org c641e3bc8f Android: uses taskset when starting adb.
Workaround for some adb issues.
While at it, print the step name before doing any action.

BUG=268450

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@217959 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-16 07:22:16 +00:00
bulach@chromium.org b17bbe9aab Android: wait for reboot.
On some devices, "reboot" is not synchronous, so the Reboot()
call and its internal waits were finishing before the device had even
started rebooting.

BUG=265425

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@216979 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-12 13:12:12 +00:00
craigdh@chromium.org 266cfb727a [android] Push only updated files in PushIfNeeded when few files have changed.
BUG=263857
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@216208 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-07 16:45:37 +00:00
frankf@chromium.org 1e6a6f874f [Android] Dedup content_browsertests test setup from gtests.
- This also changes the command for running content_browsertests
  to be in line with other gtest targets
- Additional cleanup: get rid of --exe option and fall back
  to using exe if apk is not found

TEST=test_runner.py gtest -s content_browsertests
BUG=261950
R=bulach@chromium.org, craigdh@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@214421 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-30 20:14:36 +00:00
craigdh@chromium.org 7fea276a3d [android] Instumentation tests determine whether to install the test apk based on Md5Sum.
This deprecates the -I switch to instrumention tests.

BUG=260084
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@213956 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-26 18:31:20 +00:00
navabi@google.com 0d2fc8c2a3 Reimplement device status check dashboard option.
The changes to the device status check step from the following LGTM'd CL was
lost in the move from device_status_check.py to
buildbot/bb_device_status_check.py:
https://chromiumcodereview.appspot.com/19284009/diff/24001/build/android/device_status_check.py

This CL reimplements the option in the new device status check script.

TBR=frankf@chromium.org
BUG=254014

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@213194 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-23 19:43:32 +00:00
navabi@google.com d426b21937 Revert "Temporary fix to unbreak Tot Bots"
This reverts commit 7dc3e406f017bad927e1e356dd5dd5502b879fcd.

TBR=ilevy@chromium.org
BUG=261705

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@213055 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-23 07:22:44 +00:00
miguelg@chromium.org 8aa91c668a Temporary fix to unbreak Tot Bots
instrumentation tot is still using GetEmulators
BUG=261705
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212866 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-22 11:05:20 +00:00
navabi@google.com 1d652e1ca7 Do not reboot emulator.
BUG=261705

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212764 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-20 06:18:11 +00:00
craigdh@chromium.org 9aa62f5c51 [android] Ignore extra files on the client when comparing md5sum output.
Relands r212355 with fix for https://codereview.chromium.org/19592008/

BUG=None
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212451 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-18 22:09:36 +00:00
craigdh@chromium.org 079482f51d [android] Retry data pushes that fail due to device busy.
BUG=261436
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212396 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-18 19:25:56 +00:00
pliard@chromium.org 587ccd0597 Revert 212337 "[android] Ignore extra files on the client when c..."
The following assertion seems to fail:
assert all(len(s) == 2 for s in split_lines), 'Invalid md5sum output'

> [android] Ignore extra files on the client when comparing md5sum output.
> 
> BUG=None
> TEST=None
> NOTRY=True
> 
> Review URL: https://chromiumcodereview.appspot.com/19675006

TBR=craigdh@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212355 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-18 14:58:36 +00:00
craigdh@chromium.org 2da081dd99 [android] Ignore extra files on the client when comparing md5sum output.
BUG=None
TEST=None
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212337 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-18 13:18:02 +00:00
navabi@google.com c488d6d296 Add option to output device status data in format for dashboard and cleanup.
Adds an option to print the device status information (i.e. online devices, offline devices and device battery levels). Example output:

<*>RESULT OnlineDevices: OnlineDevices= 2
RESULT OfflineDevices: OfflineDevice= 0
RESULT DeviceBattery: 0149CC380F016011= 99
RESULT DeviceBattery: 014E378305007013= 60

Cleanup uses AndroidCommands for calling adb shell commands rather than its own GetCmdOutput function.

BUG=254014

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212052 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-17 15:41:07 +00:00
frankf@chromium.org 5b0ed2d5ac [Android] Use isolate remap instead of check.
- Instead of parsing *.isolated files, use isolate remap
to create a temporary dependency dir.
- Add an exclusion list to filter dependecies at a finer grain
than what's specified in isolate files.
- Convert base_unittests and unit_tests to use isolate. 

This adds an additional 50MB to the dependency size due
to many small directories not specified in the exclusion list.

BUG=249870

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@211350 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-12 06:58:43 +00:00
frankf@chromium.org ea8da93716 [Android] Do not fail if adb push returns no output.
This is the case for empty files.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@208015 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-22 07:07:36 +00:00
frankf@chromium.org 41346e07f3 [Android] Log the size of data transerred to device.
BUG=252047
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207641 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 23:47:25 +00:00
cjhopman@chromium.org 5f50a8a77e [Android] Add GetDescription and defer calculating device_utc_offset
First, only get the device's utc offset when it is actually needed. Calculating
this offset takes about 100ms on a typical device. The build scripts assume
that creating an instance of AndroidCommands is not so expensive. Instead,
defer calculating this value until it is actually requested. There are
currently several cases where the build scripts call adb directly instead of
through android_commands just to avoid this extra cost.

Second, add a GetDescription method to get a (mostly) user-readable description
of the device.

TBR=frankf@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207371 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 09:09:02 +00:00
bulach@chromium.org df2043b890 Android: renames pylib.constants.CHROME_DIR to DIR_SOURCE_ROOT.
Following comments from https://codereview.chromium.org/14882007/,
let's keep it consistent with base/base_paths.

BUG=
TEST=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@204357 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-05 23:28:09 +00:00
bulach@chromium.org 551095c595 Android: allows using adb from a chromium checkout without envsetup.sh
Following comments on https://chromiumcodereview.appspot.com/15891002,
rather than setting the path in pylib.__init__, set it via constants and android_commands.py.
Note that android_commands calls into third_party/android_testrunner, which then
uses adb directly, so it still needs to tweak os.environ.path.

BUG=242960
TEST=./build/android/run_tests.py -s cc_perftests

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@204341 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-05 21:16:21 +00:00
navabi@google.com e1b0b25194 Print the serial number of the device that timed out.
Many of our bots have multiple devices. Specify the device that timed out.

BUG=242237

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@202127 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-24 18:27:26 +00:00
frankf@chromium.org 196b7e7880 [Android] Force stop test app before launch (start -S)
Also:
 - Wait for launch to complete (start -W)
 - Move some direct adb calls to android_commands.py

NOTRY=True
BUG=243074

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@201929 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-23 23:36:18 +00:00
cjhopman@chromium.org 4f9327e94b [Android] Only reinstall test apk if needed
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
2013-05-13 22:23:49 +00:00
tedchoc@chromium.org 294001797c [Testing] Be more aggressive when killing android processes via ADB.
Without -9, this was not killing the forwarder.

BUG=237820
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@198212 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-03 22:13:03 +00:00
cjhopman@chromium.org 434f25bba4 [Android] Fix md5sum for component build
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
2013-05-03 21:04:39 +00:00
frankf@chromium.org f031a793cd [Android] Split uiautomator test runner from instrumentation.
Also, some minor refactoring.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193967 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-12 18:28:28 +00:00
frankf@chromium.org 6581cc7d40 [Android] Reduce test logging verbosity to INFO on buildbots.
Also, the output of host commands are now at DEBUG level.

BUG=160320

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193479 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-10 22:38:59 +00:00
craigdh@chromium.org b8c3a75578 [Android] Switch all subprocess.Popen calls to use a temporary file and other Python bug workarounds.
BUG=224382
TEST=Ran tests.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193273 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-10 00:38:06 +00:00
frankf@chromium.org ec917a2e02 [Android] Fix parsing of md5sum_bin_host's output broken in r192444.
BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192603 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 18:08:56 +00:00
frankf@chromium.org 2fea11220f [Android] Attempt to fix timeouts on Android bots.
Use subprocess communicate for getting md5sum hashes on the host.

BUG=224382
TBR=craigdh@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192444 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 02:05:37 +00:00
frankf@chromium.org 8a450f5010 [Android] Enable running uiautomator tests.
- uiautomator uses instrumentation runner for results reporting.
- Separate the concept of test jar (for progaurd consumption) from test
  apk
- clear the app before every uiautomator test

BUG=162742
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@189343 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-20 18:06:53 +00:00
aberent@chromium.org 815f8ad1cf Clean up control of perf governor
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
2013-03-19 20:56:27 +00:00
aberent@chromium.org 8300ed8050 Use 'pm clear' to clear application state.
This is the Android supported way, and avoids needing root privileges

Note, however, that we have to check that the package exists before calling pm clear, since pm clear on a package that
doesn't exist may never return.

See also the discussion on https://codereview.chromium.org/12094041/

BUG=169011


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@183503 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-20 13:26:27 +00:00
bulach@chromium.org e0f6bfaead Android: further "user build" perf test automation.
Follow up from r182261.
|su| on some devices return '', others some combination of line-ending, and some nothing at all.

BUG=175127


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@182478 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-14 16:49:57 +00:00
bulach@chromium.org b9d5f9dc17 Android: further "user build" perf test automation.
Use "cat /dev/null" rather than "echo".
"echo" is not guaranteed to be in the path or the system image.
"cat" seems available on the images used by the bots.

BUG=175127


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@182261 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-13 18:29:26 +00:00
bulach@chromium.org 32e0c851a7 Android: further "user build" perf test automation.
Use "GetProtectedFileContents" for obtaining memory usage and fetch perf test data from instrumentation tests.

BUG=175127


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@182028 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-12 22:00:14 +00:00
frankf@chromium.org 2f3ba8ccf4 [Android] Better handle gtest crashes that generate pexpect.EOF.
BUG=175538

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@182021 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-12 21:33:16 +00:00
bulach@chromium.org 37a91b3535 Android Telemetry: automates devices running "user" build.
Rather than requiring manual intervention, we can use Get/SetProtectedFileContents.

TEST=tools/telemetry/run_tests --browser=android-chrome TabConsoleTest
BUG=175127


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@181943 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-12 17:26:36 +00:00
eugenis@chromium.org 8f731d3f27 Run locally-built Android utils under ASan (if built with ASan).
In ASan build, device_forwarder and md5sum_bin are built with ASan
instrumentation. Due to specifics of ASan on Android, such binaries
must be prefixed with a script to run.

This change also adds more app names to the wrap property list, to
cover content_tests and test_shell.

BUG=160952


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@181309 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-07 15:34:59 +00:00
bulach@chromium.org 56b9c071e4 Android: removes deprecated |timeout| param from StartMonitoringLogcat.
This parameter has been deprecated in favor of WaitForLogMatch.

BUG=171347
TEST=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@180396 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-04 13:16:35 +00:00
aberent@chromium.org 950fb88afc Force root mode when clearing application data.
The old code was assuming that adb was already running in root, so could
delete application files without asking for extra privilages. This isn't
true on production builds. Fix by explicitly running each command as
root (using su).

BUG=169011


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@179915 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-31 19:00:38 +00:00
aberent@chromium.org 220119ceba Make startup timing independent of host performance
Add a method StartActivityTimed that puts a message in the log and starts
the activity in a single adb shell command, and then uses the log message
to get the activity start time, hence making the timing independent of
the time it takes to turn adb around.

BUG=172616


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@179429 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-29 21:56:15 +00:00
bulach@chromium.org 4e2c476ebd Android: fixes timeout for WaitForLogMatch.
The parameter would only be used if StartMonitoringLogcat hasn't been called.
This leads to wrong timeouts and mismatches when waiting for log lines.

BUG=171347
TEST=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@177977 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-22 04:01:47 +00:00
aberent@chromium.org a6c904d43d Support startup performance tests on Galaxy S3
The Galaxy S3's build of android is of type 'user' (as one would
    expect for a production device). This prevents the use of 'adb root',
    even on rooted devices, however one can root an S3 and install an
    'su' command on it without changing the android build. The changes
    in this commit switch to using the 'su' command in place of 'adb root'.
    Since writing to a protected file using su is quite complex they
    encapsulate this in a the function SetProtectedFileContents()
    and make sure that all calls in the Android test framework that write
    to protected files call this.
    
    Also, allow variable wait for logcat entries. This is now needed since
    other test changes mean that the 10 second default may not be adequate
    in some cases.
    
    BUG=169001,163336


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@177508 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-17 22:07:10 +00:00
eugenis@chromium.org 13dd1ba432 An obvious typing issue in android_commands.py
Review URL: https://codereview.chromium.org/11578067

git-svn-id: http://src.chromium.org/svn/trunk/src/build@174579 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-12-24 15:29:12 +00:00
navabi@google.com c7b41e0faa Assert that md5sum was built instead of failing silently.
The exit when md5sum does not exist fails silently with a short message buried
in the output with no tests run. The reason is because this is an asynchronous
process and the exit does not exist the script. The assert on the other hand
will stop the script and print the following, making it clear the script failed
and that md5sum should be built:

@@@STEP_FAILURE@@@
Traceback (most recent call last):
  File "build/android/run_instrumentation_tests.py", line 108, in <module>
    sys.exit(main(sys.argv))
  File "build/android/run_instrumentation_tests.py", line 101, in main
    ret = DispatchInstrumentationTests(options)
  ...
    results_lists = async_results.get(999999)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 528, in get
    raise self._value
AssertionError: Please build md5sum.

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@174299 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-12-21 01:05:55 +00:00
pliard@chromium.org e29d41125c Use the new forwarder2's Daemon implementation in device_forwarder.
This lets device_forwarder be controlled (started and killed) like
host_forwarder (see r167167).

This has the main benefit of moving the setup/tear down complexity from the
Python Forwarder wrapper code to the forwarder itself so that various clients
(including WebKit) can use forwarder2 more easily (e.g. no need to use pexpect
anymore (which is not available in WebKit)).

This implied a refactoring in the Daemon class so that its clients don't have
to duplicate the socket-related code.


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@169334 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-23 12:39:34 +00:00
peter@chromium.org 845b0d71a4 Modify the Android test running scripts so they can be used from WebKit
In order to avoid duplicating most of the run-tests-on-devices logic, make
sure that the Android scripts are able to be usable from a WebKit checkout.
Two flags have been added for this: --webkit, which is necessary as a file's
path on the host and device are not per se equal anymore, and --out-directory,
accepting a path as it's not always in the Chromium source directory.

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@167999 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-15 19:57:16 +00:00
frankf@chromium.org 74afc98e0e Should recursively make screenshot out dir.
This is only used for testing on Android.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@167259 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-12 23:23:16 +00:00
frankf@chromium.org 7e62b5f5df Add TakeScreenshot command to android_commands.
Also, take screenshots using /system/bin/screencap instead of monkeyrunner.

BUG=158851

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@166273 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-06 21:44:58 +00:00
frankf@chromium.org 6e13a4b587 Restart app before running monkey test.
Also remove dependency on env variables during import of apk_info.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@165022 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-30 21:51:15 +00:00
yongsheng.zhu@intel.com 0632bc0c07 Retry tests on other bots if the device is unresponsive/offline
Currently this works for offline devices when trying to access files
on devices or emulators.
Use DeviceUnresponsiveError to indicate the device is offline.

BUG=153718
TESTS=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@164013 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-25 04:46:22 +00:00
tonyg@chromium.org 17dd849f0b Wrap "import pexpect" in a try-expect.
This allows it to work on Windows. Example of failure:
http://build.chromium.org/p/chromium.perf/builders/Win7%20GPU%20%28ATI%29%20Perf/builds/5665/steps/scrolling_benchmark/logs/stdio

BUG=154343
TEST=None

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@163845 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-24 16:42:55 +00:00
bulach@chromium.org 03fe9f16fc Android: upstream latest changes for build/android.
- add instrumentation test options for printing buildbot failures;
- allow test_apk option to point to a fully qualified path;

BUG=136980
TEST=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@163810 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-24 11:18:31 +00:00
ilevy@chromium.org 5ea95a311b Fix pexpect import in android_commands.py
The "from pylib" import assumed cwd was build/android,
which is not always the case.

BUG=154343
TBR=bulach
NOTRY=True

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@163783 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-24 06:22:09 +00:00
tonyg@chromium.org ee33208c46 Move pexpect try-except to pexpect wrapper file.
BUG=None
TEST=None

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@163565 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-23 15:52:14 +00:00
tonyg@chromium.org 1a551e8510 In android_commands.py, surround pexpect import in try-except.
This allows Chrome Remote Control to import this file on platforms like Windows
where pexpect is not available. This works because it never calls the methods
that actually use pexpect.

Example failure:
http://build.chromium.org/p/chromium.perf/builders/Win7%20GPU%20%28Nvidia%29%20Perf/builds/5757/steps/scrolling_benchmark/logs/stdio

BUG=154343
TEST=Manual

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@163395 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-22 21:58:45 +00:00
nduca@chromium.org afaeb719aa Use third_party/pexpect in android pylib
BUG=154343


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@162519 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-17 21:03:12 +00:00
pliard@chromium.org 2e75992990 Add KillAllBlocking() to android_commands.py.
This is needed by forwarder2 which needs to wait until the device_listener
tears down.


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@161092 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-10 12:28:34 +00:00
aberent@chromium.org 9f565a78b7 Upstreaming latest build/android changes
Includes:
Fix to reboot so that it works on all devices
Handling EOF in logcat
Clear caches as root - required for recent android versions
Print standard deviation for performance tests

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@160651 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-08 14:54:42 +00:00
shashishekhar@chromium.org 2beca1312c Fix indent of a comment.
Nitz from a previous code review.

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@158390 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-24 21:27:11 +00:00
ilevy@chromium.org be39ba9f68 Clean up fifo logcat watcher
- fix double newlines in test results
- reduce log spam (bug 151886)
- some pylint cleanup of the two affected files.

R=bulach@chromium.org,skyostil@chromium.org
BUG=151886

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@158247 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-24 10:40:06 +00:00
shashishekhar@chromium.org b7afb0217f Add wrapper method for enabling adb root.
Adds a wrapper to call EnableAdbRoot of adb_interface.py
defined in android_testrunner. The called method enables adb root
on the device by sending "adb root" command and waiting for
device status.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@157850 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-20 21:47:07 +00:00
bulach@chromium.org 0746e8b9dc Android: uses a fifo rather than logcat for the test runner.
- This uses the same mechanism as webkit drt.
- It fixes the "timestamping" bug (147800), as the fifo
order is guaranteed (as opposed to logcat).
- It also removes AndroidLogPrinter which was injected in the gtest
framework.
- Downside is that we won't get inline crashstack. However, those
were normally useless as they were not symbolized anyways.
We can still get tombstones if we detect a crash.

BUG=147800
TEST=build/android/run_tests.py


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@157541 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-19 13:04:01 +00:00
nileshagrawal@chromium.org 649ba91597 Android: Always push md5sum_bin to the device.
BUG=149724


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@157073 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-17 03:19:43 +00:00
ilevy@chromium.org 7374cc923d Moved RunMonkeyTests out of android_commands.py
(it did not fit)
- simplified calling structure.

R=frankf@chromium.org,bulach@chromium.org,klundberg@chromium.org
BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@156511 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-13 07:47:44 +00:00
bulach@chromium.org 4c0c5f6378 Android: upstream latest changes for build/android.
- uses $EXTERNAL_STORAGE rather than /sdcard
- split PerfTEstSetup from android_commands.py

BUG=
TEST=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@156017 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-11 15:41:56 +00:00
yongsheng.zhu@intel.com 3eb123987d Use 'ls' when 'test' is not usable on android
In current emulators, there is no 'test' command. To check whether
a file exists, use 'ls' to workaround this issue.

BUG=
TEST=run_tests.py


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@155932 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-11 03:06:19 +00:00
nduca@chromium.org a706664993 Revert 155170 - The 'test' command is not always usable on android
Breaks FileExistsOnDevice.

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

TBR=yongsheng.zhu@intel.com
Review URL: https://chromiumcodereview.appspot.com/10917123

git-svn-id: http://src.chromium.org/svn/trunk/src/build@155285 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-07 00:45:39 +00:00
yongsheng.zhu@intel.com fcac9341bc The 'test' command is not always usable on android
In emulator or some devices, there is no 'test' command. So workaround
this by using 'ls' to do this kind of check.

BUG=
TEST=run_test.py


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@155170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-06 12:04:07 +00:00
skyostil@google.com c6d33bbe9d [android] Remove extra adb newlines from buildbot log
Pexpect runs adb within a pseudo-tty device (see
http://www.noah.org/wiki/pexpect), so any '\n' printed by adb is written
as '\r\n' to the logfile. Since adb already uses '\r\n' to terminate
lines, the log ends up having '\r\r\n' at the end of each line. When
this is rendered within a <pre> element in the buildbot log, an empty
line is shown between each actual log line.

This patch replaces the above with a single '\n' in the logfile stream,
making the buildbot log easier to read.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@154760 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-04 16:18:54 +00:00
pliard@chromium.org d3edfc34d5 Get rid of device/host clock synchronization in android_commands.py.
Clocks can't be synchronized programmatically on non-rooted devices due to the
inability to use the SET_TIME permission in non-system apps.
We were depending on synchronization in AndroidCommands.PushIfNeeded() to
handle incremental data push by comparing host and device file timestamps.

This CL adds tools/android/m5sum and uses it in android_commands.py so that we
can avoid depending on dates to handle incremental data push.

This is a first step towards clock synchronization removal.

BUG=143114


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@154751 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-09-04 14:28:56 +00:00
frankf@google.com 37da98bc6c Add a test runner/sharder for Monkey stress tests.
BUG=145039

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@154006 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-29 23:46:21 +00:00
frankf@chromium.org 145ae384d8 Add monkey command to android_commands.
Add the option of reinstalling using -r instead of
uinstalling then installing.

BUG=140947

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@153093 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-23 22:32:37 +00:00
ilevy@chromium.org 7c4f2fb2ba Silence adb command output by default
- Cherrypick from downstream
  https://gerrit-int.chromium.org/#/c/23445/

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@152449 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-21 00:41:19 +00:00
ilevy@chromium.org f58b539295 Add STEP_WARNINGS to ManagedInstall failure
and fix typo

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@152241 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-18 04:20:09 +00:00
ilevy@chromium.org bf4c61e9e5 Fix calls to ls /root that might be empty
- My earlier CL
  https://chromiumcodereview.appspot.com/10823382
  is problematic.  This mostly reverts it and fixes the
  issue in a better way.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@152130 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-17 19:21:39 +00:00
ilevy@chromium.org 7803404e1e Organize adb install cmds and reboot on failure
- Rewrote adb_install_content_shell to not call adb install directly
- New function in android_commands 'ManagedInstall' which attempts
  to work around package manager freezes by restarting device

BUG=141899

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@152058 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-17 05:42:33 +00:00
ilevy@chromium.org 0055d53b08 Disable adb root default call in android_commands
We need to change downstream scripts to explicitly call this.
This is causing devices to drop offline during the adb root command.

I will manually pull this change downstream.

BUG=143109

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@152019 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-08-17 02:18:01 +00:00
james.wei@intel.com babaafe7b5 Restarting adb server before each testing start will cause conflict for multiple emulators
Sometimes there is conflict when several tests restart adb server at the same time.
Originally, restarting adb server is to fix the issue of connection lost with adb server when emulator booting, as this case already handled in AndroidCommand::WaitForSystemBootCompleted(), so it can be removed now. 

Also fix a typo.

BUG=
TEST=./build/android/run_tests.py -e -n 5

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@148242 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-24 23:14:06 +00:00
bulach@chromium.org 333fb117dc Android: Fix one issue for instrumentation on "user" devices.
We can't enable java asserts / reboot those devices.

BUG=
TEST=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@147484 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-19 18:03:39 +00:00
bulach@chromium.org 3fac791a87 Android: move functions added in third_party to android_commands.
Following http://codereview.chromium.org/10692132.
That patch effectively forked adb_interface.py under third_party.
We already have our android_commands.py wrapper, so let's use that
and avoid forking.

BUG=
TEST=./build/android/run_tests.py -s out/Release/base_unittests_apk/base_unittests-debug.apk -e 1


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@146557 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-13 11:11:55 +00:00
bulach@chromium.org eb91f32bdc Android: adds instrumentation test runners.
Part of upstreaming build/android, this adds the instrumentation
test runners to allow us to run java-based tests.

BUG=136688
TEST=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@146335 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-12 13:59:53 +00:00
james.wei@intel.com 24150562e6 as we will use sdcard to store test data, so add sd card when creating avd.
And when testing with emulator, sometimes the test broken due to push failed because /sdcard/ is not ready. 

Adding WaitForSdCardReady to make the test more reliable. 

BUG=
TEST=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@146311 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-12 10:52:52 +00:00
bulach@chromium.org 5d7670d4de [android] Upstream / sync most of build/android and build/android/pylib.
These files have diverged overtime. We need to get them in sync in
preparation for the instrumentation tests.
The patches downstream have been entangled, so this is a bit big and
contains a series of otherwise unrelated patches.
However, it's probably safer to do this way (as it's guaranteed to be similar to
downstream), than trying to split it in multiple patches.

BUG=
TEST=try -b android_test


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@145872 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-10 13:21:43 +00:00
bulach@chromium.org 09165fe507 [android] Fixes checkperms.py error.
Following http://codereview.chromium.org/10693110/.
A few files moved around to pylib and had their executable bits left on.

BUG=
TEST=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@145658 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-09 09:51:45 +00:00
bulach@chromium.org 42c382abb6 [android] Split top-level scripts and libraries from build/android.
- Top-level scripts are kept under build/android.
- Utility libraries have been moved to build/android/pylib.
- Fixes all imports and headers.

This is in preparation for landing the "instrumentation" (java-based) tests,
which will reuse several of these components.

BUG=
TEST=existing android tests


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@145653 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-07-09 09:11:57 +00:00