Loading scripts/parse_commands.py +10 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ if __name__ == '__main__': cmds_rend=[] cmds_isar_post_rend=[] all_args = set() if path.isdir(input): input = Path(input).rglob('*.html') Loading @@ -35,8 +36,8 @@ if __name__ == '__main__': with open(html_report,'r') as infile: for line in infile.readlines(): cmds_enc.extend(re.findall(r"DUT encoder command:\\n\\t(.*?)\\n", line)) cmds_dec.extend(re.findall(r"DUT decoder command:\\n\\t(.*?)\\n", line)) cmds_enc.extend(re.findall(r"REF encoder command:\\n\\t(.*?)\\n", line)) cmds_dec.extend(re.findall(r"REF decoder command:\\n\\t(.*?)\\n", line)) cmds_rend.extend(re.findall(r"Running command\\n(.*?)\\n", line)) cmds_isar_post_rend.extend(re.findall(r"Running ISAR post renderer command\\n(.*?)\\n", line)) Loading @@ -63,9 +64,9 @@ if __name__ == '__main__': cmds_isar_post_rend.append(line) isar_post_rend_cmd = False else: if "DUT encoder command" in line: if "REF encoder command" in line: enc_cmd = True elif "DUT decoder command" in line: elif "REF decoder command" in line: dec_cmd = True elif "Running command" in line: rend_cmd = True Loading @@ -87,6 +88,9 @@ if __name__ == '__main__': else: i = i + 1 # Filter out networkSimulator_g192 commands from cmds_rend cmds_rend = [cmd for cmd in cmds_rend if not "networkSimulator_g192" in cmd] with open(txt_file.replace('.','_enc.'),'w', newline='\n') as outfile: with open('scripts/enc_header.txt','r') as header: outfile.write(header.read()) Loading Loading @@ -224,3 +228,4 @@ if __name__ == '__main__': outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) Loading
scripts/parse_commands.py +10 −5 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ if __name__ == '__main__': cmds_rend=[] cmds_isar_post_rend=[] all_args = set() if path.isdir(input): input = Path(input).rglob('*.html') Loading @@ -35,8 +36,8 @@ if __name__ == '__main__': with open(html_report,'r') as infile: for line in infile.readlines(): cmds_enc.extend(re.findall(r"DUT encoder command:\\n\\t(.*?)\\n", line)) cmds_dec.extend(re.findall(r"DUT decoder command:\\n\\t(.*?)\\n", line)) cmds_enc.extend(re.findall(r"REF encoder command:\\n\\t(.*?)\\n", line)) cmds_dec.extend(re.findall(r"REF decoder command:\\n\\t(.*?)\\n", line)) cmds_rend.extend(re.findall(r"Running command\\n(.*?)\\n", line)) cmds_isar_post_rend.extend(re.findall(r"Running ISAR post renderer command\\n(.*?)\\n", line)) Loading @@ -63,9 +64,9 @@ if __name__ == '__main__': cmds_isar_post_rend.append(line) isar_post_rend_cmd = False else: if "DUT encoder command" in line: if "REF encoder command" in line: enc_cmd = True elif "DUT decoder command" in line: elif "REF decoder command" in line: dec_cmd = True elif "Running command" in line: rend_cmd = True Loading @@ -87,6 +88,9 @@ if __name__ == '__main__': else: i = i + 1 # Filter out networkSimulator_g192 commands from cmds_rend cmds_rend = [cmd for cmd in cmds_rend if not "networkSimulator_g192" in cmd] with open(txt_file.replace('.','_enc.'),'w', newline='\n') as outfile: with open('scripts/enc_header.txt','r') as header: outfile.write(header.read()) Loading Loading @@ -224,3 +228,4 @@ if __name__ == '__main__': outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read())