From e9e8a21c572af0761b69f7c30e7fc3592280bf46 Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 5 Feb 2019 19:03:04 +0100 Subject: [PATCH] Another fix for Slice/errorDetection --- cpp/test/Slice/errorDetection/test.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cpp/test/Slice/errorDetection/test.py b/cpp/test/Slice/errorDetection/test.py index 6f11921bd73..001543cb0e6 100644 --- a/cpp/test/Slice/errorDetection/test.py +++ b/cpp/test/Slice/errorDetection/test.py @@ -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() @@ -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() ])