diff options
author | Jose <jose@zeroc.com> | 2018-03-13 17:20:53 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-03-13 17:24:37 +0100 |
commit | ba34e088539c612d2f5e215f5e93c1031b22dd4e (patch) | |
tree | 524448078a0ff307ef0b3f45a735b697520199c8 /cpp/test | |
parent | Reverted bogus change from previous commit (diff) | |
download | ice-ba34e088539c612d2f5e215f5e93c1031b22dd4e.tar.bz2 ice-ba34e088539c612d2f5e215f5e93c1031b22dd4e.tar.xz ice-ba34e088539c612d2f5e215f5e93c1031b22dd4e.zip |
Fix Slice/headers test fail when using a NFS volume
Diffstat (limited to 'cpp/test')
-rw-r--r-- | cpp/test/Slice/headers/test.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/cpp/test/Slice/headers/test.py b/cpp/test/Slice/headers/test.py index e45ce8c68a1..54afc982e57 100644 --- a/cpp/test/Slice/headers/test.py +++ b/cpp/test/Slice/headers/test.py @@ -145,8 +145,20 @@ class SliceHeadersTestCase(ClientTestCase): if os.path.lexists(f): os.unlink(f) - if os.path.exists("project1"): shutil.rmtree("project1") - if os.path.exists("tmp"): shutil.rmtree("tmp") + # + # rmtree can fail when tests are running from a NFS volumen + # with an error like: + # + # Device or resource busy: 'project1/.nfs00000000006216b500000024' + # + try: + if os.path.exists("project1"): shutil.rmtree("project1") + except: + pass + try: + if os.path.exists("tmp"): shutil.rmtree("tmp") + except: + pass if not isinstance(platform, Windows): TestSuite(__name__, [ SliceHeadersTestCase() ], chdir=True) |