Commit 8db483bf by Tim Hatch Committed by Jared Roesch

Make tests multi-process friendly. (#3683)

This side effect at module import time has a race condition between the "exists" check and the "mkdir" call.  The safer thing is to just call mkdir and catch the "already exists" error which is what makedirs does.
parent b9544d78
......@@ -120,8 +120,8 @@ def download(url, path, overwrite=False, size_compare=False, verbose=1, retries=
TEST_DATA_ROOT_PATH = os.path.join(os.path.expanduser('~'), '.tvm_test_data')
if not os.path.exists(TEST_DATA_ROOT_PATH):
os.mkdir(TEST_DATA_ROOT_PATH)
os.makedirs(TEST_DATA_ROOT_PATH, exist_ok=True)
def download_testdata(url, relpath, module=None):
"""Downloads the test data from the internet.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment