Skip to content

Commit 6489278

Browse files
committed
Fix race condition under windows for cmake tests
1 parent d47ce49 commit 6489278

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/test_other.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,12 @@ def check_makefile(configuration, dirname):
468468
self.assertTextDataIdentical(open(cmakelistsdir + '/out.txt', 'r').read().strip(), ret.strip())
469469
finally:
470470
os.chdir(path_from_root('tests')) # Move away from the directory we are about to remove.
471-
shutil.rmtree(tempdirname)
471+
#there is a race condition under windows here causing an exception in shutil.rmtree because the directory is not empty yet
472+
try:
473+
shutil.rmtree(tempdirname)
474+
except:
475+
time.sleep(0.1)
476+
shutil.rmtree(tempdirname)
472477

473478
def test_failure_error_code(self):
474479
for compiler in [EMCC, EMXX]:

0 commit comments

Comments
 (0)