def main(): patt = re.compile( '^.*\\.(?:' + '|'.join('(?:' + re.escape(ext) + ')' for ext in FILE_EXTENSIONS) + ')$') input_dir_prefix_len = len(INPUT_DIR) + 1 for base, dirnames, filenames in os.walk(INPUT_DIR): for filename in filenames: if not patt.match(filename): print('ignore:', filename) continue input_path = os.path.join(base, filename) input_rel_path = input_path[input_dir_prefix_len:] output_path = os.path.join(EXPECTED_DIR, input_rel_path) print('generating', output_path, '...') output_content = run_header_abi_dumper(input_path) os.makedirs(os.path.dirname(output_path), exist_ok=True) with open(output_path, 'w') as f: f.write(output_content) modules = Module.get_test_modules() for module in modules: print('Created abi dump at', make_and_copy_reference_dumps(module)) return 0
def main(): patt = re.compile( '^.*\\.(?:' + \ '|'.join('(?:' + re.escape(ext) + ')' for ext in FILE_EXTENSIONS) + \ ')$') input_dir_prefix_len = len(INPUT_DIR) + 1 for base, dirnames, filenames in os.walk(INPUT_DIR): for filename in filenames: if not patt.match(filename): print('ignore:', filename) continue input_path = os.path.join(base, filename) input_rel_path = input_path[input_dir_prefix_len:] output_path = os.path.join(EXPECTED_DIR, input_rel_path) print('generating', output_path, '...') output_content = run_header_abi_dumper(input_path, True, DEFAULT_CFLAGS) os.makedirs(os.path.dirname(output_path), exist_ok=True) with open(output_path, 'w') as f: f.write(output_content) modules = Module.get_test_modules() for module in modules: make_and_copy_reference_dumps(module, DEFAULT_CFLAGS) return 0
def main(): patt = re.compile('^.*\\.(?:' + '|'.join('(?:' + re.escape(ext) + ')' for ext in FILE_EXTENSIONS) + ')$') input_dir_prefix_len = len(INPUT_DIR) + 1 for base, dirnames, filenames in os.walk(INPUT_DIR): for filename in filenames: if not patt.match(filename): print('ignore:', filename) continue input_path = os.path.join(base, filename) input_rel_path = input_path[input_dir_prefix_len:] output_path = os.path.join(EXPECTED_DIR, input_rel_path) print('generating', output_path, '...') os.makedirs(os.path.dirname(output_path), exist_ok=True) run_header_abi_dumper(input_path, output_path, export_include_dirs=EXPORTED_HEADER_DIRS) modules = Module.get_test_modules() for module in modules: print('Created abi dump at', make_and_copy_reference_dumps(module)) return 0