|
16 | 16 | """
|
17 | 17 |
|
18 | 18 | import os
|
19 |
| -import sys |
20 | 19 | import json
|
21 | 20 | import pytest
|
22 | 21 | from mock import patch
|
23 |
| -from hypothesis import given |
24 |
| -from hypothesis.strategies import sampled_from |
25 | 22 | from os.path import join, isfile, dirname, abspath
|
26 | 23 | 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 | +) |
29 | 28 | from tools.resources import Resources
|
30 | 29 |
|
31 | 30 | NOT_CONFIG = [
|
@@ -250,3 +249,16 @@ def test_parameters_and_config_macros_to_macros():
|
250 | 249 |
|
251 | 250 | macro_list = Config._parameters_and_config_macros_to_macros(params, macros)
|
252 | 251 | 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