From 731c19843396f16b970a219e283e720391259593 Mon Sep 17 00:00:00 2001 From: Doug Hudson Date: Mon, 9 Mar 2015 16:21:23 -0400 Subject: [PATCH] Fix error in downloading hippomocks library. Apparently, the filename of the hippomocks library zip file that is downloaded from the github changed from 'master.zip' to 'hippomocks-master.zip' since the hippomocks.scons script was created. This modification uses a SHA hash to download a specific version of the hippomocks library. Change-Id: Iaa3b523b11c35a918a0a3de22876f2d62f339372 Signed-off-by: Doug Hudson Reviewed-on: https://gerrit.iotivity.org/gerrit/454 Tested-by: jenkins-iotivity Reviewed-by: Joseph Morrow Reviewed-by: Sachin Agrawal Reviewed-by: Sudarshan Prasad --- extlibs/hippomocks.scons | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/extlibs/hippomocks.scons b/extlibs/hippomocks.scons index 361225d..9c59d82 100644 --- a/extlibs/hippomocks.scons +++ b/extlibs/hippomocks.scons @@ -15,11 +15,13 @@ src_dir = env.get('SRC_DIR') if target_os == 'linux': print '*** Checking for installation of hippomocks ***' - hippomocks_dir = src_dir + '/extlibs/hippomocks-master' - hippomocks_zip_file = src_dir + '/extlibs/master.zip' - hippomocks_url = 'https://github.com/dascandy/hippomocks/archive/master.zip' + hippomocks_sha = '2f40aa11e31499432283b67f9d3449a3cd7b9c4d' + hippomocks_dir_src = src_dir + '/extlibs/hippomocks-' + hippomocks_sha + hippomocks_dir_dest = src_dir + '/extlibs/hippomocks-master' + hippomocks_zip_file = src_dir + '/extlibs/hippomocks-' + hippomocks_sha + '.zip' + hippomocks_url = 'https://github.com/dascandy/hippomocks/archive/' + hippomocks_sha + '.zip' - if not os.path.exists(hippomocks_dir): + if not os.path.exists(hippomocks_dir_dest): # If the hippomocks zip file is not already present, download it if not os.path.exists(hippomocks_zip_file): hippomocks_zip = env.Download(hippomocks_zip_file, hippomocks_url) @@ -28,6 +30,8 @@ if target_os == 'linux': # Unzip hippomocks print 'Unzipping hippomocks' - env.UnpackAll(hippomocks_dir, hippomocks_zip) + env.UnpackAll(hippomocks_dir_src, hippomocks_zip) + print 'Renaming hippomocks directory' + os.rename(hippomocks_dir_src, hippomocks_dir_dest) -- 2.7.4