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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
- 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
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
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
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
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
- 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