Skip to content

Commit

Permalink
Another fix for Slice/errorDetection
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Feb 5, 2019
1 parent 52f1202 commit e9e8a21
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cpp/test/Slice/errorDetection/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ def runClientSide(self, current):
testdir = current.testsuite.getPath()
slice2cpp = SliceTranslator("slice2cpp")

if os.path.exists("tmp"):
shutil.rmtree("tmp")
os.mkdir("tmp")
outdir = "{0}/tmp".format(testdir)
if os.path.exists(outdir):
shutil.rmtree(outdir)
os.mkdir(outdir)

files = glob.glob("{0}/*.ice".format(testdir))
files.sort()
Expand Down Expand Up @@ -54,7 +55,7 @@ def runClientSide(self, current):
compiler.run(current, args=["forward/Forward.ice", "--output-dir", "tmp"])
current.writeln("ok")
finally:
if os.path.exists("{0}/tmp".format(testdir)):
shutil.rmtree("{0}/tmp".format(testdir))
if os.path.exists(outdir):
shutil.rmtree(outdir)

TestSuite(__name__, [ SliceErrorDetectionTestCase() ])

0 comments on commit e9e8a21

Please sign in to comment.