1 #******************************************************************
3 # Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
5 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
22 # 'unit_tests' script for building unit tests and libs
28 target_os = env.get('TARGET_OS')
30 if target_os in ['linux', 'windows', 'darwin', 'msys_nt']:
31 # Verify that 'google unit test' library is installed. If not,
32 # get it and install it
33 test_env = SConscript('#extlibs/gtest/SConscript')
35 if target_os in ['linux', 'windows']:
36 # Verify that 'hippomocks' mocking code is installed. If not,
37 # get it and install it
38 SConscript('#extlibs/hippomocks.scons')
40 # Build Common unit tests
41 SConscript('c_common/unittests/SConscript', 'test_env')
43 # Build C++ unit tests
44 SConscript('unittests/SConscript', 'test_env')
46 # Build Security Resource Manager and Provisioning API unit test
47 # TODO: Enable provisioning and associated unit tests for Windows
48 if (env.get('SECURED') == '1') and (target_os != 'windows'):
49 SConscript('provisioning/unittests/SConscript', 'test_env')
52 SConscript('csdk/unittests/SConscript', 'test_env')