diff --git a/tools/build.py b/tools/build.py index f61bbfc9e7..8ae18c042d 100755 --- a/tools/build.py +++ b/tools/build.py @@ -27,14 +27,14 @@ ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) -from workspace_tools.toolchains import TOOLCHAINS -from workspace_tools.targets import TARGET_NAMES, TARGET_MAP -from workspace_tools.options import get_default_options_parser -from workspace_tools.build_api import build_mbed_libs, build_lib -from workspace_tools.build_api import mcu_toolchain_matrix -from workspace_tools.build_api import static_analysis_scan, static_analysis_scan_lib, static_analysis_scan_library -from workspace_tools.build_api import print_build_results -from workspace_tools.settings import CPPCHECK_CMD, CPPCHECK_MSG_FORMAT +from tools.toolchains import TOOLCHAINS +from tools.targets import TARGET_NAMES, TARGET_MAP +from tools.options import get_default_options_parser +from tools.build_api import build_mbed_libs, build_lib +from tools.build_api import mcu_toolchain_matrix +from tools.build_api import static_analysis_scan, static_analysis_scan_lib, static_analysis_scan_library +from tools.build_api import print_build_results +from tools.settings import CPPCHECK_CMD, CPPCHECK_MSG_FORMAT if __name__ == '__main__': start = time() diff --git a/tools/build_api.py b/tools/build_api.py index 3dca0adbae..6a19eb0483 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -25,11 +25,11 @@ from shutil import rmtree from os.path import join, exists, basename from time import time -from workspace_tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException -from workspace_tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON -from workspace_tools.targets import TARGET_NAMES, TARGET_MAP -from workspace_tools.libraries import Library -from workspace_tools.toolchains import TOOLCHAIN_CLASSES +from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException +from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON +from tools.targets import TARGET_NAMES, TARGET_MAP +from tools.libraries import Library +from tools.toolchains import TOOLCHAIN_CLASSES from jinja2 import FileSystemLoader from jinja2.environment import Environment diff --git a/tools/build_release.py b/tools/build_release.py index 33d724357a..0e1b2e700e 100644 --- a/tools/build_release.py +++ b/tools/build_release.py @@ -25,14 +25,14 @@ import json ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) -from workspace_tools.build_api import build_mbed_libs -from workspace_tools.build_api import write_build_report -from workspace_tools.targets import TARGET_MAP -from workspace_tools.test_exporters import ReportExporter, ResultExporterType -from workspace_tools.test_api import SingleTestRunner -from workspace_tools.test_api import singletest_in_cli_mode -from workspace_tools.paths import TEST_DIR -from workspace_tools.tests import TEST_MAP +from tools.build_api import build_mbed_libs +from tools.build_api import write_build_report +from tools.targets import TARGET_MAP +from tools.test_exporters import ReportExporter, ResultExporterType +from tools.test_api import SingleTestRunner +from tools.test_api import singletest_in_cli_mode +from tools.paths import TEST_DIR +from tools.tests import TEST_MAP OFFICIAL_MBED_LIBRARY_BUILD = ( ('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')), diff --git a/tools/build_travis.py b/tools/build_travis.py index a80f3ea49f..d7f6ae619d 100644 --- a/tools/build_travis.py +++ b/tools/build_travis.py @@ -137,7 +137,7 @@ def run_builds(dry_run): toolchain_list = build["toolchains"] if type(toolchain_list) != type([]): toolchain_list = [toolchain_list] for toolchain in toolchain_list: - cmdline = "python workspace_tools/build.py -m %s -t %s -j 4 -c --silent "% (build["target"], toolchain) + cmdline = "python tools/build.py -m %s -t %s -j 4 -c --silent "% (build["target"], toolchain) libs = build.get("libs", []) if libs: cmdline = cmdline + " ".join(["--" + l for l in libs]) @@ -161,14 +161,14 @@ def run_test_linking(dry_run): for test_lib in tests: test_names = tests[test_lib] test_lib_switch = "--" + test_lib if test_lib else "" - cmdline = "python workspace_tools/make.py -m %s -t %s -c --silent %s -n %s " % (link["target"], toolchain, test_lib_switch, ",".join(test_names)) + cmdline = "python tools/make.py -m %s -t %s -c --silent %s -n %s " % (link["target"], toolchain, test_lib_switch, ",".join(test_names)) print "Executing: " + cmdline if not dry_run: if os.system(cmdline) != 0: sys.exit(1) def run_test_testsuite(dry_run): - cmdline = "python workspace_tools/singletest.py --version" + cmdline = "python tools/singletest.py --version" print "Executing: " + cmdline if not dry_run: if os.system(cmdline) != 0: diff --git a/tools/data/support.py b/tools/data/support.py index b47380f4d9..7af37746f7 100644 --- a/tools/data/support.py +++ b/tools/data/support.py @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -from workspace_tools.targets import TARGETS +from tools.targets import TARGETS DEFAULT_SUPPORT = {} CORTEX_ARM_SUPPORT = {} diff --git a/tools/dev/rpc_classes.py b/tools/dev/rpc_classes.py index f082f3b9da..46fd902b2f 100644 --- a/tools/dev/rpc_classes.py +++ b/tools/dev/rpc_classes.py @@ -17,7 +17,7 @@ limitations under the License. from os.path import join from jinja2 import Template -from workspace_tools.paths import TOOLS_DATA, MBED_RPC +from tools.paths import TOOLS_DATA, MBED_RPC RPC_TEMPLATES_PATH = join(TOOLS_DATA, "rpc") diff --git a/tools/export/__init__.py b/tools/export/__init__.py index dd2d0756f5..efd50d5186 100755 --- a/tools/export/__init__.py +++ b/tools/export/__init__.py @@ -19,10 +19,10 @@ from os.path import join, exists, basename from shutil import copytree, rmtree, copy import yaml -from workspace_tools.utils import mkdir -from workspace_tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32 -from workspace_tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException -from workspace_tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP +from tools.utils import mkdir +from tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32 +from tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException +from tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP from project_generator_definitions.definitions import ProGenDef diff --git a/tools/export/emblocks.py b/tools/export/emblocks.py index 88a14d3354..d964b3dc96 100644 --- a/tools/export/emblocks.py +++ b/tools/export/emblocks.py @@ -16,7 +16,7 @@ limitations under the License. """ from exporters import Exporter from os.path import splitext, basename -from workspace_tools.targets import TARGETS +from tools.targets import TARGETS # filter all the GCC_ARM targets out of the target list gccTargets = [] diff --git a/tools/export/exporters.py b/tools/export/exporters.py index da49230ff8..e03288f87c 100644 --- a/tools/export/exporters.py +++ b/tools/export/exporters.py @@ -8,9 +8,9 @@ from jinja2.environment import Environment from contextlib import closing from zipfile import ZipFile, ZIP_DEFLATED -from workspace_tools.utils import mkdir -from workspace_tools.toolchains import TOOLCHAIN_CLASSES -from workspace_tools.targets import TARGET_MAP +from tools.utils import mkdir +from tools.toolchains import TOOLCHAIN_CLASSES +from tools.targets import TARGET_MAP from project_generator.generate import Generator from project_generator.project import Project diff --git a/tools/export/iar.py b/tools/export/iar.py index 3ba8e64b0c..e04368878e 100644 --- a/tools/export/iar.py +++ b/tools/export/iar.py @@ -18,8 +18,8 @@ import re import os from project_generator_definitions.definitions import ProGenDef -from workspace_tools.export.exporters import Exporter -from workspace_tools.targets import TARGET_MAP, TARGET_NAMES +from tools.export.exporters import Exporter +from tools.targets import TARGET_MAP, TARGET_NAMES # If you wish to add a new target, add it to project_generator_definitions, and then # define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``) diff --git a/tools/export/sw4stm32.py b/tools/export/sw4stm32.py index c062e12577..70e1087313 100644 --- a/tools/export/sw4stm32.py +++ b/tools/export/sw4stm32.py @@ -17,7 +17,7 @@ limitations under the License. from exporters import Exporter from os.path import splitext, basename, join from random import randint -from workspace_tools.utils import mkdir +from tools.utils import mkdir class Sw4STM32(Exporter): diff --git a/tools/export/uvision4.py b/tools/export/uvision4.py index 619edfbece..85b4337ffa 100644 --- a/tools/export/uvision4.py +++ b/tools/export/uvision4.py @@ -17,8 +17,8 @@ limitations under the License. from os.path import basename, join, dirname from project_generator_definitions.definitions import ProGenDef -from workspace_tools.export.exporters import Exporter -from workspace_tools.targets import TARGET_MAP, TARGET_NAMES +from tools.export.exporters import Exporter +from tools.targets import TARGET_MAP, TARGET_NAMES # If you wish to add a new target, add it to project_generator_definitions, and then # define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``) diff --git a/tools/export_test.py b/tools/export_test.py index 32b1cd6b4e..2787269604 100644 --- a/tools/export_test.py +++ b/tools/export_test.py @@ -22,9 +22,9 @@ sys.path.insert(0, ROOT) from shutil import move -from workspace_tools.paths import * -from workspace_tools.utils import mkdir, cmd -from workspace_tools.export import export, setup_user_prj +from tools.paths import * +from tools.utils import mkdir, cmd +from tools.export import export, setup_user_prj USR_PRJ_NAME = "usr_prj" diff --git a/tools/host_tests/host_test.py b/tools/host_tests/host_test.py index 103df83924..fe611cb145 100644 --- a/tools/host_tests/host_test.py +++ b/tools/host_tests/host_test.py @@ -35,8 +35,8 @@ import host_tests_plugins # we can find packages we want from the same level as other files do import sys sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) -from workspace_tools.test_api import get_autodetected_MUTS_list -from workspace_tools.test_api import get_module_avail +from tools.test_api import get_autodetected_MUTS_list +from tools.test_api import get_module_avail class Mbed: @@ -313,7 +313,7 @@ class HostTestResults: self.RESULT_MBED_ASSERT = "mbed_assert" -import workspace_tools.host_tests as host_tests +import tools.host_tests as host_tests class Test(HostTestResults): diff --git a/tools/host_tests/host_tests_plugins/module_copy_smart.py b/tools/host_tests/host_tests_plugins/module_copy_smart.py index 9fb5970d46..1af9eaf70a 100644 --- a/tools/host_tests/host_tests_plugins/module_copy_smart.py +++ b/tools/host_tests/host_tests_plugins/module_copy_smart.py @@ -22,7 +22,7 @@ from time import sleep from host_test_plugins import HostTestPluginBase sys.path.append(abspath(join(dirname(__file__), "../../../"))) -from workspace_tools.test_api import get_autodetected_MUTS_list +from tools.test_api import get_autodetected_MUTS_list class HostTestPluginCopyMethod_Smart(HostTestPluginBase): diff --git a/tools/host_tests/tcpecho_server_loop.py b/tools/host_tests/tcpecho_server_loop.py index df483974aa..be95f1319a 100644 --- a/tools/host_tests/tcpecho_server_loop.py +++ b/tools/host_tests/tcpecho_server_loop.py @@ -20,7 +20,7 @@ from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__), "..", "..")) sys.path.insert(0, ROOT) -from workspace_tools.private_settings import LOCALHOST +from tools.private_settings import LOCALHOST from SocketServer import BaseRequestHandler, TCPServer diff --git a/tools/libraries.py b/tools/libraries.py index c4db6c8e79..a6d2c0b165 100644 --- a/tools/libraries.py +++ b/tools/libraries.py @@ -14,9 +14,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -from workspace_tools.paths import * -from workspace_tools.data.support import * -from workspace_tools.tests import TEST_MBED_LIB +from tools.paths import * +from tools.data.support import * +from tools.tests import TEST_MBED_LIB LIBRARIES = [ diff --git a/tools/make.py b/tools/make.py index e4ade4cbbf..adfd82bf39 100755 --- a/tools/make.py +++ b/tools/make.py @@ -27,22 +27,22 @@ from os.path import join, abspath, dirname ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) -from workspace_tools.utils import args_error -from workspace_tools.paths import BUILD_DIR -from workspace_tools.paths import RTOS_LIBRARIES -from workspace_tools.paths import RPC_LIBRARY -from workspace_tools.paths import ETH_LIBRARY -from workspace_tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES -from workspace_tools.paths import DSP_LIBRARIES -from workspace_tools.paths import FS_LIBRARY -from workspace_tools.paths import UBLOX_LIBRARY -from workspace_tools.tests import TESTS, Test, TEST_MAP -from workspace_tools.tests import TEST_MBED_LIB -from workspace_tools.targets import TARGET_MAP -from workspace_tools.options import get_default_options_parser -from workspace_tools.build_api import build_project +from tools.utils import args_error +from tools.paths import BUILD_DIR +from tools.paths import RTOS_LIBRARIES +from tools.paths import RPC_LIBRARY +from tools.paths import ETH_LIBRARY +from tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES +from tools.paths import DSP_LIBRARIES +from tools.paths import FS_LIBRARY +from tools.paths import UBLOX_LIBRARY +from tools.tests import TESTS, Test, TEST_MAP +from tools.tests import TEST_MBED_LIB +from tools.targets import TARGET_MAP +from tools.options import get_default_options_parser +from tools.build_api import build_project try: - import workspace_tools.private_settings as ps + import tools.private_settings as ps except: ps = object() diff --git a/tools/options.py b/tools/options.py index 3e4d2e859c..cf146c47bd 100644 --- a/tools/options.py +++ b/tools/options.py @@ -15,8 +15,8 @@ See the License for the specific language governing permissions and limitations under the License. """ from optparse import OptionParser -from workspace_tools.toolchains import TOOLCHAINS -from workspace_tools.targets import TARGET_NAMES +from tools.toolchains import TOOLCHAINS +from tools.targets import TARGET_NAMES def get_default_options_parser(): diff --git a/tools/paths.py b/tools/paths.py index ec9741a38d..c63ce506e5 100644 --- a/tools/paths.py +++ b/tools/paths.py @@ -26,7 +26,7 @@ BUILD_DIR = getenv("MBED_BUILD_DIR") or BUILD_DIR # Embedded Libraries Sources LIB_DIR = join(ROOT, "libraries") -TOOLS = join(ROOT, "workspace_tools") +TOOLS = join(ROOT, "tools") TOOLS_DATA = join(TOOLS, "data") TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders") @@ -42,7 +42,7 @@ MBED_LIBRARIES = join(BUILD_DIR, "mbed") # Tests TEST_DIR = join(LIB_DIR, "tests") -HOST_TESTS = join(ROOT, "workspace_tools", "host_tests") +HOST_TESTS = join(ROOT, "tools", "host_tests") # mbed RPC MBED_RPC = join(LIB_DIR, "rpc") diff --git a/tools/project.py b/tools/project.py index 7bf165b0bd..cf90021515 100644 --- a/tools/project.py +++ b/tools/project.py @@ -6,16 +6,16 @@ sys.path.insert(0, ROOT) from shutil import move, rmtree from optparse import OptionParser -from workspace_tools.paths import EXPORT_DIR, EXPORT_WORKSPACE, EXPORT_TMP -from workspace_tools.paths import MBED_BASE, MBED_LIBRARIES -from workspace_tools.export import export, setup_user_prj, EXPORTERS, mcu_ide_matrix -from workspace_tools.utils import args_error -from workspace_tools.tests import TESTS, Test, TEST_MAP -from workspace_tools.targets import TARGET_NAMES -from workspace_tools.libraries import LIBRARIES +from tools.paths import EXPORT_DIR, EXPORT_WORKSPACE, EXPORT_TMP +from tools.paths import MBED_BASE, MBED_LIBRARIES +from tools.export import export, setup_user_prj, EXPORTERS, mcu_ide_matrix +from tools.utils import args_error +from tools.tests import TESTS, Test, TEST_MAP +from tools.targets import TARGET_NAMES +from tools.libraries import LIBRARIES try: - import workspace_tools.private_settings as ps + import tools.private_settings as ps except: ps = object() @@ -75,7 +75,7 @@ if __name__ == '__main__': action="store_true", dest="supported_ides_html", default=False, - help="writes workspace_tools/export/README.md") + help="writes tools/export/README.md") (options, args) = parser.parse_args() diff --git a/tools/settings.py b/tools/settings.py index ef4ef034c0..f94e1cb9fb 100644 --- a/tools/settings.py +++ b/tools/settings.py @@ -99,6 +99,6 @@ MUTs = { try: # Allow to overwrite the default settings without the need to edit the # settings file stored in the repository - from workspace_tools.private_settings import * + from mbed_settings import * except ImportError: - print '[WARNING] Using default settings. Define your settings in the file "workspace_tools/private_settings.py" or in "./mbed_settings.py"' + print '[WARNING] Using default settings. Define your settings in the file "./mbed_settings.py"' diff --git a/tools/singletest.py b/tools/singletest.py index 6b5054baca..058b96d4d1 100644 --- a/tools/singletest.py +++ b/tools/singletest.py @@ -56,32 +56,32 @@ sys.path.insert(0, ROOT) # Check: Extra modules which are required by core test suite -from workspace_tools.utils import check_required_modules +from tools.utils import check_required_modules check_required_modules(['prettytable', 'serial']) # Imports related to mbed build api -from workspace_tools.build_api import mcu_toolchain_matrix +from tools.build_api import mcu_toolchain_matrix # Imports from TEST API -from workspace_tools.test_api import SingleTestRunner -from workspace_tools.test_api import singletest_in_cli_mode -from workspace_tools.test_api import detect_database_verbose -from workspace_tools.test_api import get_json_data_from_file -from workspace_tools.test_api import get_avail_tests_summary_table -from workspace_tools.test_api import get_default_test_options_parser -from workspace_tools.test_api import print_muts_configuration_from_json -from workspace_tools.test_api import print_test_configuration_from_json -from workspace_tools.test_api import get_autodetected_MUTS_list -from workspace_tools.test_api import get_autodetected_TEST_SPEC -from workspace_tools.test_api import get_module_avail -from workspace_tools.test_exporters import ReportExporter, ResultExporterType +from tools.test_api import SingleTestRunner +from tools.test_api import singletest_in_cli_mode +from tools.test_api import detect_database_verbose +from tools.test_api import get_json_data_from_file +from tools.test_api import get_avail_tests_summary_table +from tools.test_api import get_default_test_options_parser +from tools.test_api import print_muts_configuration_from_json +from tools.test_api import print_test_configuration_from_json +from tools.test_api import get_autodetected_MUTS_list +from tools.test_api import get_autodetected_TEST_SPEC +from tools.test_api import get_module_avail +from tools.test_exporters import ReportExporter, ResultExporterType # Importing extra modules which can be not installed but if available they can extend test suite functionality try: import mbed_lstools - from workspace_tools.compliance.ioper_runner import IOperTestRunner - from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes + from tools.compliance.ioper_runner import IOperTestRunner + from tools.compliance.ioper_runner import get_available_oper_test_scopes except: pass diff --git a/tools/size.py b/tools/size.py index 48ed5366be..0e19ae395e 100644 --- a/tools/size.py +++ b/tools/size.py @@ -23,10 +23,10 @@ from collections import defaultdict ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) -from workspace_tools.paths import BUILD_DIR, TOOLS_DATA -from workspace_tools.settings import GCC_ARM_PATH -from workspace_tools.tests import TEST_MAP -from workspace_tools.build_api import build_mbed_libs, build_project +from tools.paths import BUILD_DIR, TOOLS_DATA +from tools.settings import GCC_ARM_PATH +from tools.tests import TEST_MAP +from tools.build_api import build_mbed_libs, build_project SIZE = join(GCC_ARM_PATH, 'arm-none-eabi-size') diff --git a/tools/synch.py b/tools/synch.py index fa6ee5f2f9..bfe21b2aae 100644 --- a/tools/synch.py +++ b/tools/synch.py @@ -31,9 +31,9 @@ import string ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) -from workspace_tools.settings import MBED_ORG_PATH, MBED_ORG_USER, BUILD_DIR -from workspace_tools.paths import LIB_DIR -from workspace_tools.utils import run_cmd +from tools.settings import MBED_ORG_PATH, MBED_ORG_USER, BUILD_DIR +from tools.paths import LIB_DIR +from tools.utils import run_cmd MBED_URL = "mbed.org" MBED_USER = "mbed_official" diff --git a/tools/targets.py b/tools/targets.py index 97b64abd02..79723a6d40 100755 --- a/tools/targets.py +++ b/tools/targets.py @@ -32,7 +32,7 @@ import os import binascii import struct import shutil -from workspace_tools.patch import patch +from tools.patch import patch from paths import TOOLS_BOOTLOADERS class Target: diff --git a/tools/test_api.py b/tools/test_api.py index d80c0c3f07..4df448e7aa 100644 --- a/tools/test_api.py +++ b/tools/test_api.py @@ -39,31 +39,31 @@ from threading import Thread, Lock from subprocess import Popen, PIPE # Imports related to mbed build api -from workspace_tools.tests import TESTS -from workspace_tools.tests import TEST_MAP -from workspace_tools.paths import BUILD_DIR -from workspace_tools.paths import HOST_TESTS -from workspace_tools.utils import ToolException -from workspace_tools.utils import NotSupportedException -from workspace_tools.utils import construct_enum -from workspace_tools.targets import TARGET_MAP -from workspace_tools.test_db import BaseDBAccess -from workspace_tools.build_api import build_project, build_mbed_libs, build_lib -from workspace_tools.build_api import get_target_supported_toolchains -from workspace_tools.build_api import write_build_report -from workspace_tools.build_api import prep_report -from workspace_tools.build_api import prep_properties -from workspace_tools.build_api import create_result -from workspace_tools.build_api import add_result_to_report -from workspace_tools.libraries import LIBRARIES, LIBRARY_MAP -from workspace_tools.toolchains import TOOLCHAIN_BIN_PATH -from workspace_tools.test_exporters import ReportExporter, ResultExporterType +from tools.tests import TESTS +from tools.tests import TEST_MAP +from tools.paths import BUILD_DIR +from tools.paths import HOST_TESTS +from tools.utils import ToolException +from tools.utils import NotSupportedException +from tools.utils import construct_enum +from tools.targets import TARGET_MAP +from tools.test_db import BaseDBAccess +from tools.build_api import build_project, build_mbed_libs, build_lib +from tools.build_api import get_target_supported_toolchains +from tools.build_api import write_build_report +from tools.build_api import prep_report +from tools.build_api import prep_properties +from tools.build_api import create_result +from tools.build_api import add_result_to_report +from tools.libraries import LIBRARIES, LIBRARY_MAP +from tools.toolchains import TOOLCHAIN_BIN_PATH +from tools.test_exporters import ReportExporter, ResultExporterType -import workspace_tools.host_tests.host_tests_plugins as host_tests_plugins +import tools.host_tests.host_tests_plugins as host_tests_plugins try: import mbed_lstools - from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes + from tools.compliance.ioper_runner import get_available_oper_test_scopes except: pass @@ -1592,7 +1592,7 @@ def factory_db_logger(db_url): """ Factory database driver depending on database type supplied in database connection string db_url """ if db_url is not None: - from workspace_tools.test_mysql import MySQLDBAccess + from tools.test_mysql import MySQLDBAccess connection_info = BaseDBAccess().parse_db_connection_string(db_url) if connection_info is not None: (db_type, username, password, host, db_name) = BaseDBAccess().parse_db_connection_string(db_url) diff --git a/tools/test_exporters.py b/tools/test_exporters.py index 623acd6f4d..16c5e47409 100644 --- a/tools/test_exporters.py +++ b/tools/test_exporters.py @@ -17,7 +17,7 @@ limitations under the License. Author: Przemyslaw Wirkus """ -from workspace_tools.utils import construct_enum +from tools.utils import construct_enum ResultExporterType = construct_enum(HTML='Html_Exporter', diff --git a/tools/test_mysql.py b/tools/test_mysql.py index 1561dab32f..4f00ab6dd9 100644 --- a/tools/test_mysql.py +++ b/tools/test_mysql.py @@ -21,7 +21,7 @@ import re import MySQLdb as mdb # Imports from TEST API -from workspace_tools.test_db import BaseDBAccess +from tools.test_db import BaseDBAccess class MySQLDBAccess(BaseDBAccess): diff --git a/tools/test_webapi.py b/tools/test_webapi.py index 59273e80d2..ffed0e4624 100644 --- a/tools/test_webapi.py +++ b/tools/test_webapi.py @@ -28,8 +28,8 @@ ROOT = abspath(join(dirname(__file__), "..")) sys.path.insert(0, ROOT) # Imports related to mbed build api -from workspace_tools.utils import construct_enum -from workspace_tools.build_api import mcu_toolchain_matrix +from tools.utils import construct_enum +from tools.build_api import mcu_toolchain_matrix # Imports from TEST API from test_api import SingleTestRunner diff --git a/tools/tests.py b/tools/tests.py index 2e21e91ca6..875e8f95c6 100644 --- a/tools/tests.py +++ b/tools/tests.py @@ -14,8 +14,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -from workspace_tools.paths import * -from workspace_tools.data.support import * +from tools.paths import * +from tools.data.support import * TEST_CMSIS_LIB = join(TEST_DIR, "cmsis", "lib") TEST_MBED_LIB = join(TEST_DIR, "mbed", "env") @@ -1082,7 +1082,7 @@ GROUPS["automated"] = [test["id"] for test in TESTS if test.get("automated", Fal # Look for 'TEST_GROUPS' in private_settings.py and update the GROUPS dictionary # with the information in test_groups if found try: - from workspace_tools.private_settings import TEST_GROUPS + from tools.private_settings import TEST_GROUPS except: TEST_GROUPS = {} GROUPS.update(TEST_GROUPS) diff --git a/tools/toolchains/__init__.py b/tools/toolchains/__init__.py index d122fb72d1..053784876a 100644 --- a/tools/toolchains/__init__.py +++ b/tools/toolchains/__init__.py @@ -26,9 +26,9 @@ from os.path import join, splitext, exists, relpath, dirname, basename, split from inspect import getmro from multiprocessing import Pool, cpu_count -from workspace_tools.utils import run_cmd, mkdir, rel_path, ToolException, NotSupportedException, split_path -from workspace_tools.settings import BUILD_OPTIONS, MBED_ORG_USER -import workspace_tools.hooks as hooks +from tools.utils import run_cmd, mkdir, rel_path, ToolException, NotSupportedException, split_path +from tools.settings import BUILD_OPTIONS, MBED_ORG_USER +import tools.hooks as hooks #Disables multiprocessing if set to higher number than the host machine CPUs @@ -745,9 +745,9 @@ class mbedToolchain: def var(self, key, value): self.notify({'type': 'var', 'key': key, 'val': value}) -from workspace_tools.settings import ARM_BIN -from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH -from workspace_tools.settings import IAR_PATH +from tools.settings import ARM_BIN +from tools.settings import GCC_ARM_PATH, GCC_CR_PATH +from tools.settings import IAR_PATH TOOLCHAIN_BIN_PATH = { 'ARM': ARM_BIN, @@ -757,9 +757,9 @@ TOOLCHAIN_BIN_PATH = { 'IAR': IAR_PATH } -from workspace_tools.toolchains.arm import ARM_STD, ARM_MICRO -from workspace_tools.toolchains.gcc import GCC_ARM, GCC_CR -from workspace_tools.toolchains.iar import IAR +from tools.toolchains.arm import ARM_STD, ARM_MICRO +from tools.toolchains.gcc import GCC_ARM, GCC_CR +from tools.toolchains.iar import IAR TOOLCHAIN_CLASSES = { 'ARM': ARM_STD, diff --git a/tools/toolchains/arm.py b/tools/toolchains/arm.py index 19baf30ec9..4e7d82d3f6 100644 --- a/tools/toolchains/arm.py +++ b/tools/toolchains/arm.py @@ -17,10 +17,10 @@ limitations under the License. import re from os.path import join -from workspace_tools.toolchains import mbedToolchain -from workspace_tools.settings import ARM_BIN, ARM_INC, ARM_LIB, MY_ARM_CLIB, ARM_CPPLIB -from workspace_tools.hooks import hook_tool -from workspace_tools.settings import GOANNA_PATH +from tools.toolchains import mbedToolchain +from tools.settings import ARM_BIN, ARM_INC, ARM_LIB, MY_ARM_CLIB, ARM_CPPLIB +from tools.hooks import hook_tool +from tools.settings import GOANNA_PATH class ARM(mbedToolchain): LINKER_EXT = '.sct' diff --git a/tools/toolchains/gcc.py b/tools/toolchains/gcc.py index 0f493cf7d3..88a9e0ac38 100644 --- a/tools/toolchains/gcc.py +++ b/tools/toolchains/gcc.py @@ -17,10 +17,10 @@ limitations under the License. import re from os.path import join, basename, splitext -from workspace_tools.toolchains import mbedToolchain -from workspace_tools.settings import GCC_ARM_PATH, GCC_CR_PATH -from workspace_tools.settings import GOANNA_PATH -from workspace_tools.hooks import hook_tool +from tools.toolchains import mbedToolchain +from tools.settings import GCC_ARM_PATH, GCC_CR_PATH +from tools.settings import GOANNA_PATH +from tools.hooks import hook_tool class GCC(mbedToolchain): LINKER_EXT = '.ld' diff --git a/tools/toolchains/iar.py b/tools/toolchains/iar.py index 5e4d1e8070..b795c4e520 100644 --- a/tools/toolchains/iar.py +++ b/tools/toolchains/iar.py @@ -18,10 +18,10 @@ import re from os import remove from os.path import join, exists -from workspace_tools.toolchains import mbedToolchain -from workspace_tools.settings import IAR_PATH -from workspace_tools.settings import GOANNA_PATH -from workspace_tools.hooks import hook_tool +from tools.toolchains import mbedToolchain +from tools.settings import IAR_PATH +from tools.settings import GOANNA_PATH +from tools.hooks import hook_tool class IAR(mbedToolchain): LIBRARY_EXT = '.a'