Exemplo n.º 1
0
def main(file_system: FileSystem, resources: StageResources, cache: Dict[str, Any], program_arguments: Dict[str, Any], configuration: Dict[str, Any], remote_proxy: RemoteProxy):
    external_libraries_root = resources['external_libraries_root']
    resources_root          = resources['resources_root']
    main_executable         = resources['main_executable']
    arguments               = program_arguments['byStage']['arguments']

    file_system.execute_and_fail_on_bad_return([main_executable] + arguments,
                                               add_to_library_path=[external_libraries_root, resources_root],
                                               interactive=True)
Exemplo n.º 2
0
def format_test_sources(file_system: FileSystem, resources: StageResources, cache: Dict[str, Any], program_arguments: Dict[str, Any], configuration: Dict[str, Any], remote_proxy: RemoteProxy):
    test_sources = resources['test_sources']
    hasher       = lambda f: hash_file(file_system, f)
    updated, _, new_cache = key_delta(test_sources, hasher, cache)
    if updated:
        clang_format_executable = resources['clang_format_executable']
        file_system.execute_and_fail_on_bad_return([clang_format_executable, '-i', '-style=file'] + updated)
    resources['formatted_test_sources'] = test_sources
    cache.clear()
    cache.update(new_cache)