From b7dbf9057993982020320b8015180928a0a8ebee Mon Sep 17 00:00:00 2001 From: Matthias Wachs Date: Mon, 8 Apr 2013 11:19:45 +0000 Subject: fix --- .../test_integration_clique_nat.py.in | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/integration-tests/test_integration_clique_nat.py.in b/src/integration-tests/test_integration_clique_nat.py.in index a457e8d83..d890928e8 100755 --- a/src/integration-tests/test_integration_clique_nat.py.in +++ b/src/integration-tests/test_integration_clique_nat.py.in @@ -49,9 +49,34 @@ check_timeout = 180 def cleanup (): - shutil.rmtree (os.path.join (tmp, "c_bootstrap_server"), True) - shutil.rmtree (os.path.join (tmp, "c_no_nat_client"), True) - shutil.rmtree (os.path.join (tmp, "c_nat_client"), True) + retries = 10 + path = os.path.join (tmp, "c_bootstrap_server") + test.p ("Removing " + path) + while ((os.path.exists(path)) and (retries > 0)): + shutil.rmtree ((path), False) + time.sleep (1) + retries -= 1 + if (os.path.exists(path)): + test.p ("Failed to remove " + path) + + retries = 10 + path = os.path.join (tmp, "c_no_nat_client") + test.p ("Removing " + path) + while ((os.path.exists(path)) and (retries > 0)): + shutil.rmtree ((path), False) + time.sleep (1) + retries -= 1 + if (os.path.exists(path)): + test.p ("Failed to remove " + path) + retries = 10 + path = os.path.join (tmp, "c_nat_client") + test.p ("Removing " + path) + while ((os.path.exists(path)) and (retries > 0)): + shutil.rmtree ((path), False) + time.sleep (1) + retries -= 1 + if (os.path.exists(path)): + test.p ("Failed to remove " + path) def success_cont (check): -- cgit v1.2.3