2 # 'googletest' script to check if Google Unit Test library is installed. If not,
3 # get it and install it
11 target_os = env.get('TARGET_OS')
12 src_dir = env.get('SRC_DIR')
15 if target_os == 'linux':
16 print '*** Checking for installation of google unit test 1.7.0 ***'
18 gtest_dir = src_dir + '/extlibs/gtest/gtest-1.7.0'
19 gtest_zip_file = src_dir + '/extlibs/gtest/gtest-1.7.0.zip'
20 gtest_url = 'https://googletest.googlecode.com/files/gtest-1.7.0.zip'
22 if not os.path.exists(gtest_dir):
23 # If the gtest zip file is not already present, download it
24 if not os.path.exists(gtest_zip_file):
25 gtest_zip = env.Download(gtest_zip_file, gtest_url)
27 gtest_zip = gtest_zip_file
30 print 'Unzipping google unit test'
31 env.UnpackAll(gtest_dir, gtest_zip)
33 # Run configure on gtest
34 print 'Configuring google unit test'
35 env.Configure(gtest_dir, './configure')
38 print 'Making google unit test'
39 env.Configure(gtest_dir, 'make')