def autobuild_arm_program(elfname, test_dir=os.path.join('firmware', 'test'), patch=True): """ Build the an ARM module for all targets and build all unit tests. If pcb files are given, also build those. """ try: #Build for all targets family = utilities.get_family('module_settings.json') family.for_all_targets(family.tile.short_name, lambda x: arm.build_program(family.tile, elfname, x, patch=patch)) #Build all unit tests unit_test.build_units(os.path.join('firmware','test'), family.targets(family.tile.short_name)) Alias('release', os.path.join('build', 'output')) Alias('test', os.path.join('build', 'test', 'output')) Default(['release', 'test']) autobuild_release(family) if os.path.exists('doc'): autobuild_documentation(family.tile) except IOTileException as e: print(e.format()) sys.exit(1)
def autobuild_pic12(module, test_dir='test', modulefile=None): """ Build the given module for all targets and build all unit tests. targets are determined from /config/build_settings.json using the module name and the tests are found automatically and built using their builtin metadata """ try: family = utilities.get_family('mib12', modulefile=modulefile) family.for_all_targets(module, lambda x: pic12.build_module(module, x)) unit_test.build_units(test_dir, family.targets(module)) Alias('release', os.path.join('build', 'output')) Alias('test', os.path.join('build', 'test', 'output')) Default('release') except MoMoException as e: print e.format() sys.exit(1)
def autobuild_arm_library(libname): try: #Build for all targets family = utilities.get_family('module_settings.json') family.for_all_targets(family.tile.short_name, lambda x: arm.build_library(family.tile, libname, x)) #Build all unit tests unit_test.build_units(os.path.join('firmware','test'), family.targets(family.tile.short_name)) Alias('release', os.path.join('build', 'output')) Alias('test', os.path.join('build', 'test', 'output')) Default(['release', 'test']) autobuild_release(family) if os.path.exists('doc'): autobuild_documentation(family.tile) except unit_test.IOTileException as e: print(e.format()) Exit(1)