From: Michael Nolan Date: Tue, 28 Jan 2020 22:05:25 +0000 (-0500) Subject: Fix handling of the .sby file directory when running in the current dir X-Git-Tag: ls180-24jan2020~310 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91ce3042a2eebf84a68cdfc88fd0ece7213fc3fd;p=ieee754fpu.git Fix handling of the .sby file directory when running in the current dir --- 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: