Skip to content

Commit e953d9c

Browse files
committed
Cleanup tools folder and update travis file
1. Remove psa related hooks from the build system. 2. Remove PSA related scripts from tools/test folder 3. Remove psa-autogen job from travis which was running generate_partition_code.py and is not needed anymore 4. Install python modules needed for events and littlefs tests Signed-off-by: Devaraj Ranganna <[email protected]>
1 parent 7cb7f8f commit e953d9c

23 files changed

+5
-3452
lines changed

.travis.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013-2018 Arm Limited. All rights reserved.
1+
# Copyright (c) 2013-2019 Arm Limited. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44
#
@@ -194,9 +194,8 @@ matrix:
194194

195195
### Extended Tests ###
196196
- &extended-vm
197-
stage: "Extended"
198-
name: "psa autogen"
199-
env: NAME=psa-autogen
197+
name: "events"
198+
env: NAME=events EVENTS=events
200199
language: python
201200
python: 3.7
202201
install:
@@ -208,13 +207,6 @@ matrix:
208207
- python -m pip install --upgrade setuptools==40.4.3
209208
- pip install -r requirements.txt
210209
- pip list --verbose
211-
script:
212-
- python tools/psa/generate_partition_code.py
213-
- git diff --exit-code
214-
215-
- <<: *extended-vm
216-
name: "events"
217-
env: NAME=events EVENTS=events
218210
script:
219211
# Check that example compiles
220212
- sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' ${EVENTS}/README.md > main.cpp

tools/build.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444
from tools.utils import argparse_dir_not_parent
4545
from tools.utils import NoValidToolchainException
4646
from tools.utils import print_end_warnings
47-
from tools.psa import generate_psa_sources, clean_psa_autogen
48-
from tools.resources import OsAndSpeResourceFilter
4947

5048
def main():
5149
start = time()
@@ -172,9 +170,6 @@ def main():
172170
skipped = []
173171
end_warnings = []
174172

175-
if options.clean:
176-
clean_psa_autogen()
177-
178173
for toolchain in toolchains:
179174
for target_name in targets:
180175
target = Target.get_target(target_name)
@@ -197,15 +192,7 @@ def main():
197192
profile = extract_profile(parser, options, internal_tc_name)
198193

199194
if options.source_dir:
200-
if target.is_PSA_target:
201-
generate_psa_sources(
202-
source_dirs=options.source_dir,
203-
ignore_paths=[options.build_dir]
204-
)
205-
206195
resource_filter = None
207-
if target.is_PSA_secure_target:
208-
resource_filter = OsAndSpeResourceFilter()
209196

210197
lib_build_res = build_library(
211198
options.source_dir, options.build_dir, target, toolchain_name,

tools/build_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
MBED_CONFIG_FILE, MBED_LIBRARIES_DRIVERS,
4242
MBED_LIBRARIES_PLATFORM, MBED_LIBRARIES_HAL,
4343
BUILD_DIR)
44-
from .resources import Resources, FileType, FileRef, PsaManifestResourceFilter
44+
from .resources import Resources, FileType, FileRef
4545
from .notifier.mock import MockNotifier
4646
from .targets import TARGET_NAMES, TARGET_MAP, CORE_ARCH, Target
4747
from .libraries import Library
@@ -750,7 +750,6 @@ def build_library(src_paths, build_path, target, toolchain_name,
750750
res = Resources(notify).scan_with_toolchain(
751751
src_paths, toolchain, dependencies_paths, inc_dirs=inc_dirs)
752752
res.filter(resource_filter)
753-
res.filter(PsaManifestResourceFilter())
754753

755754
# Copy headers, objects and static libraries - all files needed for
756755
# static lib

tools/make.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@
5555
from tools.utils import print_large_string
5656
from tools.settings import ROOT
5757
from tools.targets import Target
58-
from tools.psa import generate_psa_sources, clean_psa_autogen
59-
from tools.resources import OsAndSpeResourceFilter
6058

6159
def default_args_dict(options):
6260
return dict(
@@ -305,10 +303,6 @@ def main():
305303
elif options.list_tests is True:
306304
print('\n'.join(map(str, sorted(TEST_MAP.values()))))
307305
else:
308-
309-
if options.clean:
310-
clean_psa_autogen()
311-
312306
# Target
313307
if options.mcu is None:
314308
args_error(parser, "argument -m/--mcu is required")
@@ -339,16 +333,7 @@ def main():
339333
args_error(parser, str(e))
340334

341335
if options.source_dir is not None:
342-
if target.is_PSA_target:
343-
generate_psa_sources(
344-
source_dirs=options.source_dir,
345-
ignore_paths=[options.build_dir]
346-
)
347-
348336
resource_filter = None
349-
if target.is_PSA_secure_target:
350-
resource_filter = OsAndSpeResourceFilter()
351-
352337
wrapped_build_project(
353338
options.source_dir,
354339
options.build_dir,

tools/project.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@
5353
from tools.utils import NotSupportedException
5454
from tools.options import extract_profile, list_profiles, extract_mcus
5555
from tools.notifier.term import TerminalNotifier
56-
from tools.psa import generate_psa_sources, clean_psa_autogen
57-
from tools.resources import OsAndSpeResourceFilter
5856

5957
""" The CLI entry point for exporting projects from the mbed tools to any of the
6058
supported IDEs or project structures.
@@ -380,7 +378,6 @@ def main():
380378

381379
if options.clean:
382380
clean(options.source_dir)
383-
clean_psa_autogen()
384381

385382
ide = resolve_exporter_alias(options.ide)
386383
exporter, toolchain_name = get_exporter_toolchain(ide)
@@ -390,16 +387,7 @@ def main():
390387
args_error(parser, "%s not supported by %s" % (mcu, ide))
391388

392389
try:
393-
target = Target.get_target(mcu)
394-
if target.is_PSA_target:
395-
generate_psa_sources(source_dirs=options.source_dir,
396-
ignore_paths=[]
397-
)
398-
399390
resource_filter = None
400-
if target.is_PSA_secure_target:
401-
resource_filter = OsAndSpeResourceFilter()
402-
403391
export(
404392
mcu,
405393
ide,

tools/psa/__init__.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
from tools.resources import FileType
2222
from tools.settings import ROOT
23-
from .generate_partition_code import manifests_discovery, generate_spm_code
24-
25-
2623

2724
def find_secure_image(notify, resources, ns_image_path,
2825
configured_s_image_filename, image_type):
@@ -56,24 +53,3 @@ def find_secure_image(notify, resources, ns_image_path,
5653
raise Exception("Required secure image not found.")
5754

5855
return secure_image
59-
60-
61-
def _get_psa_autogen_dir():
62-
return os.path.join(ROOT, 'PSA_AUTOGEN')
63-
64-
65-
def clean_psa_autogen():
66-
psa_out_dir = _get_psa_autogen_dir()
67-
68-
if os.path.isdir(psa_out_dir):
69-
shutil.rmtree(psa_out_dir)
70-
71-
72-
def generate_psa_sources(source_dirs, ignore_paths):
73-
services, apps = manifests_discovery(root_dirs=source_dirs,
74-
ignore_paths=ignore_paths + ['.git'])
75-
assert len(services + apps), 'PSA manifest discovery failed'
76-
psa_out_dir = _get_psa_autogen_dir()
77-
78-
generate_spm_code(services, apps, psa_out_dir)
79-
return psa_out_dir

tools/psa/generate_partition_code.py

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)