mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-03 03:58:54 +00:00
[Fix] No test result report while not using ctest (#15976)
### Description
1. Set gtest output while ctest is set to empty.
2. onnx_src in _deps shouldn't be removed because
onnx_test_pytorch_converted and onnx_test_pytorch_converted need to read
data from onnx/backend/test/data/..
### Motivation and Context
Test result report is important to find the flaky tests.
### To do
Tests are not inconsistent.
If ctest_path is empty, onnx_test_pytorch_converted and
onnx_test_pytorch_converted will not be executed, if it's not,
onnxruntime_mlas_test will not be executed.
270c09a37f/tools/ci_build/build.py (L1743-L1753)
This commit is contained in:
parent
2881d849d4
commit
6d43d51eb0
2 changed files with 4 additions and 4 deletions
|
|
@ -1748,8 +1748,8 @@ def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs):
|
|||
executables.append("onnxruntime_api_tests_without_env")
|
||||
executables.append("onnxruntime_customopregistration_test")
|
||||
for exe in executables:
|
||||
run_subprocess([os.path.join(cwd, exe)], cwd=cwd, dll_path=dll_path)
|
||||
|
||||
test_output = f"--gtest_output=xml:{cwd}/{exe}.{config}.results.xml"
|
||||
run_subprocess([os.path.join(cwd, exe), test_output], cwd=cwd, dll_path=dll_path)
|
||||
else:
|
||||
ctest_cmd = [ctest_path, "--build-config", config, "--verbose", "--timeout", args.test_all_timeout]
|
||||
run_subprocess(ctest_cmd, cwd=cwd, dll_path=dll_path)
|
||||
|
|
|
|||
|
|
@ -88,9 +88,9 @@ jobs:
|
|||
- task: CmdLine@2
|
||||
inputs:
|
||||
script: |
|
||||
rm -rf $(Build.BinariesDirectory)/Release/onnxruntime $(Build.BinariesDirectory)/Release/pybind11 $(Build.BinariesDirectory)/Release/_deps
|
||||
rm -rf $(Build.BinariesDirectory)/Release/onnxruntime $(Build.BinariesDirectory)/Release/pybind11
|
||||
rm -f $(Build.BinariesDirectory)/Release/models
|
||||
rm -rf $(Build.BinariesDirectory)/Release/_deps
|
||||
find $(Build.BinariesDirectory)/Release/_deps -mindepth 1 ! -regex '^$(Build.BinariesDirectory)/Release/_deps/onnx-src\(/.*\)?' -delete
|
||||
cd $(Build.BinariesDirectory)/Release
|
||||
find -executable -type f > $(Build.BinariesDirectory)/Release/perms.txt
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue