From 91ce3042a2eebf84a68cdfc88fd0ece7213fc3fd Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Tue, 28 Jan 2020 17:05:25 -0500 Subject: [PATCH] Fix handling of the .sby file directory when running in the current dir --- src/ieee754/fpmax/formal/proof_fmax_mod.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ieee754/fpmax/formal/proof_fmax_mod.py b/src/ieee754/fpmax/formal/proof_fmax_mod.py index 24554bc5..37538315 100644 --- a/src/ieee754/fpmax/formal/proof_fmax_mod.py +++ b/src/ieee754/fpmax/formal/proof_fmax_mod.py @@ -104,8 +104,9 @@ def run_test(bits=32): il = rtlil.convert(m, ports=m.ports()) with open("proof.il", "w") as f: f.write(il) - dirs = os.path.split(__file__)[0] - p = subprocess.Popen(['sby', '-f', '%s/proof.sby' % dirs], + filedir = os.path.dirname(os.path.realpath(__file__)) + sbyfile = os.path.join(filedir, 'proof.sby') + p = subprocess.Popen(['sby', '-f', sbyfile], stdout=subprocess.PIPE, stderr=subprocess.PIPE) if p.wait() == 0: -- 2.30.2