Skip to content

Commit

Permalink
rpc test: make frontend listen before launching yosys & introduce saf…
Browse files Browse the repository at this point in the history
…eguard if yosys errors
  • Loading branch information
nakengelhardt committed Mar 6, 2020
1 parent 8b074cc commit 88494e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/rpc/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 88494e8

Please sign in to comment.