Commit Graph

5 Commits

Author SHA1 Message Date
Jonathan Basseri
f6051de6f4 Support -c and -m for GTEST.
This takes the --test-class and --test-method options and builds a
--gtest_filter value to use when invoking native tests.

How it works:
ARGS to runtest                     ARG to GTEST
--test-class=    --test-method=     <none>
--test-class=Foo --test-method=     --gtest_filter=Foo.*
--test-class=    --test-method=Bar  --gtest_filter=*.Bar
--test-class=Foo --test-method=Bar  --gtest_filter=Foo.Bar

Advanced:
-m *Iptables* runs all test methods containing 'Iptables' in any class.
-c *ControllerTest runs all tests in any class ending with 'ControllerTest'.

Note that the '.' and '*' characters above are not shell globs. The '*'
are wildcards, and the '.' are literals.

Test: runtest -x system/netd/server/netd_unit_test.cpp -m '*Iptables*'
Test: runtest -x system/netd/server/netd_unit_test.cpp -c BandwidthControllerTest
Test: runtest -x system/netd/server/netd_unit_test.cpp -c BandwidthControllerTest -m '*Iptables*'
Change-Id: I967296da1bdcbc404f5ab91d24f9714eec7b475b
2017-09-15 19:03:26 -07:00
Igor Murashkin
f9cfbd39ae runtest: add an extra pattern for gtest file names (*Tests.[c|cpp])
Change-Id: Ia8070804110e8064f79a8063ed6aefc92d71bf7a
2014-01-24 16:03:11 -08:00
Brett Chabot
e607d3a8a4 Attempt to fix runtest for native tests.
Create dest dir before pushing
Use correct exec path data/nativetest/test/test

Change-Id: Ib2555c0e98ea5e13fdf6bf24697bd1b82d74b681
2013-05-16 23:06:25 -07: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
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