aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2021-10-14 15:28:01 -0700
committerDan Albert <danalbert@google.com>2021-10-18 16:32:53 -0700
commit837b683b46f9f76b319cb3b10ef4ce49d3d89d6c (patch)
tree65a017b0ad997a045d4ea9081cad40161fc066f2
parentad60768bdfc4680edc07422693381ac152d74e37 (diff)
Update bionic coverage docs.
These docs refer to the old coverage workflow from the Android.mk build. AFAIK there's no way to get coverage for the host tests, so that part was removed. Test: followed the docs, got coverage data Bug: None Change-Id: Ibef5ae2d354296a77b752d3b7c9c48cf7a34ef98
-rw-r--r--README.md34
1 files changed, 3 insertions, 31 deletions
diff --git a/README.md b/README.md
index 388a13978..d96608e4f 100644
--- a/README.md
+++ b/README.md
@@ -271,39 +271,11 @@ the host's glibc.
$ ./tests/run-on-host.sh glibc
-
## Gathering test coverage
-For either host or target coverage, you must first:
-
- * `$ export NATIVE_COVERAGE=true`
- * Note that the build system is ignorant to this flag being toggled, i.e. if
- you change this flag, you will have to manually rebuild bionic.
- * Set `bionic_coverage=true` in `libc/Android.mk` and `libm/Android.mk`.
-
-### Coverage from device tests
-
- $ mma
- $ adb sync
- $ adb shell \
- GCOV_PREFIX=/data/local/tmp/gcov \
- GCOV_PREFIX_STRIP=`echo $ANDROID_BUILD_TOP | grep -o / | wc -l` \
- /data/nativetest/bionic-unit-tests/bionic-unit-tests
- $ acov
-
-`acov` will pull all coverage information from the device, push it to the right
-directories, run `lcov`, and open the coverage report in your browser.
-
-### Coverage from host tests
-
-First, build and run the host tests as usual (see above).
-
- $ croot
- $ lcov -c -d $ANDROID_PRODUCT_OUT -o coverage.info
- $ genhtml -o covreport coverage.info # or lcov --list coverage.info
-
-The coverage report is now available at `covreport/index.html`.
-
+To get test coverage for bionic, use `//bionic/build/coverage.sh`. Before
+running, follow the instructions at the top of the file to rebuild bionic with
+coverage instrumentation.
## Attaching GDB to the tests