/build/hb/helper/ |
H A D | separator.py | 20 line = '-' * 15 variable in Separator 23 def __init__(self, line=None): 24 if line: 25 self.line = f'\n{line}' 28 return self.line
|
/build/toolchain/mac/ |
H A D | filter_libtool.py | 24 def is_blocklisted_line(line): 25 """Returns whether the line should be filtered out.""" 27 if isinstance(line, bytes): 28 line = line.decode() 29 if pattern.match(line): 41 for line in err.splitlines(): 42 if not is_blocklisted_line(line): 43 print(line, file=sys.stderr) 44 # Unconditionally touch the output .a file on the command line i [all...] |
/build/hb/util/post_gn/ |
H A D | check_compilation_parameters.py | 25 def parse_cflags(line, cflags_check_list, whitelist): 27 for flag in line.split(): 35 def parse_ldflags(line, ldflags_check_list, whitelist): 37 for flag in line.split(): 47 for line in file: 48 if line.startswith('cflags') or line.startswith('cflags_cc') or line.startswith('cflags_c'): 49 flag = parse_cflags(line, cflags_check_list, whitelist) 50 elif line [all...] |
/build/tools/component_tools/static_check/ |
H A D | csct_online_prehandle.py | 37 def __diff_match_file_start(control_block: dict, line: str): 39 if not line.startswith(pattern): 51 def __diff_match_is_newfile(control_block: dict, line: str): 53 if not line.startswith(pattern): 60 def __diff_match_filename_with_minus(control_block: dict, line: str): 62 if re.match(pattern, line) is None: 69 def __diff_match_filename_with_plus(control_block: dict, line: str): 71 if re.match(pattern, line) is None: 75 if re.search(key, line) is not None: 77 res = re.match(pattern, line) [all...] |
/build/tools/component_tools/static_check/gn_check/ |
H A D | check_gn_online.py | 45 for line in values: 46 pos = line[0] 47 content = line[1] 68 def check_have_product_name(self, key: str, line: list) -> None: 73 if line[1].find(check_item) != -1 and line[1].find("==") != -1: 80 pos = "line:{} {}".format(line[0], line[1]) 85 def check_abs_path(self, key: str, line [all...] |
/build/config/components/init/param/ |
H A D | param_fixer.py | 40 def parse_params(line, contents): 41 line = line.strip() 42 pos = line.find('=') 45 name = line[:pos] 46 value = line[pos + 1:] 64 for line in lines: 65 line = line.strip() 67 if line [all...] |
/build/tools/component_tools/ |
H A D | parse_kconf.py | 78 def is_valid_line(line: str): 79 return line.startswith(KCONF_PREFIX) 82 def handle_config_feature(items: dict, arr: list, line: str): 86 features = line.split("=", 1)[1].strip("\"") 93 def handle_config_component(items: dict, arr: list, line: str): 97 items[VALUE] = line.split("=", 1)[1] 100 def handle_config_property(items: dict, arr: list, line: str): 103 items[VALUE] = line.split("=", 1)[1].strip("\"") 106 def read_line_item(line: str): 107 line [all...] |
/build/tools/component_tools/static_check/bundle_check/ |
H A D | bundle_check_common.py | 85 for line in lines: 86 line = line.strip() 87 if line and line[0] == '#': 89 if 'sdk_version =' in line: 90 match_result = re.match(r'\s*sdk_version\s*=\s*"(\d+\.\d+).*"', line)
|
H A D | bundle_json_check.py | 130 "line" + str(item['line']) + ": " + item['contents'], 192 for line in self.__lines: 194 if string in line: 217 bundle_error = dict(line=0, contents='"name"') 224 bundle_error["line"] = self.get_line_number('"name"') 243 bundle_error = dict(line=0, contents='version') 249 bundle_error["line"] = self.get_line_number('"version": ') 263 bundle_error = dict(line=0, contents='"segment"') 270 bundle_error["line"] [all...] |
H A D | bundle_check_online.py | 48 line = list(("line" + str(i[0]) + ": " + i[1], ret)) 50 diff_dict[file_path].append(line) 63 def check_diff_by_line(line:str) -> str: 64 line = line.strip() 65 match = re.match(r'"(\w+)"\s*:\s*"(.*)"', line)
|
/build/ohos/images/mkimage/ |
H A D | mkchip_ckm.py | 50 for line in f: 51 line = line.strip() 52 if not line or line.startswith('#'): 54 mk_configs_list.append(line)
|
H A D | mkimages.py | 55 for line in file: 56 line = line.strip() 57 if not line or line.startswith("#"): 59 mk_configs.append(line)
|
/build/hb/util/ |
H A D | log_util.py | 43 for line in str(msg).splitlines(): 46 '\r' + (LogUtil.message(level, line)).strip('\n')) 50 for line in str(msg).splitlines(): 51 sys.stdout.write(LogUtil.message(level, line)) 57 for line in str(msg).splitlines(): 58 sys.stderr.write(LogUtil.message(level, line)) 65 for line in str(msg).splitlines(): 66 sys.stderr.write(LogUtil.message(level, line)) 86 for line in str(msg).splitlines(): 87 sys.stderr.write(LogUtil.message(level, line)) [all...] |
H A D | monitor.py | 87 def extract_memory_value(self, line: str):
88 match = re.search(r'\d+', line)
91 def get_ret_num(self, line: str):
92 key = line.split(':')[0]
94 value = self.extract_memory_value(line)
100 for line in f:
101 self.get_ret_num(line)
150 for line in lines:
151 columns = line.split()
|
H A D | system_util.py | 61 for line in iter(process.stdout.readline, ''): 62 log_file.write(line) 64 info = re.findall(useful_info_pattern, line) 68 LogUtil.hb_info(line)
|
/build/ohos/images/ |
H A D | adlt_wrapper.py | 34 for line in stdout.splitlines(): 35 print(f'[1/1] info: {line}') 36 for line in stderr.splitlines(): 37 print(f'[1/1] warning: {line}') 45 for line in lines: 46 so_abspath = os.path.join(args.adlt_root_dir, line.strip("\n"))
|
/build/scripts/ |
H A D | merge_notice.py | 37 for line in data: 38 a_file.write(line) 42 for line in data: 43 a_file.write(line)
|
H A D | cargo2gn.py | 94 for line in lines: 96 if designated_re.match(line): 97 line = eval(repr(line).replace(f'\\"', '')) 98 return designated_re.match(line).group(1) 100 is_package = package.match(line) is not None 148 self.line = '' # original rustc command line parameters 149 self.line_num = 1 # runner told input source line number 150 # Parameters collected from rustc command line [all...] |
H A D | ninja2trace.py | 53 for _, line in enumerate(f.readlines()): 54 start, end, time_stamp, name, cmdhash = line.strip().split( 61 key=lambda line: line.start) 63 key=lambda line: line.end - line.start,
|
H A D | summary_ccache_hitrate.py | 63 for line in process: 64 if cache_size_str in line: 65 cache_size = line.split(":")[1].strip() 66 if ccache_version_str in line: 67 ccache_version = line.split(" ")[2].strip()
|
/build/lite/ |
H A D | utils.py | 62 for line in iter(process.stdout.readline, ''): 63 sys.stdout.write(line) 64 log_file.write(line) 71 for line in iter(process.stderr.readline, ''): 72 sys.stdout.write(line) 73 log_file.write(line)
|
/build/toolchain/ |
H A D | gcc_solink_wrapper.py | 30 for line in readelf.stdout: 31 if b'SONAME' in line: 32 toc += line.decode() 48 for line in nm.stdout: 49 toc += '{}\n'.format(' '.join(line.decode().split(' ', 2)[:2])) 197 lines = [line.strip()[1:] for line in lines]
|
/build/config/components/init/seccomp/scripts/ |
H A D | generate_code_from_policy.py | 158 for line in f: 159 k = const_pattern.match(line) 752 def parse_args(self, function_name, line, skip): 754 group_info = line.split('else') 772 for line in allow_list_with_args: 773 if self.gen_mode == 1 and line == list(allow_list_with_args)[-1]: 775 line = line.replace(' ', '') 776 pos = line.find(':') 777 function_name = line[ [all...] |
/build/test/example/ |
H A D | conftest.py | 45 total_memory_line = [line for line in lines if line.startswith('MemTotal')]
|
/build/ohos/ndk/ |
H A D | scan_ndk_targets.py | 44 for line in in_file: 47 if re.match(r'.*?("\S*#\S*")', line): 50 line = re.sub(r'(#.*?)\n', '', line) 51 contents.append(line)
|