Skip to content

Commit f9152ad

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 cb4e4e4 commit f9152ad

35 files changed

+4
-4446
lines changed

.travis.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,8 @@ matrix:
195195
### Extended Tests ###
196196
- &extended-vm
197197
stage: "Extended"
198-
name: "psa autogen"
199-
env: NAME=psa-autogen
198+
name: "events"
199+
env: NAME=events EVENTS=events
200200
language: python
201201
python: 3.7
202202
install:
@@ -208,13 +208,6 @@ matrix:
208208
- python -m pip install --upgrade setuptools==40.4.3
209209
- pip install -r requirements.txt
210210
- 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
218211
script:
219212
# Check that example compiles
220213
- 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()
@@ -166,9 +164,6 @@ def main():
166164
skipped = []
167165
end_warnings = []
168166

169-
if options.clean:
170-
clean_psa_autogen()
171-
172167
for toolchain in toolchains:
173168
for target_name in targets:
174169
target = Target.get_target(target_name)
@@ -191,15 +186,7 @@ def main():
191186
profile = extract_profile(parser, options, internal_tc_name)
192187

193188
if options.source_dir:
194-
if target.is_PSA_target:
195-
generate_psa_sources(
196-
source_dirs=options.source_dir,
197-
ignore_paths=[options.build_dir]
198-
)
199-
200189
resource_filter = None
201-
if target.is_PSA_secure_target:
202-
resource_filter = OsAndSpeResourceFilter()
203190

204191
lib_build_res = build_library(
205192
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/README.md

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

tools/psa/__init__.py

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

0 commit comments

Comments
 (0)