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
This was installing all modules defined in Soong, since we always load
the Soong-generated Makefile for mm/mmm. So use MODULES-IN-* instead of
all_modules.
Also switch to the new GET-INSTALL-PATH-IN-* arguments.
Bug: 30191725
Change-Id: I8a660e24c9933f3f77eb23efd71f8e374a248576
--install-filter parameter is a regular expression that will be used
to match the compiled apks to determine if it needs to be installed.
This is very helpful when there are many apks in a test directory,
but you only care about one during development.
e.g. fw/base/core/tests/coretests
Change-Id: I6a6a04640e549be4d90c9c659e557e7870af6771
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
This change automatically adds -g to all adb install commands
for runtest. It also allows users to:
1) Specify '-k' as a command line arg to avoid granting permissions.
2) Declare a test suite as 'requiring permissions' within test_defs
Also fixes a potential bug where continuous="false" would translate
to True in the python code.
Bug: 21327566
Change-Id: I62d14e8106174861397b3fd8caa3e567e3538713
* Combine dalvik.vm.dexopt-flags with existing to disable verification
* Always do a runtime reset (stop;start) instead of rebooting device
* Build dependencies (mma) if regular build fails (mm)
Change-Id: I5e9fcebeea052c3314d1f4146b074637c329c0a0
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
- No need to include cts/CtsBuild.mk, because that is included by the
core build system.
- Include the tradefed-prebuilt.jar on the classpath when running
host side tests.
- Update some of test_defs that have changed. Remove suites that
have been deleted.
Change-Id: Ie2845db7f209ad4ccb881d2ad47b9415c9f518a4
The CTS packages use CTS-specific Makefiles rules like
BUILD_CTS_PACKAGE instead of BUILD_PACKAGE. Update runtest
to include CtsBuild.mk which defines all of these.
Change-Id: I6ea6c77b4f2ab113126319141e5120e016055c9d
Previously runtest would fail hard if development/test_runner/test_defs.xml
file was not present, even if it wasn't needed (ie running in --path mode).
This commit skips test_defs parsing if --path is specified, and only parses
development/test_runner/test_defs.xml if its present.
Bug 4556556
Change-Id: Ief2dbbdab5c7e82e5db64414392d6e2a564e815d
Checks if the test to run is a framework test based on path, and if so
disables the davlik verifier by writing to /data/local.prop and
rebooting device.
Change-Id: Ibf94fb921662b5ddf6136dd12360d5de83a3a284
* automatically detect if emma is on device
* build emma into libcore if necessary
* stop runtime before adb sync and restart afterwards
Change-Id: Id5087fdd6c0345f2b9b76658a5083b9260af061e
* automatically detect if emma is on device
* build emma into libcore if necessary
* stop runtime before adb sync and restart afterwards
Change-Id: I6f1beacdd266310c481351165a054dca8f8657b2
This supports specifying a file system path to test(s) to run. The path can be
a java test class file, a java package directory, or a parent directory
containing many tests.
This change allows users to run tests independently from test_defs.xml.
BUG 2133198