Commit Graph

35 Commits

Author SHA1 Message Date
Brett Chabot
616e8f960d Make runtest handle inner instrumentation class names.
Bug 7311518

Change-Id: I7c02991445a9fdd2341f54cfd49169fc4e492536
2012-10-26 16:47:09 -07:00
Brett Chabot
f0afa30c7f Change runtest --path to only run first instrumentation found.
Bug 7311518

Change-Id: I208c78c73b821389d942700afe8ea7073c41e8d4
2012-10-24 15:58:21 -07:00
Brett Chabot
8ac51186a6 Make coverage work without test defs.
Change-Id: I946df038e97dc5c2f40a4610d4076e13ab6bde37
2012-09-20 08:06:05 -07:00
Brett Chabot
81c475e4ac Fix log syntax.
And add better error message when instrumentation test is not
present.

Change-Id: I381421e59a3b667a5c3090ccd49e38fe99d680c5
2012-09-13 09:47:25 -07:00
Brett Chabot
7454171f17 Coverage and unbundling changes for runtest.
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
2012-08-31 18:55:15 -07:00
Brian Muramatsu
83f4573b4a Fixes for runtest
- 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
2012-03-08 11:50:17 -08:00
Brett Chabot
b0fd2cf942 Fix runtest --path for package-private frameworks tests.
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
2011-08-01 16:30:37 -07:00
Brett Chabot
ecfcc7da8e Fix runtest --path for tests built against SDK.
Bug 4556556

Change-Id: I3f829cae8f9fc1e64b3a44ac9e306b13b3cead7c
2011-07-17 14:06:20 -07:00
Brett Chabot
bb5918ed81 Add gtest target support for runtest --path.
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
2011-07-10 13:26:41 -07:00
Jean-Baptiste Queru
d9ef1df4a8 am e98ed06e: am d9380caf: Merge "Make runtest --path smarter when choosing path to build."
Merge commit 'e98ed06e17e28a11609caf133a08b3ced21a049a'

* commit 'e98ed06e17e28a11609caf133a08b3ced21a049a':
  Make runtest --path smarter when choosing path to build.
2010-08-30 13:28:09 -07:00
Jean-Baptiste Queru
e98ed06e17 am d9380caf: Merge "Make runtest --path smarter when choosing path to build."
Merge commit 'd9380caf410ddf4b17a6e5035a89851bc58408f7' into gingerbread-plus-aosp

* commit 'd9380caf410ddf4b17a6e5035a89851bc58408f7':
  Make runtest --path smarter when choosing path to build.
2010-08-30 10:33:39 -07:00
Jean-Baptiste Queru
d9380caf41 Merge "Make runtest --path smarter when choosing path to build." 2010-08-30 09:10:24 -07:00
Brett Chabot
12c6d3fb68 Make runtest --path smarter when choosing path to build.
The command 'runtest --path <path to parent folder>'
is intended to find and build all tests contained within that parent folder.

However, the runtest logic was flawed in that it assumed building a parent
folder's Android.mk file would build all sub-directories.

This commit changes runtest to explictly look for the rule to build
sub-dir makefiles when creating the set of dirs to build.

Change-Id: Ia7f2172c1be79be8589be5f435fc4fb32569c994
2010-07-29 16:00:53 -07:00
Brett Chabot
3a5897a4fe am d53cf3ba: am 8ddb2873: Change hosttestlib to use ddm-prebuilt.
Merge commit 'd53cf3ba04f48d234200e8418876db62cb0b6b56'

* commit 'd53cf3ba04f48d234200e8418876db62cb0b6b56':
  Change hosttestlib to use ddm-prebuilt.
2010-07-28 11:46:55 -07:00
Brett Chabot
d53cf3ba04 am 8ddb2873: Change hosttestlib to use ddm-prebuilt.
Merge commit '8ddb2873df96c7181c9358f5c9286e273648bf89' into gingerbread-plus-aosp

* commit '8ddb2873df96c7181c9358f5c9286e273648bf89':
  Change hosttestlib to use ddm-prebuilt.
2010-07-28 11:37:12 -07:00
Brett Chabot
8ddb2873df Change hosttestlib to use ddm-prebuilt.
Change-Id: Ibd1c44096893bc8804a4d7644fc83d2edd443bb2
2010-07-27 17:57:38 -07:00
Guang Zhu
fcd72133c3 update runtest due to libcore location change
Change-Id: I2f273c8952ad60b999c964b3c223cae2b52d83bd
2010-06-11 18:46:56 -07:00
Guang Zhu
863870c168 code coverage improvement (DO NOT MERGE)
* automatically detect if emma is on device
* build emma into libcore if necessary
* stop runtime before adb sync and restart afterwards

Change-Id: Id5087fdd6c0345f2b9b76658a5083b9260af061e
2010-05-18 10:54:47 -07:00
Guang Zhu
8aff3602e7 code coverage improvement
* automatically detect if emma is on device
* build emma into libcore if necessary
* stop runtime before adb sync and restart afterwards

Change-Id: I6f1beacdd266310c481351165a054dca8f8657b2
2010-04-20 16:24:27 -07:00
Brett Chabot
8dc9eb8ba6 Runtest support for tests that need 'make' not 'mmm' to build.
Change-Id: I0508db2578826249f9bf4756d5adc6f95e841231
2010-04-16 14:44:41 -07:00
Brian Carlstrom
90218acfdf runtest --path fails with symlinked ANDROID_BUILD_TOP
While reproducing b/2558977 I found that "runtest --path" did not work
for me because my ANDROID_BUILD_TOP contained a symlink. This is a
local fix to make FindTests use os.path.realpath instead of only half
using os.path.abspath when trying to make canonical paths to compare.

Change-Id: Ief353f52cb80b1798edc3c1233d1e082d9cebc26
2010-04-15 10:36:05 -07:00
Fred Quintana
75a73dc9fb fix runtest for unqualified Instrumentation class names
Change-Id: I0dcc9918b0bde568219d9085e8bbbc4cbba2b552
http://b/issue?id=2472406
2010-03-16 16:27:03 -07:00
Brett Chabot
84bc7826b8 Change runtest 'overriding test def' log to silent.
Change-Id: I9b52aac04f2b95e9c93963bfad0c6d29dbddb87d
2010-03-02 15:53:42 -08:00
Brett Chabot
c061154208 Add "annotation" and "not-annotation" args to runtest.
Bug 2239240

Change-Id: I49bbee4b74e8b0a51b6e6144818a7e9c08b1b5c2
2010-02-23 12:17:15 -08:00
Brett Chabot
4a5d9f1ba7 Replace runtest --cts option with more generic --suite option.
This will allow you to run a the set of test_defs with attribute suite="foo"
like this:
  runtest --suite foo

Bug 2401250
2010-02-19 09:42:17 -08:00
Nicolas Catania
13a2fcf30d Added gtest to the list. cd to /sdcard before running native tests.
Some test need to be run in a place where they can write on the disk.
I know we should stop using /sdcard but until I see the new document
explaining how the launcher can access the playground, we are going
 to keep it that way.
2010-02-10 22:40:47 -08:00
Brett Chabot
8424ffc02c Add support for generating coverage per test suite size to runtest. 2010-01-22 11:58:58 -08:00
Brett Chabot
59b4778dd6 Add runtest --path.
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
2009-10-26 12:22:46 -07:00
Brett Chabot
e00595bdbe Remove runtest dependency on current dir being build top.
This change is necessary to support relative path based args.
2009-10-21 20:01:31 -07:00
Brett Chabot
1cd6174130 Add support to run only tests in a given java package. 2009-10-21 17:00:58 -07:00
Brett Chabot
924c089879 Refactor runtest test_defs to allow programmatic creation.
Previously a test definition could only be created via xml.
Also fix some minor lint warnings.
2009-10-21 14:35:37 -07:00
Xia Wang
12ad9fb10e 1. Add .c extension to native_test.py so that native test in C can also be picked up by testrunner.
2. Add netkeystore_test into continuous test cycle.
2009-08-14 15:58:36 -07:00
Brett Chabot
bf7863ec27 runtest: Remove run_command -> android_build dependency.
This is desired because run_command is used by puppetmaster which should have
no dependency on android build system.
2009-06-29 17:44:52 -07:00
Brett Chabot
3ae5f8a399 Fix relative class path arg handling in runtest, and some lint errors. 2009-06-28 12:00:47 -07:00
Brett Chabot
764d3fa70d Add support for running host java tests to runtest.
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.
2009-06-26 14:31:52 -07:00