# HG changeset patch # User Doug Simon # Date 1363876591 -3600 # Node ID 87346100d7a5791115eb084439f30403b213c1ba # Parent 8ed80723c13b6a661c42b19a06d0c7a00e15c3d2 temporary file is removed when unittests fail diff -r 8ed80723c13b -r 87346100d7a5 mx/commands.py --- a/mx/commands.py Thu Mar 21 14:38:35 2013 +0100 +++ b/mx/commands.py Thu Mar 21 15:36:31 2013 +0100 @@ -761,8 +761,10 @@ prefixArgs = ['-XX:-BootstrapGraal', '-esa', '-ea'] vm(prefixArgs + vmArgs + ['-cp', projectscp + ':' + mxdir, name] + [testfile]) - _run_tests(args, harness, annotations, testfile) - os.remove(testfile) + try: + _run_tests(args, harness, annotations, testfile) + finally: + os.remove(testfile) def unittest(args): """run the JUnit tests (all testcases)