New test tools are adding --no-hidden-api-checks when tests have
hidden-api-checks=false in their AndroidTest.xml, however this is not
supported by runtest. As only runtest is available in AOSP, this leaves
no option to make tests of internal classes pass.
Add an option to disable the check in runtest so we can still run tests in
AOSP.
Test: runtest frameworks-net still fails
Test: runtest --no-hidden-api-checks frameworks-net now passes
Change-Id: I9be9674d0bf2588ff509121273379f08d4cb3aea
Currently runtest script installs and then runs test apks with default
"adb install" and "adb shell am instrument" behavior. They are actually
different, "adb install" uses USER_ALL, "am instrument" uses
USER_CURRENT. This cl introduces a way to specify exactly which user a
test should run with in a multiple user environment. This also provides
a work around for b/22976637 for now.
Bug: 19913735
Bug: 22976637
Change-Id: I65e2b2c79768734a8bc9261f8c4693c9f89016b1
Stop using 'adb sync' in runtest. It was unreliable even when working
with full platform builds, and doesn't work at all for unbundled apps.
Instead, use output from build command to find produced artifacts and
use 'adb install' where possible.
However, note that this approach won't sync previously built artifacts
to device.
Also adjust to build system support for code coverage. Its no longer
required to build libcore to get code coverage.
Change-Id: I9c5d37897c9570d2d29db3ec82f5c53e60a8f485
A recent change to runtest resulted in absolute paths incorrectly
being used for a tests build path. This broke the special logic
for frameworks/base tests, since it assumed relative build paths.
Change build paths back to relative paths.
Bug 5105885
Change-Id: I83a26be25294d501cca73eb1b88a7364131b2caf
This is a rough initial version. It makes several assumptions:
- assumes each test source file is built into module with name equal
to basename of source file
- assumes tests get installed into /data/nativetest
However, given those assumptions, both:
$ runtest --path <path to directory containing gtest source> and
$ runtest --path <path to single source file>
should work.
Coming soon: gtest host support
Bugs 4563370, 4584339
Change-Id: Ia42aeed7f9ee6402b0ceb7b5ccaaa66ac636fe49
* automatically detect if emma is on device
* build emma into libcore if necessary
* stop runtime before adb sync and restart afterwards
Change-Id: I6f1beacdd266310c481351165a054dca8f8657b2
With this change, also refactored runtest as follows: Modified the
test suite schema and python implementation to have an inheritance
structure. Each test type has its own python module, which will
also handle the logic of running the test.