Loading parse_commands.py +4 −7 Original line number Diff line number Diff line Loading @@ -69,20 +69,17 @@ if __name__ == '__main__': absolute_out = re.search(r"\s(([\S]+)(.wav))$", cmd) args = [] inputs = sum([1 if path.exists(a) else 0 for a in cmd.split()]) - 2 # One is the exec, one is the output, rest is inputs for arg in cmd.split(): # Adjust file arguments, pass other arguments as they are if path.exists(arg): arg = path.relpath(arg).replace('\\','/') arg = re.sub('IVAS_dec(.exe)?', '$CUT_DEC_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) if ".fer " in cmd: arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav else: if inputs > 0: arg, count = re.subn('tests/dut', REF_PATH + r'/ref', arg) inputs = inputs - count arg = re.sub('tests', CUT_PATH, arg) arg = re.sub('tests/dut', REF_PATH + r'/ref', arg) # Input argument args.append(arg) cmd = ' '.join(args) Loading Loading
parse_commands.py +4 −7 Original line number Diff line number Diff line Loading @@ -69,20 +69,17 @@ if __name__ == '__main__': absolute_out = re.search(r"\s(([\S]+)(.wav))$", cmd) args = [] inputs = sum([1 if path.exists(a) else 0 for a in cmd.split()]) - 2 # One is the exec, one is the output, rest is inputs for arg in cmd.split(): # Adjust file arguments, pass other arguments as they are if path.exists(arg): arg = path.relpath(arg).replace('\\','/') arg = re.sub('IVAS_dec(.exe)?', '$CUT_DEC_BIN', arg) arg = re.sub('scripts', TESTV_PATH, arg) if ".fer " in cmd: arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) arg = re.sub('tests/ref', REF_PATH + r'/ref', arg) # For .fer cases the bitstream is in ref if re.search("\.wav$",arg): arg = re.sub('tests', CUT_PATH, arg) # Output argument for decoder ends with .wav else: if inputs > 0: arg, count = re.subn('tests/dut', REF_PATH + r'/ref', arg) inputs = inputs - count arg = re.sub('tests', CUT_PATH, arg) arg = re.sub('tests/dut', REF_PATH + r'/ref', arg) # Input argument args.append(arg) cmd = ' '.join(args) Loading