Skip to content

Commit

Permalink
/mnt/vss/_work/5/s/build_nnapi/Debug/coverage_rpt.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Jul 19, 2024
1 parent 6620a07 commit 32b440c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
8 changes: 3 additions & 5 deletions tools/ci_build/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ def adb_shell(*args, **kwargs):
adb_pull("/data/local/tmp/gcda_files.tar.gz", cwd)
os.chdir(cwd)
run_subprocess("tar -zxf gcda_files.tar.gz -C CMakeFiles".split(" "),cwd=cwd)
run_subprocess(f"find {source_dir} -name testcase_driver.cc.gcda".split(" "),cwd=cwd)
run_subprocess(f"find {source_dir} -name coverage_rpt.txt".split(" "),cwd=cwd)
cmd = ["gcovr", "-s", "-r"]
cmd.append(os.path.join(source_dir, "onnxruntime"))
cmd.extend([".", "-o"])
cmd.append(os.path.join(cwd, "coverage_rpt.txt"))
cwdCmakefiles=os.path.join(cwd, "CMakeFiles")
run_subprocess(f"ls -R {cwdCmakefiles}".split(" "),cwd=cwd)
run_subprocess(cmd, cwd=cwdCmakefiles)
cwd_cmakefiles=os.path.join(cwd, "CMakeFiles")
run_subprocess(f"ls -R {cwd_cmakefiles}".split(" "),cwd=cwd)
run_subprocess(cmd, cwd=cwd_cmakefiles)
run_subprocess(f"find {source_dir} -name coverage_rpt.txt".split(" "),cwd=cwd)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,26 +226,6 @@ stages:
--code_coverage
displayName: NNAPI EP, Build, Test, CodeCoverage on Android Emulator
- script: |
if command -v gcovr >/dev/null 2>&1; then
echo "gcovr is installed."
else
echo "gcovr is not installed. Installing gcovr from pip" && python3 -m pip install gcovr
fi
if command -v gcovr >/dev/null 2>&1; then
echo "gcovr is installed."
else
echo "gcovr is not installed. Installing gcovr from apt-get" && sudo apt-get update && sudo apt-get install -y gcovr
fi
if command -v gcovr >/dev/null 2>&1; then
echo "gcovr is installed."
else
echo "Error: gcovr is still not installed." && exit 1
fi
displayName: Check if gcovr is installed
- script: |
set -e -x && \
python3 tools/ci_build/coverage.py \
Expand All @@ -256,10 +236,6 @@ stages:
- script: cat '$(Build.SourcesDirectory)/build_nnapi/Debug/coverage_rpt.txt'
displayName: Print coverage report

- script: /bin/bash tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh $(pwd)
# Build Minimal ORT with NNAPI and reduced Ops, run unit tests on Android Emulator
displayName: Build Minimal ORT with NNAPI and run tests

- task: AzureCLI@2
displayName: 'Post Android Code Coverage To DashBoard'
inputs:
Expand All @@ -269,6 +245,10 @@ stages:
arguments: '"$(Build.SourcesDirectory)/build_nnapi/Debug/coverage_rpt.txt" "https://dev.azure.com/onnxruntime/onnxruntime/_build/results?buildId=$(Build.BuildId)" arm android nnapi'
workingDirectory: '$(Build.BinariesDirectory)'

- script: /bin/bash tools/ci_build/github/linux/ort_minimal/nnapi_minimal_build_minimal_ort_and_run_tests.sh $(pwd)
# Build Minimal ORT with NNAPI and reduced Ops, run unit tests on Android Emulator
displayName: Build Minimal ORT with NNAPI and run tests

- template: templates/use-android-emulator.yml
parameters:
stop: true
Expand Down

0 comments on commit 32b440c

Please sign in to comment.