From 9dc9ddc1bc9ae4cd25dafd0cc13191a313030919 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Thu, 15 Mar 2012 22:48:59 +0000 Subject: [PATCH] Fixed removal of the Matlab unit test output file --- test/SConscript | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/SConscript b/test/SConscript index a357e50ea..264976a13 100644 --- a/test/SConscript +++ b/test/SConscript @@ -79,7 +79,8 @@ def addMatlabTest(script, dependencies=None): matlabOptions = ['-nojvm','-nosplash','-wait'] else: matlabOptions = ['-nojvm','-nodisplay'] - os.remove(outfile) + if os.path.exists(outfile): + os.remove(outfile) code = subprocess.call([pjoin(env['matlab_path'], 'bin', 'matlab')] + matlabOptions + ['-r', runCommand], env=env['ENV'], cwd=Dir('#test/matlab').abspath)