Skip to content

Commit 10c6a27

Browse files
committed
Test that secure/non-secure memories are passed
To managed bootloader mode
1 parent a666e97 commit 10c6a27

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

tools/config/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ def add_config_files(self, flist):
604604
# name, exit with error
605605
if cfg["name"] in self.lib_config_data:
606606
raise ConfigException(
607-
"Library name '%s' is not unique "
608-
"(defined in '%s' and '%s')".format(
607+
"Library name '{}' is not unique "
608+
"(defined in '{}' and '{}')".format(
609609
cfg["name"],
610610
full_path,
611611
self.lib_config_data[cfg["name"]]["__config_path"]

tools/test/config/config_test.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
"""
1717

1818
import os
19-
import sys
2019
import json
2120
import pytest
2221
from mock import patch
23-
from hypothesis import given
24-
from hypothesis.strategies import sampled_from
2522
from os.path import join, isfile, dirname, abspath
2623
from tools.build_api import get_config
27-
from tools.targets import set_targets_json_location, Target, TARGET_NAMES
28-
from tools.config import ConfigException, Config, ConfigParameter, ConfigMacro
24+
from tools.targets import set_targets_json_location
25+
from tools.config import (
26+
ConfigException, Config, ConfigParameter, ConfigMacro, ROM_ALL_MEMORIES
27+
)
2928
from tools.resources import Resources
3029

3130
NOT_CONFIG = [
@@ -250,3 +249,16 @@ def test_parameters_and_config_macros_to_macros():
250249

251250
macro_list = Config._parameters_and_config_macros_to_macros(params, macros)
252251
assert macro_list == ["CUSTOM_MACRO_NAME=1"]
252+
253+
254+
@pytest.mark.parametrize("target_start_size", [
255+
("FUTURE_SEQUANA_PSA", 0x10080000, 0x78000),
256+
("FUTURE_SEQUANA_M0_PSA", 0x10000000, 0x80000)
257+
])
258+
def test_PSA_overrides(target_start_size):
259+
target, start, size = target_start_size
260+
set_targets_json_location()
261+
config = Config(target)
262+
roms = config.get_all_active_memories(ROM_ALL_MEMORIES)
263+
assert("ROM" in roms)
264+
assert(roms["ROM"] == [start, size])

0 commit comments

Comments
 (0)