Test IncrediBuild with OpenVINO tests (#2534)
* Test IncrediBuild with OpenVINO tests
* Fix
* Remove --gtest_print_time=1
* Move Stop IncrediBuild
* Add analyze_gtest_log.py
* fix
* Fix
* Fix
* fix
* Fix
* Fix
* CPU FuncTests Analyze IB
* Fix
* Remove unused pipelines
* Revert "Remove unused pipelines"
This reverts commit d99cdcf597
.
* Update to master
* Exclude one test
* Enable test again
* Set testlevel 40 (was 128)
* Try gtest-parallel and /testlevel=24
* Fix issue
* Set /testlevel=8
* Set /testlevel=16
* Final fix
This commit is contained in:
parent
a5fce440e1
commit
eb775a3833
53
.ci/azure/analyze_gtest_log.py
Normal file
53
.ci/azure/analyze_gtest_log.py
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# Copyright (C) 2020 Intel Corporation
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
"""
|
||||||
|
Analyze GTest logs
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
from argparse import ArgumentParser
|
||||||
|
|
||||||
|
|
||||||
|
def get_passed_tests(log_file_path):
|
||||||
|
"""Gets passed tests with OK status"""
|
||||||
|
ok_test_line_pattern = "[ OK ] "
|
||||||
|
ok_tests = []
|
||||||
|
with open(log_file_path) as log_file_obj:
|
||||||
|
for line in log_file_obj.readlines():
|
||||||
|
if ok_test_line_pattern in line:
|
||||||
|
ok_tests.append(line.split(ok_test_line_pattern)[1])
|
||||||
|
return ok_tests
|
||||||
|
|
||||||
|
|
||||||
|
def get_total_time(tests):
|
||||||
|
"""Gets total execution time (sec)"""
|
||||||
|
re_compile_time = re.compile(r".+ \(([0-9]+) ms\)")
|
||||||
|
total_time = 0.0
|
||||||
|
for test in tests:
|
||||||
|
re_time = re_compile_time.match(test)
|
||||||
|
if re_time:
|
||||||
|
total_time += int(re_time.group(1)) / 1000
|
||||||
|
else:
|
||||||
|
print("No time in the test line:", test)
|
||||||
|
return total_time
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""The main entry point function"""
|
||||||
|
arg_parser = ArgumentParser()
|
||||||
|
arg_parser.add_argument(
|
||||||
|
"--log-file", metavar="PATH", default="gtest.log", help="Path to GTest log file"
|
||||||
|
)
|
||||||
|
args = arg_parser.parse_args()
|
||||||
|
|
||||||
|
passed_tests = get_passed_tests(args.log_file)
|
||||||
|
print("PASSED tests count:", len(passed_tests))
|
||||||
|
print("Total execution time of passed tests (sec):", get_total_time(passed_tests))
|
||||||
|
|
||||||
|
print("\nPASSED tests:")
|
||||||
|
print("".join(sorted(passed_tests)))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
@ -32,9 +32,11 @@ jobs:
|
|||||||
BIN_DIR: $(REPO_DIR)\bin\intel64
|
BIN_DIR: $(REPO_DIR)\bin\intel64
|
||||||
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||||
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
||||||
TEST_ENV_PATH: $(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.1\opencv\bin;%PATH%
|
|
||||||
INSTALL_DIR: $(WORK_DIR)\install_pkg
|
INSTALL_DIR: $(WORK_DIR)\install_pkg
|
||||||
SETUPVARS: $(INSTALL_DIR)\bin\setupvars.bat
|
SETUPVARS: $(INSTALL_DIR)\bin\setupvars.bat
|
||||||
|
IB_DIR: C:\Program Files (x86)\IncrediBuild
|
||||||
|
IB_TESTCONSOLE: $(IB_DIR)\IBTestConsole.exe
|
||||||
|
TEST_ENV_PATH: $(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.1\opencv\bin;$(IB_DIR);%PATH%
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
@ -56,6 +58,12 @@ jobs:
|
|||||||
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
||||||
displayName: 'Make dir'
|
displayName: 'Make dir'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
||||||
|
call install_ib_console.bat
|
||||||
|
workingDirectory: $(WORK_DIR)
|
||||||
|
displayName: 'Install IncrediBuild'
|
||||||
|
|
||||||
- checkout: self
|
- checkout: self
|
||||||
clean: true
|
clean: true
|
||||||
lfs: false
|
lfs: false
|
||||||
@ -80,12 +88,6 @@ jobs:
|
|||||||
workingDirectory: $(WORK_DIR)
|
workingDirectory: $(WORK_DIR)
|
||||||
displayName: 'Install dependencies'
|
displayName: 'Install dependencies'
|
||||||
|
|
||||||
- script: |
|
|
||||||
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
|
||||||
call install_ib_console.bat
|
|
||||||
workingDirectory: $(WORK_DIR)
|
|
||||||
displayName: 'Install IncrediBuild'
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||||
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
|
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
|
||||||
@ -94,7 +96,7 @@ jobs:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
set PATH=$(WORK_DIR)\ninja-win;%PATH%
|
||||||
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja" /MaxCPUS=40
|
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja"
|
||||||
workingDirectory: $(BUILD_DIR)
|
workingDirectory: $(BUILD_DIR)
|
||||||
displayName: 'Build Win'
|
displayName: 'Build Win'
|
||||||
|
|
||||||
@ -113,9 +115,8 @@ jobs:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(TEST_ENV_PATH)
|
set PATH=$(TEST_ENV_PATH)
|
||||||
$(BIN_DIR)\InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
|
"$(IB_TESTCONSOLE)" $(BIN_DIR)\InferenceEngineUnitTests.exe --gtest_output=xml:TEST-InferenceEngineUnitTests-IB.xml
|
||||||
displayName: 'IE UT old'
|
displayName: 'IE UT old - IB'
|
||||||
continueOnError: false
|
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(TEST_ENV_PATH)
|
set PATH=$(TEST_ENV_PATH)
|
||||||
@ -161,8 +162,8 @@ jobs:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(TEST_ENV_PATH)
|
set PATH=$(TEST_ENV_PATH)
|
||||||
$(BIN_DIR)\cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
|
"$(IB_TESTCONSOLE)" $(BIN_DIR)\cpuFuncTests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio* --gtest_output=xml:TEST-cpuFuncTests-IB.xml /testlevel=24
|
||||||
displayName: 'CPU FuncTests'
|
displayName: 'CPU FuncTests - IB'
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
@ -172,13 +173,13 @@ jobs:
|
|||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
|
||||||
# Add for gtest-parallel, it hangs now (CVS-33386)
|
# Add for gtest-parallel, it hangs now (CVS-33386)
|
||||||
#python $(BUILD_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
|
#python $(WORK_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(TEST_ENV_PATH)
|
set PATH=$(TEST_ENV_PATH)
|
||||||
set DATA_PATH=$(MODELS_PATH)
|
set DATA_PATH=$(MODELS_PATH)
|
||||||
set MODELS_PATH=$(MODELS_PATH)
|
set MODELS_PATH=$(MODELS_PATH)
|
||||||
$(BIN_DIR)\MklDnnFunctionalTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-MklDnnFunctionalTests.xml
|
"$(IB_TESTCONSOLE)" $(BIN_DIR)\MklDnnFunctionalTests.exe --gtest_filter=*smoke* --gtest_output=xml:TEST-MklDnnFunctionalTests-IB.xml
|
||||||
displayName: 'MklDnnFunctionalTests'
|
displayName: 'MklDnnFunctionalTests - IB'
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
Loading…
Reference in New Issue
Block a user