Skip to content

Commit 3b2b061

Browse files
committed
move workspace to tools
1 parent dca69e0 commit 3b2b061

35 files changed

+155
-155
lines changed

tools/build.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
sys.path.insert(0, ROOT)
2828

2929

30-
from workspace_tools.toolchains import TOOLCHAINS
31-
from workspace_tools.targets import TARGET_NAMES, TARGET_MAP
32-
from workspace_tools.options import get_default_options_parser
33-
from workspace_tools.build_api import build_mbed_libs, build_lib
34-
from workspace_tools.build_api import mcu_toolchain_matrix
35-
from workspace_tools.build_api import static_analysis_scan, static_analysis_scan_lib, static_analysis_scan_library
36-
from workspace_tools.build_api import print_build_results
37-
from workspace_tools.settings import CPPCHECK_CMD, CPPCHECK_MSG_FORMAT
30+
from tools.toolchains import TOOLCHAINS
31+
from tools.targets import TARGET_NAMES, TARGET_MAP
32+
from tools.options import get_default_options_parser
33+
from tools.build_api import build_mbed_libs, build_lib
34+
from tools.build_api import mcu_toolchain_matrix
35+
from tools.build_api import static_analysis_scan, static_analysis_scan_lib, static_analysis_scan_library
36+
from tools.build_api import print_build_results
37+
from tools.settings import CPPCHECK_CMD, CPPCHECK_MSG_FORMAT
3838

3939
if __name__ == '__main__':
4040
start = time()

tools/build_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
from os.path import join, exists, basename
2626
from time import time
2727

28-
from workspace_tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException
29-
from workspace_tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON
30-
from workspace_tools.targets import TARGET_NAMES, TARGET_MAP
31-
from workspace_tools.libraries import Library
32-
from workspace_tools.toolchains import TOOLCHAIN_CLASSES
28+
from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException
29+
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON
30+
from tools.targets import TARGET_NAMES, TARGET_MAP
31+
from tools.libraries import Library
32+
from tools.toolchains import TOOLCHAIN_CLASSES
3333
from jinja2 import FileSystemLoader
3434
from jinja2.environment import Environment
3535

tools/build_release.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
ROOT = abspath(join(dirname(__file__), ".."))
2626
sys.path.insert(0, ROOT)
2727

28-
from workspace_tools.build_api import build_mbed_libs
29-
from workspace_tools.build_api import write_build_report
30-
from workspace_tools.targets import TARGET_MAP
31-
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
32-
from workspace_tools.test_api import SingleTestRunner
33-
from workspace_tools.test_api import singletest_in_cli_mode
34-
from workspace_tools.paths import TEST_DIR
35-
from workspace_tools.tests import TEST_MAP
28+
from tools.build_api import build_mbed_libs
29+
from tools.build_api import write_build_report
30+
from tools.targets import TARGET_MAP
31+
from tools.test_exporters import ReportExporter, ResultExporterType
32+
from tools.test_api import SingleTestRunner
33+
from tools.test_api import singletest_in_cli_mode
34+
from tools.paths import TEST_DIR
35+
from tools.tests import TEST_MAP
3636

3737
OFFICIAL_MBED_LIBRARY_BUILD = (
3838
('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),

tools/build_travis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def run_builds(dry_run):
137137
toolchain_list = build["toolchains"]
138138
if type(toolchain_list) != type([]): toolchain_list = [toolchain_list]
139139
for toolchain in toolchain_list:
140-
cmdline = "python workspace_tools/build.py -m %s -t %s -j 4 -c --silent "% (build["target"], toolchain)
140+
cmdline = "python tools/build.py -m %s -t %s -j 4 -c --silent "% (build["target"], toolchain)
141141
libs = build.get("libs", [])
142142
if libs:
143143
cmdline = cmdline + " ".join(["--" + l for l in libs])
@@ -161,14 +161,14 @@ def run_test_linking(dry_run):
161161
for test_lib in tests:
162162
test_names = tests[test_lib]
163163
test_lib_switch = "--" + test_lib if test_lib else ""
164-
cmdline = "python workspace_tools/make.py -m %s -t %s -c --silent %s -n %s " % (link["target"], toolchain, test_lib_switch, ",".join(test_names))
164+
cmdline = "python tools/make.py -m %s -t %s -c --silent %s -n %s " % (link["target"], toolchain, test_lib_switch, ",".join(test_names))
165165
print "Executing: " + cmdline
166166
if not dry_run:
167167
if os.system(cmdline) != 0:
168168
sys.exit(1)
169169

170170
def run_test_testsuite(dry_run):
171-
cmdline = "python workspace_tools/singletest.py --version"
171+
cmdline = "python tools/singletest.py --version"
172172
print "Executing: " + cmdline
173173
if not dry_run:
174174
if os.system(cmdline) != 0:

tools/data/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
"""
17-
from workspace_tools.targets import TARGETS
17+
from tools.targets import TARGETS
1818

1919
DEFAULT_SUPPORT = {}
2020
CORTEX_ARM_SUPPORT = {}

tools/dev/rpc_classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from os.path import join
1818
from jinja2 import Template
1919

20-
from workspace_tools.paths import TOOLS_DATA, MBED_RPC
20+
from tools.paths import TOOLS_DATA, MBED_RPC
2121

2222
RPC_TEMPLATES_PATH = join(TOOLS_DATA, "rpc")
2323

tools/export/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from shutil import copytree, rmtree, copy
2020
import yaml
2121

22-
from workspace_tools.utils import mkdir
23-
from workspace_tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32
24-
from workspace_tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException
25-
from workspace_tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP
22+
from tools.utils import mkdir
23+
from tools.export import uvision4, codered, gccarm, ds5_5, iar, emblocks, coide, kds, zip, simplicityv3, atmelstudio, sw4stm32
24+
from tools.export.exporters import zip_working_directory_and_clean_up, OldLibrariesException
25+
from tools.targets import TARGET_NAMES, EXPORT_MAP, TARGET_MAP
2626

2727
from project_generator_definitions.definitions import ProGenDef
2828

tools/export/emblocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"""
1717
from exporters import Exporter
1818
from os.path import splitext, basename
19-
from workspace_tools.targets import TARGETS
19+
from tools.targets import TARGETS
2020

2121
# filter all the GCC_ARM targets out of the target list
2222
gccTargets = []

tools/export/exporters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
from contextlib import closing
99
from zipfile import ZipFile, ZIP_DEFLATED
1010

11-
from workspace_tools.utils import mkdir
12-
from workspace_tools.toolchains import TOOLCHAIN_CLASSES
13-
from workspace_tools.targets import TARGET_MAP
11+
from tools.utils import mkdir
12+
from tools.toolchains import TOOLCHAIN_CLASSES
13+
from tools.targets import TARGET_MAP
1414

1515
from project_generator.generate import Generator
1616
from project_generator.project import Project

tools/export/iar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
import os
1919
from project_generator_definitions.definitions import ProGenDef
2020

21-
from workspace_tools.export.exporters import Exporter
22-
from workspace_tools.targets import TARGET_MAP, TARGET_NAMES
21+
from tools.export.exporters import Exporter
22+
from tools.targets import TARGET_MAP, TARGET_NAMES
2323

2424
# If you wish to add a new target, add it to project_generator_definitions, and then
2525
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)

tools/export/sw4stm32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from exporters import Exporter
1818
from os.path import splitext, basename, join
1919
from random import randint
20-
from workspace_tools.utils import mkdir
20+
from tools.utils import mkdir
2121

2222

2323
class Sw4STM32(Exporter):

tools/export/uvision4.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
from os.path import basename, join, dirname
1818
from project_generator_definitions.definitions import ProGenDef
1919

20-
from workspace_tools.export.exporters import Exporter
21-
from workspace_tools.targets import TARGET_MAP, TARGET_NAMES
20+
from tools.export.exporters import Exporter
21+
from tools.targets import TARGET_MAP, TARGET_NAMES
2222

2323
# If you wish to add a new target, add it to project_generator_definitions, and then
2424
# define progen_target name in the target class (`` self.progen_target = 'my_target_name' ``)

tools/export_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
from shutil import move
2424

25-
from workspace_tools.paths import *
26-
from workspace_tools.utils import mkdir, cmd
27-
from workspace_tools.export import export, setup_user_prj
25+
from tools.paths import *
26+
from tools.utils import mkdir, cmd
27+
from tools.export import export, setup_user_prj
2828

2929

3030
USR_PRJ_NAME = "usr_prj"

tools/host_tests/host_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
# we can find packages we want from the same level as other files do
3636
import sys
3737
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..')))
38-
from workspace_tools.test_api import get_autodetected_MUTS_list
39-
from workspace_tools.test_api import get_module_avail
38+
from tools.test_api import get_autodetected_MUTS_list
39+
from tools.test_api import get_module_avail
4040

4141

4242
class Mbed:
@@ -313,7 +313,7 @@ def __init__(self):
313313
self.RESULT_MBED_ASSERT = "mbed_assert"
314314

315315

316-
import workspace_tools.host_tests as host_tests
316+
import tools.host_tests as host_tests
317317

318318

319319
class Test(HostTestResults):

tools/host_tests/host_tests_plugins/module_copy_smart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from host_test_plugins import HostTestPluginBase
2323

2424
sys.path.append(abspath(join(dirname(__file__), "../../../")))
25-
from workspace_tools.test_api import get_autodetected_MUTS_list
25+
from tools.test_api import get_autodetected_MUTS_list
2626

2727
class HostTestPluginCopyMethod_Smart(HostTestPluginBase):
2828

tools/host_tests/tcpecho_server_loop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
ROOT = abspath(join(dirname(__file__), "..", ".."))
2121
sys.path.insert(0, ROOT)
2222

23-
from workspace_tools.private_settings import LOCALHOST
23+
from tools.private_settings import LOCALHOST
2424
from SocketServer import BaseRequestHandler, TCPServer
2525

2626

tools/libraries.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
"""
17-
from workspace_tools.paths import *
18-
from workspace_tools.data.support import *
19-
from workspace_tools.tests import TEST_MBED_LIB
17+
from tools.paths import *
18+
from tools.data.support import *
19+
from tools.tests import TEST_MBED_LIB
2020

2121

2222
LIBRARIES = [

tools/make.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,22 @@
2727
ROOT = abspath(join(dirname(__file__), ".."))
2828
sys.path.insert(0, ROOT)
2929

30-
from workspace_tools.utils import args_error
31-
from workspace_tools.paths import BUILD_DIR
32-
from workspace_tools.paths import RTOS_LIBRARIES
33-
from workspace_tools.paths import RPC_LIBRARY
34-
from workspace_tools.paths import ETH_LIBRARY
35-
from workspace_tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES
36-
from workspace_tools.paths import DSP_LIBRARIES
37-
from workspace_tools.paths import FS_LIBRARY
38-
from workspace_tools.paths import UBLOX_LIBRARY
39-
from workspace_tools.tests import TESTS, Test, TEST_MAP
40-
from workspace_tools.tests import TEST_MBED_LIB
41-
from workspace_tools.targets import TARGET_MAP
42-
from workspace_tools.options import get_default_options_parser
43-
from workspace_tools.build_api import build_project
30+
from tools.utils import args_error
31+
from tools.paths import BUILD_DIR
32+
from tools.paths import RTOS_LIBRARIES
33+
from tools.paths import RPC_LIBRARY
34+
from tools.paths import ETH_LIBRARY
35+
from tools.paths import USB_HOST_LIBRARIES, USB_LIBRARIES
36+
from tools.paths import DSP_LIBRARIES
37+
from tools.paths import FS_LIBRARY
38+
from tools.paths import UBLOX_LIBRARY
39+
from tools.tests import TESTS, Test, TEST_MAP
40+
from tools.tests import TEST_MBED_LIB
41+
from tools.targets import TARGET_MAP
42+
from tools.options import get_default_options_parser
43+
from tools.build_api import build_project
4444
try:
45-
import workspace_tools.private_settings as ps
45+
import tools.private_settings as ps
4646
except:
4747
ps = object()
4848

tools/options.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
limitations under the License.
1616
"""
1717
from optparse import OptionParser
18-
from workspace_tools.toolchains import TOOLCHAINS
19-
from workspace_tools.targets import TARGET_NAMES
18+
from tools.toolchains import TOOLCHAINS
19+
from tools.targets import TARGET_NAMES
2020

2121

2222
def get_default_options_parser():

tools/paths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# Embedded Libraries Sources
2727
LIB_DIR = join(ROOT, "libraries")
2828

29-
TOOLS = join(ROOT, "workspace_tools")
29+
TOOLS = join(ROOT, "tools")
3030
TOOLS_DATA = join(TOOLS, "data")
3131
TOOLS_BOOTLOADERS = join(TOOLS, "bootloaders")
3232

@@ -42,7 +42,7 @@
4242

4343
# Tests
4444
TEST_DIR = join(LIB_DIR, "tests")
45-
HOST_TESTS = join(ROOT, "workspace_tools", "host_tests")
45+
HOST_TESTS = join(ROOT, "tools", "host_tests")
4646

4747
# mbed RPC
4848
MBED_RPC = join(LIB_DIR, "rpc")

tools/project.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
from shutil import move, rmtree
77
from optparse import OptionParser
88

9-
from workspace_tools.paths import EXPORT_DIR, EXPORT_WORKSPACE, EXPORT_TMP
10-
from workspace_tools.paths import MBED_BASE, MBED_LIBRARIES
11-
from workspace_tools.export import export, setup_user_prj, EXPORTERS, mcu_ide_matrix
12-
from workspace_tools.utils import args_error
13-
from workspace_tools.tests import TESTS, Test, TEST_MAP
14-
from workspace_tools.targets import TARGET_NAMES
15-
from workspace_tools.libraries import LIBRARIES
9+
from tools.paths import EXPORT_DIR, EXPORT_WORKSPACE, EXPORT_TMP
10+
from tools.paths import MBED_BASE, MBED_LIBRARIES
11+
from tools.export import export, setup_user_prj, EXPORTERS, mcu_ide_matrix
12+
from tools.utils import args_error
13+
from tools.tests import TESTS, Test, TEST_MAP
14+
from tools.targets import TARGET_NAMES
15+
from tools.libraries import LIBRARIES
1616

1717
try:
18-
import workspace_tools.private_settings as ps
18+
import tools.private_settings as ps
1919
except:
2020
ps = object()
2121

@@ -75,7 +75,7 @@
7575
action="store_true",
7676
dest="supported_ides_html",
7777
default=False,
78-
help="writes workspace_tools/export/README.md")
78+
help="writes tools/export/README.md")
7979

8080
(options, args) = parser.parse_args()
8181

tools/settings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,6 @@
9999
try:
100100
# Allow to overwrite the default settings without the need to edit the
101101
# settings file stored in the repository
102-
from workspace_tools.private_settings import *
102+
from mbed_settings import *
103103
except ImportError:
104-
print '[WARNING] Using default settings. Define your settings in the file "workspace_tools/private_settings.py" or in "./mbed_settings.py"'
104+
print '[WARNING] Using default settings. Define your settings in the file "./mbed_settings.py"'

tools/singletest.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,32 @@
5656

5757

5858
# Check: Extra modules which are required by core test suite
59-
from workspace_tools.utils import check_required_modules
59+
from tools.utils import check_required_modules
6060
check_required_modules(['prettytable', 'serial'])
6161

6262
# Imports related to mbed build api
63-
from workspace_tools.build_api import mcu_toolchain_matrix
63+
from tools.build_api import mcu_toolchain_matrix
6464

6565
# Imports from TEST API
66-
from workspace_tools.test_api import SingleTestRunner
67-
from workspace_tools.test_api import singletest_in_cli_mode
68-
from workspace_tools.test_api import detect_database_verbose
69-
from workspace_tools.test_api import get_json_data_from_file
70-
from workspace_tools.test_api import get_avail_tests_summary_table
71-
from workspace_tools.test_api import get_default_test_options_parser
72-
from workspace_tools.test_api import print_muts_configuration_from_json
73-
from workspace_tools.test_api import print_test_configuration_from_json
74-
from workspace_tools.test_api import get_autodetected_MUTS_list
75-
from workspace_tools.test_api import get_autodetected_TEST_SPEC
76-
from workspace_tools.test_api import get_module_avail
77-
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
66+
from tools.test_api import SingleTestRunner
67+
from tools.test_api import singletest_in_cli_mode
68+
from tools.test_api import detect_database_verbose
69+
from tools.test_api import get_json_data_from_file
70+
from tools.test_api import get_avail_tests_summary_table
71+
from tools.test_api import get_default_test_options_parser
72+
from tools.test_api import print_muts_configuration_from_json
73+
from tools.test_api import print_test_configuration_from_json
74+
from tools.test_api import get_autodetected_MUTS_list
75+
from tools.test_api import get_autodetected_TEST_SPEC
76+
from tools.test_api import get_module_avail
77+
from tools.test_exporters import ReportExporter, ResultExporterType
7878

7979

8080
# Importing extra modules which can be not installed but if available they can extend test suite functionality
8181
try:
8282
import mbed_lstools
83-
from workspace_tools.compliance.ioper_runner import IOperTestRunner
84-
from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
83+
from tools.compliance.ioper_runner import IOperTestRunner
84+
from tools.compliance.ioper_runner import get_available_oper_test_scopes
8585
except:
8686
pass
8787

0 commit comments

Comments
 (0)