3 # coverage test data: ${ARCHIVE_PATH}/coverage-data.tar.gz
5 [[ "${BASH_SOURCE[0]}" != "${0}" ]] && echo "Please don't source ${BASH_SOURCE[0]}, execute it" && return
7 CURRENT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8 ROOT_PATH="$CURRENT_PATH/../../"
11 # - for xenial, use DOCKER_IMAGE_NAME="nnfw/one-devtools:xenial"
12 # - for bionic, use DOCKER_IMAGE_NAME="nnfw/one-devtools:bionic"
13 if [[ -z $DOCKER_IMAGE_NAME ]]; then
14 echo "It will use default docker image name"
17 NNAS_WORKSPACE=${NNAS_WORKSPACE:-build}
18 if [[ -z "${ARCHIVE_PATH}" ]]; then
19 ARCHIVE_PATH=${NNAS_WORKSPACE}/archive
24 pushd $ROOT_PATH > /dev/null
26 tar -zxf ${ARCHIVE_PATH}/coverage-data.tar.gz
28 CMD="GCOV_PATH=arm-linux-gnueabihf-gcov NNAS_WORKSPACE=Product ./nnas gen-coverage-report runtime compute &&
29 tar -zcf coverage/coverage_report.tar.gz coverage/html &&
30 python runtime/3rdparty/lcov-to-cobertura-xml/lcov_cobertura.py coverage/coverage.info -o coverage/nnfw_coverage.xml"
32 ./nnfw docker-run-user bash -c "$CMD"