From ba34e088539c612d2f5e215f5e93c1031b22dd4e Mon Sep 17 00:00:00 2001 From: Jose Date: Tue, 13 Mar 2018 17:20:53 +0100 Subject: Fix Slice/headers test fail when using a NFS volume --- cpp/test/Slice/headers/test.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'cpp/test/Slice/headers/test.py') 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) -- cgit v1.2.3