Skip to content
Snippets Groups Projects
Commit a46a9198 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

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.
parent df580990
No related branches found
No related tags found
No related merge requests found
...@@ -383,6 +383,8 @@ ...@@ -383,6 +383,8 @@
killdaemons(entry) killdaemons(entry)
if self._threadtmp and not self._options.keep_tmpdir: 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) shutil.rmtree(self._threadtmp, True)
def setUp(self): def setUp(self):
...@@ -525,7 +527,7 @@ ...@@ -525,7 +527,7 @@
self._daemonpids = [] self._daemonpids = []
if not self._options.keep_tmpdir: 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 \ if (self._ret != 0 or self._out != self._refout) and not self._skipped \
and not self._options.debug and self._out: and not self._options.debug and self._out:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment