Loading scripts/parse_commands.py +11 −11 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') bts = re.search(r"\s(([\S]+)(.bts|.192|.pkt|.fer))$", cmd) if bts: outfile.write('$DIFF_BIN '+bts.group(1).replace(CUT_PATH + r'/dut',REF_PATH + r'/ref')+' '+bts.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+bts.group(1).replace(CUT_PATH + r'/ref',REF_PATH + r'/ref')+' '+bts.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) Loading @@ -112,11 +112,11 @@ if __name__ == '__main__': arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) if re.search("^tests.*192$",arg): arg = re.sub('tests/split_rendering/cut', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav else: arg = re.sub('tests/dut', REF_PATH + r'/ref', arg) # Input argument arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument if re.search("^tests.*bit$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav args.append(arg) Loading @@ -138,12 +138,12 @@ if __name__ == '__main__': for output in glob.glob(absolute_out.group(1) + '*'): output = path.relpath(output).replace('\\','/') output = re.sub('tests', CUT_PATH, output) diff_cmds.append('$DIFF_BIN '+output.replace(CUT_PATH + r'/dut',REF_PATH + r'/ref')+' '+output+' >> $LOG_FILE 2>&1') diff_cmds.append('$DIFF_BIN '+output.replace(CUT_PATH + r'/ref',REF_PATH + r'/ref')+' '+output+' >> $LOG_FILE 2>&1') outfile.write(('; ').join(diff_cmds)) if isar_out and "cut" in isar_out.group(1): outfile.write('$DIFF_BIN '+isar_out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+isar_out.group(1)+' >> $LOG_FILE 2>&1') if isar_md_out and "cut" in isar_md_out.group(1): outfile.write('; $DIFF_BIN '+isar_md_out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+isar_md_out.group(1)+' >> $LOG_FILE 2>&1\n') if isar_out and "ref" in isar_out.group(1): outfile.write('$DIFF_BIN '+isar_out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+isar_out.group(1)+' >> $LOG_FILE 2>&1') if isar_md_out and "ref" in isar_md_out.group(1): outfile.write('; $DIFF_BIN '+isar_md_out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+isar_md_out.group(1)+' >> $LOG_FILE 2>&1\n') else: outfile.write('\n') outfile.write('\n\n') Loading Loading @@ -174,7 +174,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') out = re.search(r"-o\s(([\S]+)(.wav|.raw|.pcm))", cmd) if out and "ref" in out.group(1): outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/renderer/cut',REF_PATH + r'/renderer/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/renderer/ref',REF_PATH + r'/renderer/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) Loading @@ -191,7 +191,7 @@ if __name__ == '__main__': arg = re.sub('ISAR_post_rend_ref(.exe)?', '$CUT_ISAR_POST_REND_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) if re.search("^tests.*bit$",arg): arg = re.sub('tests/split_rendering/cut', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests', CUT_PATH, arg) args.append(arg) cmd = ' '.join(args) Loading @@ -200,7 +200,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') out = re.search(r"-o\s(([\S]+)(.wav|.raw|.pcm))", cmd) if out and "ref" in out.group(1): outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) No newline at end of file Loading
scripts/parse_commands.py +11 −11 Original line number Diff line number Diff line Loading @@ -87,7 +87,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') bts = re.search(r"\s(([\S]+)(.bts|.192|.pkt|.fer))$", cmd) if bts: outfile.write('$DIFF_BIN '+bts.group(1).replace(CUT_PATH + r'/dut',REF_PATH + r'/ref')+' '+bts.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+bts.group(1).replace(CUT_PATH + r'/ref',REF_PATH + r'/ref')+' '+bts.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) Loading @@ -112,11 +112,11 @@ if __name__ == '__main__': arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref arg = re.sub('tests/split_rendering/renderer_configs', REF_PATH + r'/split_rendering/renderer_configs', arg) if re.search("^tests.*192$",arg): arg = re.sub('tests/split_rendering/cut', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav else: arg = re.sub('tests/dut', REF_PATH + r'/ref', arg) # Input argument arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # Input argument if re.search("^tests.*bit$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav args.append(arg) Loading @@ -138,12 +138,12 @@ if __name__ == '__main__': for output in glob.glob(absolute_out.group(1) + '*'): output = path.relpath(output).replace('\\','/') output = re.sub('tests', CUT_PATH, output) diff_cmds.append('$DIFF_BIN '+output.replace(CUT_PATH + r'/dut',REF_PATH + r'/ref')+' '+output+' >> $LOG_FILE 2>&1') diff_cmds.append('$DIFF_BIN '+output.replace(CUT_PATH + r'/ref',REF_PATH + r'/ref')+' '+output+' >> $LOG_FILE 2>&1') outfile.write(('; ').join(diff_cmds)) if isar_out and "cut" in isar_out.group(1): outfile.write('$DIFF_BIN '+isar_out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+isar_out.group(1)+' >> $LOG_FILE 2>&1') if isar_md_out and "cut" in isar_md_out.group(1): outfile.write('; $DIFF_BIN '+isar_md_out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+isar_md_out.group(1)+' >> $LOG_FILE 2>&1\n') if isar_out and "ref" in isar_out.group(1): outfile.write('$DIFF_BIN '+isar_out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+isar_out.group(1)+' >> $LOG_FILE 2>&1') if isar_md_out and "ref" in isar_md_out.group(1): outfile.write('; $DIFF_BIN '+isar_md_out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+isar_md_out.group(1)+' >> $LOG_FILE 2>&1\n') else: outfile.write('\n') outfile.write('\n\n') Loading Loading @@ -174,7 +174,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') out = re.search(r"-o\s(([\S]+)(.wav|.raw|.pcm))", cmd) if out and "ref" in out.group(1): outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/renderer/cut',REF_PATH + r'/renderer/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/renderer/ref',REF_PATH + r'/renderer/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) Loading @@ -191,7 +191,7 @@ if __name__ == '__main__': arg = re.sub('ISAR_post_rend_ref(.exe)?', '$CUT_ISAR_POST_REND_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) if re.search("^tests.*bit$",arg): arg = re.sub('tests/split_rendering/cut', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests/split_rendering/ref', REF_PATH + r'/split_rendering/ref', arg) arg = re.sub('tests', CUT_PATH, arg) args.append(arg) cmd = ' '.join(args) Loading @@ -200,7 +200,7 @@ if __name__ == '__main__': outfile.write(cmd+'\n') out = re.search(r"-o\s(([\S]+)(.wav|.raw|.pcm))", cmd) if out and "ref" in out.group(1): outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/split_rendering/cut',REF_PATH + r'/split_rendering/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('$DIFF_BIN '+out.group(1).replace(CUT_PATH + r'/split_rendering/ref',REF_PATH + r'/split_rendering/ref')+' '+out.group(1)+' >> $LOG_FILE 2>&1\n') outfile.write('\n') with open('scripts/script_footer.txt','r') as footer: outfile.write(footer.read()) No newline at end of file