Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  coverage.sh

  Sprache: Shell
 

#!/bin/bash

# This script generates coverage for bionic.
#
# Prereqs: Coverage-enabled build.
#
#   $ lunch <target>
#   $ m NATIVE_COVERAGE_PATHS="bionic" CLANG_COVERAGE=true
#   $ m NATIVE_COVERAGE_PATHS="bionic" CLANG_COVERAGE=true bionic-unit-tests
#
# Do *NOT* then rebuild at the top level, or you'll clobber the
# coverage-enabled libc!
#
# Flash image and set $ANDROID_SERIAL.
#
# Usage: $ bionic/build/coverage.sh
# Output: HTML report is generated to /tmp/bionic-coverage/html/index.html
#

eval "$(cd ${ANDROID_BUILD_TOP}; build/soong/soong_ui.bash --dumpvars-mode --vars="TARGET_ARCH TARGET_ARCH_VARIANT")"

LLVM_PROFDATA=${ANDROID_BUILD_TOP}/prebuilts/clang/host/linux-x86/llvm-binutils-stable/llvm-profdata
LLVM_COV=${ANDROID_BUILD_TOP}/prebuilts/clang/host/linux-x86/llvm-binutils-stable/llvm-cov

DEVICE_TEST_DIR32=/data/local/tmp/bionic-coverage32
DEVICE_TEST_DIR64=/data/local/tmp/bionic-coverage64
DEVICE_PROF_DIR=/data/local/tmp/bionic-profraw
HOST_PROFDATA_DIR=/tmp/bionic-coverage

# Run bionic-unit-tests
adb shell rm -rf ${DEVICE_TEST_DIR32} ${DEVICE_TEST_DIR64} ${DEVICE_PROF_DIR}
adb shell mkdir ${DEVICE_TEST_DIR32} ${DEVICE_TEST_DIR64} ${DEVICE_PROF_DIR}
adb push $OUT/data/nativetest/bionic-loader-test-libs ${DEVICE_TEST_DIR32}
adb push $OUT/data/nativetest/bionic-unit-tests ${DEVICE_TEST_DIR32}
adb push $OUT/data/nativetest64/bionic-loader-test-libs ${DEVICE_TEST_DIR64}
adb push $OUT/data/nativetest64/bionic-unit-tests ${DEVICE_TEST_DIR64}
adb shell LLVM_PROFILE_FILE=${DEVICE_PROF_DIR}/bionic-%p-%m.profraw \
  LD_LIBRARY_PATH=${DEVICE_TEST_DIR32}/bionic-loader-test-libs \
  ${DEVICE_TEST_DIR32}/bionic-unit-tests/bionic-unit-tests
adb shell LLVM_PROFILE_FILE=${DEVICE_PROF_DIR}/bionic-%p-%m.profraw \
  LD_LIBRARY_PATH=${DEVICE_TEST_DIR64}/bionic-loader-test-libs \
  ${DEVICE_TEST_DIR64}/bionic-unit-tests/bionic-unit-tests

# Pull coverage files and post-process
rm -rf ${HOST_PROFDATA_DIR}
mkdir ${HOST_PROFDATA_DIR}
adb pull ${DEVICE_PROF_DIR} ${HOST_PROFDATA_DIR}/profraws

${LLVM_PROFDATA} merge \
  --output=${HOST_PROFDATA_DIR}/bionic.profdata \
  ${HOST_PROFDATA_DIR}/profraws/*.profraw

${LLVM_COV} show \
  --instr-profile=${HOST_PROFDATA_DIR}/bionic.profdata \
  --format=html \
  $OUT/symbols/apex/com.android.runtime/lib64/bionic/libc.so \
  --object=$OUT/symbols/apex/com.android.runtime/lib64/bionic/libm.so \
  --object=$OUT/symbols/data/nativetest64/bionic-unit-tests/bionic-unit-tests \
  --object=$OUT/symbols/apex/com.android.runtime/lib/bionic/libc.so \
  --object=$OUT/symbols/apex/com.android.runtime/lib/bionic/libm.so \
  --object=$OUT/symbols/data/nativetest/bionic-unit-tests/bionic-unit-tests \
  /proc/self/cwd/bionic/libc \
  /proc/self/cwd/bionic/libm \
  --output-dir=${HOST_PROFDATA_DIR}/html \
  --show-region-summary=false

Messung V0.5 in Prozent
C=93 H=97 G=94

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik