Example #1
0
def test_compile(config, tag):
    """ For each example repo identified in the config json object, clone, update mbed-os to
        the specified tag and then compile for all supported toolchains.
        
    Args:
    config - the json object imported from the file. 
    tag - GitHub tag corresponding to a version of mbed-os to upgrade to.
    results - summary of compilation results. 
    
    """
    # Create work directories
    create_work_directory('test_compile')
    
    # Loop through the examples
    results = {}
    os.chdir('test_compile')

    lib.source_repos(config)    
    lib.update_mbedos_version(config, tag)
    results = lib.compile_repos(config, SUPPORTED_TOOLCHAINS)
    os.chdir("..")

    return results
def do_import(_, config, examples):
    """Do the import step of this process"""
    lib.source_repos(config, examples)
    return 0