Disable test data downloading by default (#193)

This commit is contained in:
Changming Sun 2018-12-17 11:56:29 -08:00 committed by Pranav Sharma
parent 383315a7e0
commit b418adff42

View file

@ -209,8 +209,8 @@ def download_test_data(build_dir, src_url, expected_md5, azure_sas_key):
elif shutil.which('curl'):
subprocess.run(['curl', '-s', src_url, '-o', local_zip_file], check=True)
else:
log.error("No downloading tool for use")
return False
import urllib.request
urllib.request.urlretrieve(src_url, local_zip_file)
models_dir = os.path.join(build_dir,'models')
if os.path.exists(models_dir):
log.info('deleting %s' % models_dir)
@ -226,7 +226,9 @@ def download_test_data(build_dir, src_url, expected_md5, azure_sas_key):
return True
def generate_build_tree(cmake_path, source_dir, build_dir, cuda_home, cudnn_home, pb_home, configs, cmake_extra_defines, args, cmake_extra_args):
has_test_data = download_test_data(build_dir, test_data_url, test_data_checksum, args.azure_sas_key)
has_test_data = False
if args.enable_onnx_tests:
has_test_data = download_test_data(build_dir, test_data_url, test_data_checksum, args.azure_sas_key)
#create a shortcut for test models if there is a 'models' folder in build_dir
if has_test_data and is_windows():
src_model_dir = os.path.join(build_dir, 'models')