Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove tools/ci_build/github/android/run_nnapi_code_coverage.sh #21371

Merged
merged 26 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a75a3bf
check gcov
jchen351 Jul 16, 2024
9574da9
check gcov
jchen351 Jul 16, 2024
6093199
check gcov
jchen351 Jul 16, 2024
d56bfbc
check python for coverage
jchen351 Jul 16, 2024
a05dde0
check python for coverage
jchen351 Jul 16, 2024
2cd5fc8
adding verbose and debug the location of testcase_driver.cc.gcda
jchen351 Jul 17, 2024
e4a1036
adding verbose and debug the location of testcase_driver.cc.gcda
jchen351 Jul 17, 2024
496175a
- script: |
jchen351 Jul 17, 2024
586a004
- script: |
jchen351 Jul 17, 2024
0dedf8f
Installing gcovr from apt-get
jchen351 Jul 17, 2024
5c77a1a
if command -v gcovr >/dev/null 2>&1; then
jchen351 Jul 17, 2024
42c20a1
find coverage_rpt.txt
jchen351 Jul 17, 2024
6620a07
run_subprocess(f"ls -R {cwdCmakefiles}".split(" "),cwd=cwd)
jchen351 Jul 17, 2024
32b440c
/mnt/vss/_work/5/s/build_nnapi/Debug/coverage_rpt.txt
jchen351 Jul 19, 2024
35b175e
linintrunner
jchen351 Jul 19, 2024
cf262ce
python3 -m pip install gcovr
jchen351 Jul 19, 2024
c87c093
--gcov-ignore-errors=no_working_dir_found
jchen351 Jul 19, 2024
78ee913
tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-…
jchen351 Jul 22, 2024
0312793
Bring back the gcovr
jchen351 Jul 22, 2024
cbe95b1
Bring back the gcovr
jchen351 Jul 22, 2024
ca4090e
condition: not(always())
jchen351 Jul 22, 2024
1a2923a
changing gcovr to gcov
jchen351 Jul 25, 2024
c5fb27e
# cmd.append("--gcov-ignore-errors=no_working_dir_found")
jchen351 Jul 26, 2024
a842849
Merge branch 'refs/heads/main' into Cjian/ad2
jchen351 Jul 26, 2024
355a67f
tools/ci_build/coverage.py
jchen351 Jul 26, 2024
bd36e06
tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-…
jchen351 Jul 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tools/ci_build/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ def adb_shell(*args, **kwargs):
adb_shell("cd /data/local/tmp && tar -zcf gcda_files.tar.gz *.dir")
adb_pull("/data/local/tmp/gcda_files.tar.gz", cwd)
os.chdir(cwd)
run_subprocess("tar -zxf gcda_files.tar.gz -C CMakeFiles".split(" "))
run_subprocess("tar -zxf gcda_files.tar.gz -C CMakeFiles".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"))
run_subprocess(cmd, cwd=os.path.join(cwd, "CMakeFiles"))
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)



if __name__ == "__main__":
Expand Down
36 changes: 0 additions & 36 deletions tools/ci_build/github/android/run_nnapi_code_coverage.sh
jchen351 marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ stages:

- stage: BUILD_AND_TEST_NNAPI_EP
dependsOn: []
condition: notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
# condition: notIn(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
condition: not(always())
variables:
Codeql.ProjectConfigPath: .github/workflows
Codeql.Enabled: true
Expand Down Expand Up @@ -179,14 +180,14 @@ stages:
# because coverage report is hard to support in cross machines.
displayName: NNAPI MASTER BUILD&TEST
dependsOn: []
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
# condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
jobs:
- job: NNAPI_EP_MASTER
pool: onnxruntime-Ubuntu2204-AMD-CPU
timeoutInMinutes: 180
workspace:
clean: all
condition: in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI')
condition: always()
steps:
- task: UsePythonVersion@0
displayName: Use Python $(pythonVersion)
Expand Down Expand Up @@ -226,7 +227,7 @@ stages:
displayName: NNAPI EP, Build, Test, CodeCoverage on Android Emulator

- script: |
python3 -m pip install gcovr && \
set -e -x && \
python3 tools/ci_build/coverage.py \
--build_dir build_nnapi \
--android_sdk_path $ANDROID_HOME
Expand All @@ -235,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 @@ -248,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
Loading