Skip to content

Commit

Permalink
[IE TESTS] Fix parallel runner to run any test (openvinotoolkit#18787)
Browse files Browse the repository at this point in the history
* [IE TESTS] Fix parallel runner to run any test

* Fix run_conformance on Macos
  • Loading branch information
iefode authored Jul 26, 2023
1 parent 458125e commit 05247c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,18 @@ def __get_test_list_by_runtime(self):
with open(test_list_file_name) as test_list_file:
test_suite = ""
for test_name in test_list_file.read().split('\n'):
if "Running main() from" in test_name:
continue
if not ' ' in test_name:
test_suite = test_name
continue
pos = test_name.find('#')
if pos > 0:
real_test_name = test_suite + test_name[2:pos-2]
if pos > 0 or test_suite != "":
real_test_name = test_suite + (test_name[2:pos-2] if pos > 0 else test_name[2:])
if constants.DISABLED_PREFIX in real_test_name:
self._disabled_tests.append(real_test_name)
else:
test_list.append(f'"{self.__replace_restricted_symbols(real_test_name)}":')
else:
test_suite = test_name
test_list_file.close()
os.remove(test_list_file_name)
logger.info(f"Len test_list_runtime (without disabled tests): {len(test_list)}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
REF_COEF = "[ CONFORMANCE ] Influence coefficient: "

IS_WIN = "windows" in platform or "win32" in platform
IS_MACOS = "darwin" in platform

OS_SCRIPT_EXT = ".bat" if IS_WIN else ""
OS_BIN_FILE_EXT = ".exe" if IS_WIN else ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def unzip_archieve(zip_path: os.path, dst_path: os.path):
def find_latest_dir(in_dir: Path, pattern_list = list()):
get_latest_dir = lambda path: sorted(Path(path).iterdir(), key=os.path.getmtime)
entities = get_latest_dir(in_dir)
entities.reverse()
if not constants.IS_MACOS:
entities.reverse()

for entity in entities:
if entity.is_dir():
Expand Down

0 comments on commit 05247c9

Please sign in to comment.