New build tests.

*Changes*
- Parallel export
- mbed-os tests added
- specified release version (default to 5)
- default tests AND targets dependent on specified release version
pull/2708/head
Sarah Marsh 2016-09-12 10:43:55 -05:00
parent db696f8f4a
commit 45ad394ca6
4 changed files with 9 additions and 6 deletions

View File

@ -119,11 +119,11 @@ class Exporter(object):
source_files.extend(getattr(self.resources, key))
return list(set([os.path.dirname(src) for src in source_files]))
def check_supported(self, ide):
def check_supported(self):
"""Indicated if this combination of IDE and MCU is supported"""
if self.target not in self.TARGETS or \
self.TOOLCHAIN not in TARGET_MAP[self.target].supported_toolchains:
return False
raise TargetNotSupportedException()
return True
def gen_file(self, template_file, data, target_file):

View File

@ -120,11 +120,11 @@ class IAR(Exporter):
iar_exe = "IarBuild.exe"
else:
iar_exe = join('C:', sep,
'Program Files (x86)', 'IAR Systems',
'Program Files (x86)', 'IAR Systems',
'Embedded Workbench 7.5', 'common', 'bin',
'IarBuild.exe')
if not exists(iar_exe):
raise Exception("UV4.exe not found. Add to path.")
raise Exception("IarBuild.exe not found. Add to path.")
cmd = [iar_exe, proj_file, '-build', self.project_name]
p = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE)

View File

@ -86,6 +86,7 @@ def generate_project_files(resources, export_path, target, name, toolchain, ide,
exporter_cls, _ = get_exporter_toolchain(ide)
exporter = exporter_cls(target, export_path, name, toolchain,
extra_symbols=macros, resources=resources)
exporter.check_supported()
exporter.generate()
files = exporter.generated_files
return files, exporter

View File

@ -126,7 +126,7 @@ class ExportBuildTest(object):
test_case.ide,
test_case.name))
try:
exporter.progen_build()
exporter.build()
except FailedBuildException:
self.failures.append("%s::%s\t%s" % (test_case.mcu,
test_case.ide,
@ -187,6 +187,8 @@ def check_valid_mbed_os(test):
supported = columnate([t for t in all_os_tests.keys()])
raise ArgumentTypeError("Program with name '{0}' not found. "
"Supported tests are: \n{1}".format(test,supported))
def check_version(version):
"""Check if the specified version is valid
args:
@ -201,7 +203,7 @@ def check_version(version):
def main():
"""Entry point"""
ide_list = ["iar", "uvision", "uvision4"]
ide_list = ["iar", "uvision"]
default_v2 = [test_name_known("MBED_BLINKY")]
default_v5 = [check_valid_mbed_os('tests-mbedmicro-rtos-mbed-basic')]