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
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