2014-12-25 12:19:29 +00:00
|
|
|
#! /usr/bin/env python
|
2013-08-12 10:45:35 +00:00
|
|
|
"""
|
|
|
|
mbed SDK
|
|
|
|
Copyright (c) 2011-2013 ARM Limited
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
"""
|
|
|
|
import sys
|
|
|
|
from time import time
|
2016-02-19 22:00:11 +00:00
|
|
|
from os.path import join, abspath, dirname, normpath
|
2014-05-07 13:41:12 +00:00
|
|
|
from optparse import OptionParser
|
2016-02-19 22:00:11 +00:00
|
|
|
import json
|
2013-08-12 10:45:35 +00:00
|
|
|
|
|
|
|
# Be sure that the tools directory is in the search path
|
|
|
|
ROOT = abspath(join(dirname(__file__), ".."))
|
2013-12-19 13:02:57 +00:00
|
|
|
sys.path.insert(0, ROOT)
|
2013-08-12 10:45:35 +00:00
|
|
|
|
2016-06-09 20:34:53 +00:00
|
|
|
from tools.build_api import build_mbed_libs
|
|
|
|
from tools.build_api import write_build_report
|
|
|
|
from tools.targets import TARGET_MAP, TARGET_NAMES
|
|
|
|
from tools.test_exporters import ReportExporter, ResultExporterType
|
|
|
|
from tools.test_api import SingleTestRunner
|
|
|
|
from tools.test_api import singletest_in_cli_mode
|
|
|
|
from tools.paths import TEST_DIR
|
|
|
|
from tools.tests import TEST_MAP
|
2013-08-12 10:45:35 +00:00
|
|
|
|
|
|
|
OFFICIAL_MBED_LIBRARY_BUILD = (
|
2014-11-18 13:54:40 +00:00
|
|
|
('LPC11U24', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2016-02-11 05:27:33 +00:00
|
|
|
('LPC1768', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
|
|
|
('UBLOX_C027', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
|
|
|
('ARCH_PRO', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
2014-10-22 22:48:01 +00:00
|
|
|
('LPC2368', ('ARM', 'GCC_ARM')),
|
2015-06-23 12:10:46 +00:00
|
|
|
('LPC2460', ('GCC_ARM',)),
|
2014-11-18 15:09:38 +00:00
|
|
|
('LPC812', ('uARM','IAR')),
|
2015-04-13 08:13:02 +00:00
|
|
|
('LPC824', ('uARM', 'GCC_ARM', 'IAR', 'GCC_CR')),
|
|
|
|
('SSCI824', ('uARM','GCC_ARM')),
|
2014-11-12 09:03:39 +00:00
|
|
|
('LPC1347', ('ARM','IAR')),
|
2014-11-18 15:19:26 +00:00
|
|
|
('LPC4088', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
2015-02-03 15:00:42 +00:00
|
|
|
('LPC4088_DM', ('ARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
2015-04-20 16:35:11 +00:00
|
|
|
('LPC1114', ('uARM','GCC_ARM', 'GCC_CR', 'IAR')),
|
2014-11-18 13:54:40 +00:00
|
|
|
('LPC11U35_401', ('ARM', 'uARM','GCC_ARM','GCC_CR', 'IAR')),
|
|
|
|
('LPC11U35_501', ('ARM', 'uARM','GCC_ARM','GCC_CR', 'IAR')),
|
2014-11-18 15:01:34 +00:00
|
|
|
('LPC1549', ('uARM','GCC_ARM','GCC_CR', 'IAR')),
|
2014-07-19 15:57:26 +00:00
|
|
|
('XADOW_M0', ('ARM', 'uARM','GCC_ARM','GCC_CR')),
|
2014-11-18 13:54:40 +00:00
|
|
|
('ARCH_GPRS', ('ARM', 'uARM', 'GCC_ARM', 'GCC_CR', 'IAR')),
|
2014-09-02 17:11:05 +00:00
|
|
|
('LPC4337', ('ARM',)),
|
2015-06-23 12:10:46 +00:00
|
|
|
('LPC11U37H_401', ('ARM', 'uARM','GCC_ARM','GCC_CR')),
|
2015-06-22 15:59:43 +00:00
|
|
|
('MICRONFCBOARD', ('ARM', 'uARM','GCC_ARM')),
|
2014-05-29 13:42:03 +00:00
|
|
|
|
2014-10-30 11:38:53 +00:00
|
|
|
('KL05Z', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2014-10-30 09:43:53 +00:00
|
|
|
('KL25Z', ('ARM', 'GCC_ARM', 'IAR')),
|
2016-03-29 19:01:02 +00:00
|
|
|
('KL27Z', ('ARM', 'GCC_ARM', 'IAR')),
|
2014-10-14 23:02:32 +00:00
|
|
|
('KL43Z', ('ARM', 'GCC_ARM')),
|
2014-10-30 12:14:10 +00:00
|
|
|
('KL46Z', ('ARM', 'GCC_ARM', 'IAR')),
|
2014-10-30 18:07:44 +00:00
|
|
|
('K64F', ('ARM', 'GCC_ARM', 'IAR')),
|
2014-10-30 17:29:24 +00:00
|
|
|
('K22F', ('ARM', 'GCC_ARM', 'IAR')),
|
2014-10-29 16:44:38 +00:00
|
|
|
('K20D50M', ('ARM', 'GCC_ARM' , 'IAR')),
|
2015-01-15 19:11:40 +00:00
|
|
|
('TEENSY3_1', ('ARM', 'GCC_ARM')),
|
2014-05-05 09:22:02 +00:00
|
|
|
|
2016-01-05 16:24:31 +00:00
|
|
|
('B96B_F446VE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-11-22 14:21:33 +00:00
|
|
|
('NUCLEO_F030R8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-29 11:48:55 +00:00
|
|
|
('NUCLEO_F031K6', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-01 12:03:52 +00:00
|
|
|
('NUCLEO_F042K6', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-12-18 08:30:19 +00:00
|
|
|
('NUCLEO_F070RB', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-11-22 14:21:33 +00:00
|
|
|
('NUCLEO_F072RB', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-01-07 16:56:05 +00:00
|
|
|
('NUCLEO_F091RC', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
|
|
|
('NUCLEO_F103RB', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-11-16 17:29:15 +00:00
|
|
|
('NUCLEO_F302R8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-12 09:34:06 +00:00
|
|
|
('NUCLEO_F303K8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-12-02 06:51:14 +00:00
|
|
|
('NUCLEO_F303RE', ('ARM', 'uARM', 'IAR')),
|
2014-10-31 12:40:36 +00:00
|
|
|
('NUCLEO_F334R8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-10-27 10:20:08 +00:00
|
|
|
('NUCLEO_F401RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-27 12:50:52 +00:00
|
|
|
('NUCLEO_F410RB', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-10-22 22:48:01 +00:00
|
|
|
('NUCLEO_F411RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-09-02 15:47:10 +00:00
|
|
|
('NUCLEO_F446RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-02 17:08:08 +00:00
|
|
|
('ELMO_F411RE', ('ARM', 'uARM', 'GCC_ARM')),
|
2015-01-07 16:56:05 +00:00
|
|
|
('NUCLEO_L053R8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-11-16 16:10:47 +00:00
|
|
|
('NUCLEO_L152RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-11-12 22:21:13 +00:00
|
|
|
('MTS_MDOT_F405RG', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2014-12-05 23:34:38 +00:00
|
|
|
('MTS_MDOT_F411RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-06-08 13:42:12 +00:00
|
|
|
('MTS_DRAGONFLY_F411RE', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-05-13 08:28:12 +00:00
|
|
|
('DISCO_L053C8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-05-18 14:19:33 +00:00
|
|
|
('DISCO_F334C8', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-11-09 09:59:13 +00:00
|
|
|
('DISCO_F429ZI', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2015-10-21 14:26:06 +00:00
|
|
|
('DISCO_F469NI', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2016-03-15 15:34:00 +00:00
|
|
|
('DISCO_F746NG', ('ARM', 'uARM', 'GCC_ARM','IAR')),
|
2015-09-28 17:01:26 +00:00
|
|
|
('DISCO_L476VG', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
|
|
|
('NUCLEO_L476RG', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
2016-03-15 15:34:00 +00:00
|
|
|
('NUCLEO_F746ZG', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2016-04-21 14:25:58 +00:00
|
|
|
('NUCLEO_L031K6', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2016-03-15 15:34:00 +00:00
|
|
|
('NUCLEO_L073RZ', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2014-05-21 13:00:59 +00:00
|
|
|
|
2015-12-09 18:53:51 +00:00
|
|
|
('MOTE_L152RC', ('ARM', 'uARM', 'IAR', 'GCC_ARM')),
|
|
|
|
|
2014-10-14 23:02:32 +00:00
|
|
|
('ARCH_MAX', ('ARM', 'GCC_ARM')),
|
2014-08-21 08:48:40 +00:00
|
|
|
|
2015-02-04 10:29:31 +00:00
|
|
|
('NRF51822', ('ARM', 'GCC_ARM', 'IAR')),
|
2015-03-02 09:38:46 +00:00
|
|
|
('NRF51_DK', ('ARM', 'GCC_ARM', 'IAR')),
|
|
|
|
('NRF51_DONGLE', ('ARM', 'GCC_ARM', 'IAR')),
|
|
|
|
('HRM1017', ('ARM', 'GCC_ARM', 'IAR')),
|
|
|
|
('ARCH_BLE', ('ARM', 'GCC_ARM', 'IAR')),
|
|
|
|
('SEEED_TINY_BLE', ('ARM', 'GCC_ARM', 'IAR')),
|
2014-08-15 14:19:28 +00:00
|
|
|
('RBLAB_NRF51822', ('ARM', 'GCC_ARM')),
|
2014-10-29 09:26:41 +00:00
|
|
|
('RBLAB_BLENANO', ('ARM', 'GCC_ARM')),
|
2014-11-06 07:03:43 +00:00
|
|
|
('WALLBOT_BLE', ('ARM', 'GCC_ARM')),
|
2015-06-03 07:07:07 +00:00
|
|
|
('DELTA_DFCM_NNN40', ('ARM', 'GCC_ARM')),
|
2016-04-21 12:20:26 +00:00
|
|
|
('NRF51_MICROBIT', ('ARM','GCC_ARM')),
|
2015-08-05 13:19:47 +00:00
|
|
|
('NRF51_MICROBIT_B', ('ARM',)),
|
2016-01-06 14:17:24 +00:00
|
|
|
('TY51822R3', ('ARM', 'GCC_ARM')),
|
2014-05-19 12:47:09 +00:00
|
|
|
|
2015-02-13 15:32:16 +00:00
|
|
|
('LPC11U68', ('ARM', 'uARM','GCC_ARM','GCC_CR', 'IAR')),
|
2014-11-18 13:54:40 +00:00
|
|
|
('OC_MBUINO', ('ARM', 'uARM', 'GCC_ARM', 'IAR')),
|
2014-10-24 01:54:29 +00:00
|
|
|
|
2015-07-07 07:35:37 +00:00
|
|
|
('ARM_MPS2_M0' , ('ARM',)),
|
|
|
|
('ARM_MPS2_M0P' , ('ARM',)),
|
|
|
|
('ARM_MPS2_M3' , ('ARM',)),
|
|
|
|
('ARM_MPS2_M4' , ('ARM',)),
|
|
|
|
('ARM_MPS2_M7' , ('ARM',)),
|
2016-05-27 12:10:04 +00:00
|
|
|
('ARM_IOTSS_BEID' , ('ARM',)),
|
2016-05-11 13:57:33 +00:00
|
|
|
('ARM_BEETLE_SOC' , ('ARM', 'GCC_ARM')),
|
2015-07-07 07:35:37 +00:00
|
|
|
|
2016-05-10 15:20:11 +00:00
|
|
|
('RZ_A1H' , ('ARM', 'GCC_ARM')),
|
2015-04-27 18:11:02 +00:00
|
|
|
|
2015-06-08 12:42:39 +00:00
|
|
|
('EFM32ZG_STK3200', ('GCC_ARM', 'uARM')),
|
|
|
|
('EFM32HG_STK3400', ('GCC_ARM', 'uARM')),
|
2015-04-27 18:11:02 +00:00
|
|
|
('EFM32LG_STK3600', ('ARM', 'GCC_ARM', 'uARM')),
|
|
|
|
('EFM32GG_STK3700', ('ARM', 'GCC_ARM', 'uARM')),
|
|
|
|
('EFM32WG_STK3800', ('ARM', 'GCC_ARM', 'uARM')),
|
2016-04-14 14:49:14 +00:00
|
|
|
('EFM32PG_STK3401', ('ARM', 'GCC_ARM', 'uARM')),
|
2015-05-13 08:28:12 +00:00
|
|
|
|
|
|
|
('MAXWSNENV', ('ARM', 'GCC_ARM', 'IAR')),
|
2015-06-08 13:42:12 +00:00
|
|
|
('MAX32600MBED', ('ARM', 'GCC_ARM', 'IAR')),
|
2015-05-27 08:38:27 +00:00
|
|
|
|
2015-06-10 12:18:34 +00:00
|
|
|
('WIZWIKI_W7500', ('ARM', 'uARM')),
|
2015-09-09 05:22:19 +00:00
|
|
|
('WIZWIKI_W7500P',('ARM', 'uARM')),
|
2015-09-30 03:44:21 +00:00
|
|
|
('WIZWIKI_W7500ECO',('ARM', 'uARM')),
|
2015-11-24 14:20:37 +00:00
|
|
|
|
|
|
|
('SAMR21G18A',('ARM', 'uARM', 'GCC_ARM')),
|
|
|
|
('SAMD21J18A',('ARM', 'uARM', 'GCC_ARM')),
|
|
|
|
('SAMD21G18A',('ARM', 'uARM', 'GCC_ARM')),
|
|
|
|
|
2013-08-12 10:45:35 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2014-05-07 13:41:12 +00:00
|
|
|
parser = OptionParser()
|
|
|
|
parser.add_option('-o', '--official', dest="official_only", default=False, action="store_true",
|
|
|
|
help="Build using only the official toolchain for each target")
|
2014-07-09 17:00:21 +00:00
|
|
|
parser.add_option("-j", "--jobs", type="int", dest="jobs",
|
|
|
|
default=1, help="Number of concurrent jobs (default 1). Use 0 for auto based on host machine's number of CPUs")
|
2014-05-07 21:12:23 +00:00
|
|
|
parser.add_option("-v", "--verbose", action="store_true", dest="verbose",
|
|
|
|
default=False, help="Verbose diagnostic output")
|
2015-03-20 16:17:53 +00:00
|
|
|
parser.add_option("-t", "--toolchains", dest="toolchains", help="Use toolchains names separated by comma")
|
|
|
|
|
2015-06-08 15:26:39 +00:00
|
|
|
parser.add_option("-p", "--platforms", dest="platforms", default="", help="Build only for the platform namesseparated by comma")
|
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
parser.add_option("-L", "--list-config", action="store_true", dest="list_config",
|
|
|
|
default=False, help="List the platforms and toolchains in the release in JSON")
|
|
|
|
|
2015-11-05 20:42:45 +00:00
|
|
|
parser.add_option("", "--report-build", dest="report_build_file_name", help="Output the build results to an junit xml file")
|
2015-03-27 21:56:14 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
parser.add_option("", "--build-tests", dest="build_tests", help="Build all tests in the given directories (relative to /libraries/tests)")
|
2015-03-20 16:17:53 +00:00
|
|
|
|
2015-06-08 15:26:39 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
options, args = parser.parse_args()
|
2015-06-08 15:26:39 +00:00
|
|
|
|
|
|
|
|
2015-03-20 16:17:53 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
if options.list_config:
|
|
|
|
print json.dumps(OFFICIAL_MBED_LIBRARY_BUILD, indent=4)
|
|
|
|
sys.exit()
|
2015-03-20 16:17:53 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
start = time()
|
|
|
|
build_report = {}
|
|
|
|
build_properties = {}
|
2015-04-14 18:39:29 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
platforms = None
|
|
|
|
if options.platforms != "":
|
|
|
|
platforms = set(options.platforms.split(","))
|
2015-04-14 18:39:29 +00:00
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
if options.build_tests:
|
|
|
|
# Get all paths
|
|
|
|
directories = options.build_tests.split(',')
|
|
|
|
for i in range(len(directories)):
|
|
|
|
directories[i] = normpath(join(TEST_DIR, directories[i]))
|
|
|
|
|
|
|
|
test_names = []
|
|
|
|
|
|
|
|
for test_id in TEST_MAP.keys():
|
|
|
|
# Prevents tests with multiple source dirs from being checked
|
|
|
|
if isinstance( TEST_MAP[test_id].source_dir, basestring):
|
|
|
|
test_path = normpath(TEST_MAP[test_id].source_dir)
|
|
|
|
for directory in directories:
|
|
|
|
if directory in test_path:
|
|
|
|
test_names.append(test_id)
|
|
|
|
|
|
|
|
mut_counter = 1
|
|
|
|
mut = {}
|
|
|
|
test_spec = {
|
|
|
|
"targets": {}
|
|
|
|
}
|
|
|
|
|
2016-05-27 12:10:04 +00:00
|
|
|
if options.toolchains:
|
|
|
|
print "Only building using the following toolchains: %s" % (options.toolchains)
|
|
|
|
|
2016-02-19 22:00:11 +00:00
|
|
|
for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
|
|
|
|
toolchains = None
|
|
|
|
if platforms is not None and not target_name in platforms:
|
|
|
|
print("Excluding %s from release" % target_name)
|
|
|
|
continue
|
2016-05-11 13:57:33 +00:00
|
|
|
|
2016-05-27 12:10:04 +00:00
|
|
|
if target_name not in TARGET_NAMES:
|
|
|
|
print "Target '%s' is not a valid target. Excluding from release"
|
|
|
|
continue
|
2016-02-19 22:00:11 +00:00
|
|
|
|
|
|
|
if options.official_only:
|
|
|
|
toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),)
|
|
|
|
else:
|
|
|
|
toolchains = toolchain_list
|
|
|
|
|
|
|
|
if options.toolchains:
|
|
|
|
toolchainSet = set(toolchains)
|
|
|
|
toolchains = toolchainSet.intersection(set((options.toolchains).split(',')))
|
|
|
|
|
|
|
|
mut[str(mut_counter)] = {
|
|
|
|
"mcu": target_name
|
|
|
|
}
|
|
|
|
|
|
|
|
mut_counter += 1
|
|
|
|
|
|
|
|
test_spec["targets"][target_name] = toolchains
|
|
|
|
|
2016-05-27 12:10:04 +00:00
|
|
|
single_test = SingleTestRunner(_muts=mut,
|
|
|
|
_opts_report_build_file_name=options.report_build_file_name,
|
|
|
|
_test_spec=test_spec,
|
|
|
|
_opts_test_by_names=",".join(test_names),
|
|
|
|
_opts_verbose=options.verbose,
|
|
|
|
_opts_only_build_tests=True,
|
|
|
|
_opts_suppress_summary=True,
|
|
|
|
_opts_jobs=options.jobs,
|
|
|
|
_opts_include_non_automated=True,
|
|
|
|
_opts_build_report=build_report,
|
|
|
|
_opts_build_properties=build_properties)
|
|
|
|
# Runs test suite in CLI mode
|
|
|
|
test_summary, shuffle_seed, test_summary_ext, test_suite_properties_ext, new_build_report, new_build_properties = single_test.execute()
|
2016-02-19 22:00:11 +00:00
|
|
|
else:
|
|
|
|
for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
|
|
|
|
if platforms is not None and not target_name in platforms:
|
|
|
|
print("Excluding %s from release" % target_name)
|
|
|
|
continue
|
2016-05-11 13:57:33 +00:00
|
|
|
|
2016-05-27 12:10:04 +00:00
|
|
|
if target_name not in TARGET_NAMES:
|
|
|
|
print "Target '%s' is not a valid target. Excluding from release"
|
|
|
|
continue
|
2016-02-19 22:00:11 +00:00
|
|
|
|
|
|
|
if options.official_only:
|
|
|
|
toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),)
|
|
|
|
else:
|
|
|
|
toolchains = toolchain_list
|
|
|
|
|
|
|
|
if options.toolchains:
|
|
|
|
print "Only building using the following toolchains: %s" % (options.toolchains)
|
|
|
|
toolchainSet = set(toolchains)
|
|
|
|
toolchains = toolchainSet.intersection(set((options.toolchains).split(',')))
|
|
|
|
|
|
|
|
for toolchain in toolchains:
|
|
|
|
id = "%s::%s" % (target_name, toolchain)
|
|
|
|
|
|
|
|
try:
|
|
|
|
built_mbed_lib = build_mbed_libs(TARGET_MAP[target_name], toolchain, verbose=options.verbose, jobs=options.jobs, report=build_report, properties=build_properties)
|
|
|
|
|
|
|
|
except Exception, e:
|
|
|
|
print str(e)
|
2015-03-27 21:56:14 +00:00
|
|
|
|
2013-08-12 10:45:35 +00:00
|
|
|
# Write summary of the builds
|
2015-04-14 18:45:56 +00:00
|
|
|
if options.report_build_file_name:
|
2015-11-06 19:38:30 +00:00
|
|
|
file_report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build")
|
2016-02-19 22:00:11 +00:00
|
|
|
file_report_exporter.report_to_file(build_report, options.report_build_file_name, test_suite_properties=build_properties)
|
2015-03-27 23:55:50 +00:00
|
|
|
|
2013-08-12 10:45:35 +00:00
|
|
|
print "\n\nCompleted in: (%.2f)s" % (time() - start)
|
2014-05-29 13:42:03 +00:00
|
|
|
|
2015-11-06 19:38:30 +00:00
|
|
|
print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build")
|
2016-02-19 22:00:11 +00:00
|
|
|
status = print_report_exporter.report(build_report)
|
2015-04-14 18:39:29 +00:00
|
|
|
|
2015-11-05 20:42:45 +00:00
|
|
|
if not status:
|
2015-04-13 14:13:52 +00:00
|
|
|
sys.exit(1)
|