Commit Graph

38 Commits

Author SHA1 Message Date
Brett Chabot
25dfd79b2e Fix runtest local.prop handling.
Change-Id: Iec8d942fc11d46bdd54f55485aedb4b0021afee3
2012-02-17 15:58:01 -08:00
Brian Muramatsu
95cbc9e1ec Fix runtest for CTS Tests
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
2012-01-10 12:06:12 -08:00
Brett Chabot
0e5c937ff7 Merge "Fix runtest build step." 2011-06-08 13:56:42 -07:00
Brett Chabot
546a3285ce Fix runtest build step.
Update make syntax to new 'mmm' logic.

Bug 4556556

Change-Id: Ie1fd5f6714ee7ef731b063751e0ddd674bc31021
2011-06-07 19:21:11 -07:00
Brett Chabot
cdfaae1a34 Make runtest reboot and root more robust.
Add a couple sleep statements to allow time for device to go offline.

Change-Id: I3a5fffc948f6c7b67bcdec4526990a6becd2d02f
2011-06-07 10:16:02 -07:00
Brett Chabot
3c9cefc70f Remove runtest hard dependency on test_defs.xml files.
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
2011-06-07 08:27:36 -07:00
Brett Chabot
b1eb5d2434 resolved conflicts for merge of fa6e5585 to master
Change-Id: I967289246c3472a30f4623581226cbc3054f0b56
2010-06-15 11:18:42 -07:00
Brett Chabot
ccae47d0c0 Workaround for package-private framework tests in runtest.
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
2010-06-14 15:24:42 -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
Brett Chabot
2e16fbc36b Fix grammar typo in runtest not-annotation help.
Change-Id: I5f5a81d16715f968ed9b265398d2a9e483c23a89
2010-02-23 12:28:27 -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
Brett Chabot
920e9fefab Make runtest more fault tolerant on test run failures.
Adjust so when running multiple suites, the whole run is not aborted on a
single suite failure.
2010-01-21 17:33:05 -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
2477b388ec Add workaround to runtest to build cts dependencies.
BUG 2141242
2009-09-24 13:23:50 -07:00
Brett Chabot
be659c08d2 Add build path info to runtest --list_tests
BUG 2133198
2009-09-21 19:26:12 -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
Brett Chabot
97d5c50730 Make runtest wait for instrumentation install before running test.
This attempts to address bug 1872940 where runtest will attempt to
run the test before all the new packages pushed via adb sync are
actually installed. This won't completely fix the bug in all cases,
but hopefully will help most situations.
2009-06-04 18:22:57 -07:00
Brett Chabot
49b77117fe Initial change to add cts tests to runtest.
Adds cts test definitions to the testrunner/test_defs.xml.
Adds support for runtest --cts arg, which will run all cts tests.
This temporarily relies on the addition of a 'cts' attribute to the test
definition - a new xml format may be defined later that changes how cts tests
are identified.

This change is based on previous unsubmitted CL
https://android-git.corp.google.com/g/Gerrit#change,1702. The only delta wrt
to that change is the use of InstrumentationCtsTestRunner.

Update: rebased to latest donut.
2009-06-02 11:46:46 -07:00
Brett Chabot
ae68f1a865 Add support for parsing code coverage file path to runtest and related cleanup.
This change is to adapt runtest to the InstrumentationTestRunner change which
dumps coverage data to the app's local data folder, instead of a fixed file on
the sdcard.

Also fixed adb_interace.StartInstrumentationForPackage, added better handling
when generating coverage for tests with unknown coverage targets, and reduced
the duplicate definitions of the "coverage_targets.xml" definition file.
2009-05-29 13:35:13 -07:00
Wei-Ta Chen
97752d4f80 Add a timeout flag to runtest for running native tests on devices. 2009-05-21 18:17:08 -07:00
Nicolas Catania
bcd93dc46a Made valgrind optional. Capture the target output.
Don't fail if valgrind (system version not the google3 one) is missing.
If the test fail, print the output of the test.
Added .pyc to the gitignore file.
2009-05-14 12:25:23 -07:00
Brett Chabot
292df41bb2 Add ability to specify relative class paths when using runtest -c
"runtest -c .<className>" will now be equivalent to
"runtest -c <package>.<className>", where package is the test-app's package as defined in test_defs.xml.
2009-05-07 11:09:40 -07:00
Brett Chabot
8a101cb057 runtest.py bug fixes.
Improved error handling, and added support for "size" and "package" arguments.
Removed deprecated runtest shell script.
2009-05-05 13:06:00 -07:00
Nicolas Catania
ff096c1b7b Broaden the search for native test files.
Previously we were looking for test files with this pattern: test_*
I added *_test.[cc|cpp] and *_unittest.[cc|cpp]

The search also scan all the subdirectories of the build_path from
the test definition.

I added a filtering stage where missing tests are ignored.
For instance we may have a source file that has not been built for
the target, in which case it is ignored when we run the target tests.

In android_build.py I added 4 helper functions to get access to the
build environment:
- GetHostBin
- GetProductOut
- GetTargetSystemBin
- GetHostOsArch

Replace all the hardcoded linux-x86 strings with the value returned
by GetHostOsArch.
2009-05-02 09:10:44 -07:00
Nicolas Catania
97b24c4d65 Added a method in run_command.py to run a host test.
The run can also happen under valgrind.

runtest.py: Search for host test as well. Run these under valgrind.
2009-04-22 11:08:32 -07:00
Niko Catania
fa14bd5728 Added single quotes around the shell command sent to the device.
Without the quotes, the shell split the command and the echo statement
gets dropped.
2009-04-09 16:50:54 -07:00
Brett Chabot
2b6643b596 AI 144980: Fix runtest --coverage.
Automated import of CL 144980
2009-04-07 18:35:27 -07:00
Niko Catania
a6dc2abe8d AI 144500: Added support for some extra make arguments for some testsuite.
For instance the libstdc++ testsuite requires BIONIC_TESTS=1 to
  actually build the tests.
  * development/testrunner/test_defs.py:
  Parse the new extra_make_args attribute.
  * development/testrunner/runtest.py:
  Added support for extra make arguments. Some testsuite requires this to actually be built.
  Changed the log statement to log what is actually being done.
  * development/testrunner/test_defs.xml:
  Added extra make argument to enable the libstdc++ tests.

Automated import of CL 144500
2009-04-03 14:12:46 -07:00
Niko Catania
2e990b97d3 AI 144340: Added support to run native tests on the device.
The tests name must start with 'test_'.
  Tests should return 0 on success, 1 on failure.
  * development/testrunner/test_defs.xml:
  Added new element to represent native tests.
  * development/testrunner/test_defs.py:
  Added handling of the new <test-native> element.
  The testsuite has new IsNative method.
  TestDefinition's iterator is ordered by test names.
  Added GetDescription() method to access the optional description.
  * development/testrunner/runtest.py:
  Print the description next to the test name if applicable
  (runtest_py -l)
  Added a _RunNativeTest method to run a test on the target, report
  the status and clean up the test after the run.
  Added
  BUG=1601432

Automated import of CL 144340
2009-04-02 16:52:26 -07:00
Brett Chabot
f61f43e16b AI 144262: am: CL 144260 Add constant for test file name in runtest.
Original author: brettchabot
  Merged from: //branches/cupcake/...

Automated import of CL 144262
2009-04-02 11:52:48 -07:00
Brett Chabot
2d85c0eb06 AI 143819: am: CL 143765 Rename tests.xml to test_defs.xml
Original author: brettchabot
  Merged from: //branches/cupcake/...

Automated import of CL 143819
2009-03-31 15:19:13 -07:00
Brett Chabot
72731f3420 AI 143688: am: CL 143562 Usability fixes for runtest.py
Original author: brettchabot
  Merged from: //branches/cupcake/...

Automated import of CL 143688
2009-03-31 11:14:05 -07:00
The Android Open Source Project
6ffae015b4 auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:43 -07:00