X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=extlibs%2Fhippomocks.scons;h=412c6f20424dafe2b9ad4d505b80e8e56be0589d;hb=d639e6c572f273d236acc111e839e2d357942d19;hp=361225d8cf9cb43777763a35de0ff41cf494820b;hpb=349c5303322863ea2d4ffd92e516b38e513cfb19;p=platform%2Fupstream%2Fiotivity.git diff --git a/extlibs/hippomocks.scons b/extlibs/hippomocks.scons index 361225d..412c6f2 100644 --- a/extlibs/hippomocks.scons +++ b/extlibs/hippomocks.scons @@ -1,3 +1,23 @@ +#****************************************************************** +# +# Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= + ## # 'hippomocks' script to check if Hippo Mocks Unit Test library is installed. # If not, get it and install it @@ -12,14 +32,16 @@ target_os = env.get('TARGET_OS') src_dir = env.get('SRC_DIR') # Only verify/install on linux -if target_os == 'linux': - print '*** Checking for installation of hippomocks ***' +if target_os in ['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 = '8e210c5808d490b26fff69151c801fa28d291fcb' + 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) @@ -27,7 +49,10 @@ if target_os == 'linux': hippomocks_zip = hippomocks_zip_file # Unzip hippomocks - print 'Unzipping hippomocks' - env.UnpackAll(hippomocks_dir, hippomocks_zip) + print('Unzipping hippomocks') + env.UnpackAll(hippomocks_dir_src, hippomocks_zip) + print('Renaming hippomocks directory') + os.rename(hippomocks_dir_src, hippomocks_dir_dest) +