Move unit_tests from test_pkg/tools to test_pkg/tests (#8548)
* add performance hint to time infer * move unit_tests to tests pkg * change unit_tests path in azure lin * change path to mo in bom test * fix tests_path * change mo dir path
This commit is contained in:
parent
4a1cfdc9ff
commit
925e24525a
@ -217,7 +217,7 @@ jobs:
|
|||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
export MO_ROOT=$(INSTALL_DIR)/tools/model_optimizer
|
export MO_ROOT=$(INSTALL_DIR)/tools/model_optimizer
|
||||||
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tools/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
|
. $(SETUPVARS) -pyver 3.8 && python3 -m pytest -s $(INSTALL_DIR)/tests/model_optimizer/unit_tests --junitxml=TEST-ModelOptimizer.xml
|
||||||
displayName: 'Model Optimizer UT'
|
displayName: 'Model Optimizer UT'
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
|
||||||
|
@ -46,17 +46,17 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
|
|||||||
)
|
)
|
||||||
|
|
||||||
install(FILES requirements_dev.txt
|
install(FILES requirements_dev.txt
|
||||||
DESTINATION tools/model_optimizer
|
DESTINATION tests/model_optimizer
|
||||||
COMPONENT tests
|
COMPONENT tests
|
||||||
EXCLUDE_FROM_ALL)
|
EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
install(DIRECTORY unit_tests
|
install(DIRECTORY unit_tests
|
||||||
DESTINATION tools/model_optimizer
|
DESTINATION tests/model_optimizer
|
||||||
COMPONENT tests
|
COMPONENT tests
|
||||||
EXCLUDE_FROM_ALL)
|
EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
install(DIRECTORY automation
|
install(DIRECTORY automation
|
||||||
DESTINATION tools/model_optimizer
|
DESTINATION tests/model_optimizer
|
||||||
COMPONENT tests
|
COMPONENT tests
|
||||||
EXCLUDE_FROM_ALL)
|
EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
@ -28,13 +28,15 @@ class TestBOMFile(unittest.TestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.existing_files = []
|
cls.existing_files = []
|
||||||
cur_path = os.path.join(os.path.realpath(__file__), os.pardir)
|
cur_path = os.path.join(os.path.realpath(__file__), os.pardir)
|
||||||
cls.output_dir = os.path.abspath(os.path.join(cur_path, os.pardir, os.pardir))
|
mo_path = os.path.abspath(os.path.join(cur_path, os.pardir, os.pardir))
|
||||||
with open(os.path.join(cls.output_dir, 'automation', 'package_BOM.txt'), 'r') as bom_file:
|
with open(os.path.join(mo_path, 'automation', 'package_BOM.txt'), 'r') as bom_file:
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
cls.existing_files = [name.rstrip().replace('/', '\\') for name in bom_file.readlines()]
|
cls.existing_files = [name.rstrip().replace('/', '\\') for name in bom_file.readlines()]
|
||||||
else:
|
else:
|
||||||
cls.existing_files = [name.rstrip() for name in bom_file.readlines()]
|
cls.existing_files = [name.rstrip() for name in bom_file.readlines()]
|
||||||
|
|
||||||
|
# output_dir is the model_optimizer directory that is located in 'pkg/tools'
|
||||||
|
cls.output_dir = mo_path.replace('tests', 'tools')
|
||||||
cls.expected_header = [re.compile(pattern) for pattern in [
|
cls.expected_header = [re.compile(pattern) for pattern in [
|
||||||
r'^# Copyright \([cC]\) [0-9\-]+ Intel Corporation$',
|
r'^# Copyright \([cC]\) [0-9\-]+ Intel Corporation$',
|
||||||
r'^# SPDX-License-Identifier: Apache-2.0$',
|
r'^# SPDX-License-Identifier: Apache-2.0$',
|
||||||
|
Loading…
Reference in New Issue
Block a user