Files
TBgen_App/utils/__pycache__/subproc.cpython-312.pyc

26 lines
1.9 KiB
Plaintext
Raw Normal View History

2026-03-30 16:46:48 +08:00
<EFBFBD>
P<>Yiy<00><00><00>dZddlZdd<03>Zy)z<>
Description : This file is related to auto subprocess running
Author : Ruidi Qiu (r.qiu@tum.de)
Time : 2023/12/11 14:06:27
LastEdited : 2024/4/28 13:26:18
<EFBFBD>Nc<00>t<00>d|z}tj|dtjtj<00><03>}d}d}d} |j|<01><06>\}}|j d<07>}|j d<07>}|j
}|||d <09>S#tj $r|j<00>d}|}d}Y<00>1wxYw)
a<EFBFBD>
run a cmd in shell and return the output and error
#### input:
- cmd: str
- timeout: int, seconds
#### output:
- {"out": out_reg, "err": err_reg, "haserror": error_exist}
- out_reg: str, output of cmd
- err_reg: str, error of cmd
- error_exist: int, 0 if no error, 1 if error
cmd can at most run 2 minutes and if it exceeds, will return {"out": "timeout", "err": "program is timeout", "haserror": 1}
z<>program is timeout (time > %ds). please check your code. Hints: there might be some infinite loop, please check all the loops in your programm. If it is a verilog code, please check if there is a $finish in the code.T)<03>shell<6C>stdout<75>stderr<72>r)<01>timeoutzutf-8<>)<03>out<75>err<72>haserror)<08>sp<73>Popen<65>PIPE<50> communicate<74>decode<64>
returncode<EFBFBD>TimeoutExpired<65>kill) <09>cmdr<00> timeouterror<6F>p<>out_reg<65>err_reg<65> error_existr
r s <20>3/home/zhang/CorrectBench/TBgen_App/utils/subproc.py<70> subproc_callr
s<><00><00>&n<03>pw<03>x<03>L<EFBFBD>
<EFBFBD><08><08><13>D<EFBFBD><12><17><17><12><17><17>A<>A<EFBFBD><10>G<EFBFBD><10>G<EFBFBD><13>K<EFBFBD> <18><14>=<3D>=<3D><17>=<3D>1<><08><03>S<EFBFBD><15>*<2A>*<2A>W<EFBFBD>%<25><07><15>*<2A>*<2A>W<EFBFBD>%<25><07><17>l<EFBFBD>l<EFBFBD> <0B> <1B>7<EFBFBD> <0B> D<>D<><44> <0E> <1C> <1C><18> <09><06><06><08><14><07><1E><07><17> <0B> <18>s<00>AB <00> )B7<03>6B7)<01>x)<04>__doc__<5F>
subprocessr r<00><00>r<00><module>r"s<00><01><04><18>"Er!