diff --git a/tests/run_code_checks.sh b/tests/run_code_checks.sh deleted file mode 100755 index 395d3660bd9..00000000000 --- a/tests/run_code_checks.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -WORK_DIR=$(mktemp -d) -python3 -m venv "$WORK_DIR" -# shellcheck source=/dev/null -source "$WORK_DIR"/bin/activate -pip install pip --upgrade -pip install wheel -pip install ote_sdk/ -pip install ote_cli/ -pip install pre-commit -echo "" -echo "" -echo "" -echo " ##############################################" -echo " ######## ########" -echo " ######## ./tests/run_code_checks.sh ########" -echo " ######## ########" -echo " ##############################################" -echo "" -pre-commit run --all-files - diff --git a/tests/run_model_templates_tests.py b/tests/run_model_templates_tests.py deleted file mode 100644 index 4dfd18ce7ce..00000000000 --- a/tests/run_model_templates_tests.py +++ /dev/null @@ -1,81 +0,0 @@ -""" Runs tests selectively depending on changed files. """ - -import os -import sys -from subprocess import run - -from tests.test_suite.run_test_command import collect_env_vars - -ALGO_ROOT_DIR = "external" -ALGO_DIRS = [ - os.path.join(ALGO_ROOT_DIR, d) for d in os.listdir(ALGO_ROOT_DIR) if os.path.isdir(os.path.join(ALGO_ROOT_DIR, d)) -] -IMPORTANT_DIRS = [ - "ote_cli/", - "ote_sdk/", - "tests/", -] - -wd = sys.argv[1] - - -def what_to_test(): - """ - Returns a dict containing information whether it is needed - to run tests for particular algorithm. - """ - - print(f"{sys.argv=}") - run_algo_tests = {d: True for d in ALGO_DIRS} - if len(sys.argv) > 2: - run_algo_tests = {d: False for d in ALGO_DIRS} - changed_files = sys.argv[2:] - print(f"{changed_files=}") - - for changed_file in changed_files: - if any(changed_file.startswith(d) for d in IMPORTANT_DIRS): - run_algo_tests = {d: True for d in ALGO_DIRS} - break - - for d in ALGO_DIRS: - if changed_file.startswith(d): - run_algo_tests[d] = True - - for k, v in run_algo_tests.items(): - print("run", k, v) - - return run_algo_tests - - -def test(run_algo_tests): - """ - Runs tests for algorithms and other stuff (misc). - """ - - passed = {} - success = True - command = ["pytest", os.path.join("tests", "ote_cli", "misc"), "-v"] - try: - res = run(command, env=collect_env_vars(wd), check=True).returncode == 0 - except: # noqa: E722 - res = False - passed["misc"] = res - success *= res - for algo_dir in ALGO_DIRS: - if run_algo_tests[algo_dir]: - command = ["pytest", os.path.join(algo_dir, "tests", "ote_cli"), "-v", "-rxXs", "--durations=10"] - try: - res = run(command, env=collect_env_vars(wd), check=True).returncode == 0 - except: # noqa: E722 - res = False - passed[algo_dir] = res - success *= res - - for k, v in passed.items(): - res = "PASSED" if v else "FAILED" - print(f"Tests for {k} {res}") - - sys.exit(1 - success) - - -test(what_to_test()) diff --git a/tests/run_model_templates_tests.sh b/tests/run_model_templates_tests.sh deleted file mode 100755 index 1569c6305c9..00000000000 --- a/tests/run_model_templates_tests.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -python3 -m venv venv || exit 1 -# shellcheck source=/dev/null -. venv/bin/activate || exit 1 -pip install --upgrade pip || exit 1 -pip install -e ote_cli || exit 1 -pip install -e ote_sdk || exit 1 - -python tests/run_model_templates_tests.py "$(pwd)" "$@" || exit 1