Minos Galanakis | f4ca6ac | 2017-12-11 02:39:21 +0100 | [diff] [blame^] | 1 | #!/usr/bin/env python3 |
| 2 | |
| 3 | """ builtin_configs.py: |
| 4 | |
| 5 | Default configuration files used as reference """ |
| 6 | |
| 7 | from __future__ import print_function |
| 8 | |
| 9 | __copyright__ = """ |
| 10 | /* |
| 11 | * Copyright (c) 2018-2019, Arm Limited. All rights reserved. |
| 12 | * |
| 13 | * SPDX-License-Identifier: BSD-3-Clause |
| 14 | * |
| 15 | */ |
| 16 | """ |
| 17 | __author__ = "Minos Galanakis" |
| 18 | __email__ = "minos.galanakis@linaro.org" |
| 19 | __project__ = "Trusted Firmware-M Open CI" |
| 20 | __status__ = "stable" |
| 21 | __version__ = "1.0" |
| 22 | |
| 23 | |
| 24 | # Configure build manager to build several combinations |
| 25 | config_AN521 = {"platform": ["AN521"], |
| 26 | "compiler": ["GNUARM"], |
| 27 | "config": ["ConfigRegression", |
| 28 | "ConfigDefault", |
| 29 | "ConfigCoreTest"], |
| 30 | "build": ["Debug"], |
| 31 | "with_mcuboot": [True], |
| 32 | # invalid configuations can be added as tuples of adjustable |
| 33 | # resolution "AN521" will reject all combinations for that |
| 34 | # platform while ("AN521", "GNUARM") will only reject GCC ones |
| 35 | "invalid": [] |
| 36 | } |
| 37 | |
| 38 | _builtin_configs = {"AN521_gnuarm_Config_DRC": config_AN521} |
| 39 | |
| 40 | if __name__ == '__main__': |
| 41 | import os |
| 42 | import sys |
| 43 | try: |
| 44 | from tfm_ci_pylib.utils import export_config_map |
| 45 | except ImportError: |
| 46 | dir_path = os.path.dirname(os.path.realpath(__file__)) |
| 47 | sys.path.append(os.path.join(dir_path, "../")) |
| 48 | from tfm_ci_pylib.utils import export_config_map |
| 49 | |
| 50 | if len(sys.argv) == 2: |
| 51 | if sys.argv[1] == "--export": |
| 52 | export_config_map(_builtin_configs) |
| 53 | if len(sys.argv) == 3: |
| 54 | if sys.argv[1] == "--export": |
| 55 | export_config_map(_builtin_configs, sys.argv[2]) |