From: N. Engelhardt Date: Fri, 6 Mar 2020 14:29:01 +0000 (+0100) Subject: rpc test: make frontend listen before launching yosys & introduce safeguard if yosys... X-Git-Tag: working-ls180~770^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88494e81f51630b08b045cd006ec3b38b27ff99f;p=yosys.git rpc test: make frontend listen before launching yosys & introduce safeguard if yosys errors --- diff --git a/tests/rpc/frontend.py b/tests/rpc/frontend.py index eace07bf9..8cbec5682 100644 --- a/tests/rpc/frontend.py +++ b/tests/rpc/frontend.py @@ -83,10 +83,11 @@ def main(): if args.mode == "unix-socket": sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + sock.settimeout(30) sock.bind(args.path) try: - ys_proc = subprocess.Popen(["../../yosys", "-ql", "unix.log", "-p", "connect_rpc -path {}; read_verilog design.v; hierarchy -top top; flatten; select -assert-count 1 t:$neg".format(args.path)]) sock.listen(1) + ys_proc = subprocess.Popen(["../../yosys", "-ql", "unix.log", "-p", "connect_rpc -path {}; read_verilog design.v; hierarchy -top top; flatten; select -assert-count 1 t:$neg".format(args.path)]) conn, addr = sock.accept() file = conn.makefile("rw") while True: