changeset 21461:a46a91989d57

run-tests: ignore failures from rmtree rmtree() may fail under certain conditions. We ignore failures at the individual test level because they can interfere with test execution. Furthermore, we'll reattempt deletion in the high-level test runner after all tests have finished. Note that this patch is not a code refactor like most of the patches before it. This change logically makes sense given the execution behavior of the tests.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 20 Apr 2014 16:54:51 -0700
parents df580990507e
children 8a4ef661f08d
files tests/run-tests.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Sun Apr 20 16:53:49 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 16:54:51 2014 -0700
@@ -383,6 +383,8 @@
             killdaemons(entry)
 
         if self._threadtmp and not self._options.keep_tmpdir:
+            # Ignore failures here. The rmtree() in the higher level runner
+            # will try again.
             shutil.rmtree(self._threadtmp, True)
 
     def setUp(self):
@@ -525,7 +527,7 @@
         self._daemonpids = []
 
         if not self._options.keep_tmpdir:
-            shutil.rmtree(self._testtmp)
+            shutil.rmtree(self._testtmp, True)
 
         if (self._ret != 0 or self._out != self._refout) and not self._skipped \
             and not self._options.debug and self._out: