Created SConscripts for the C and C++ unit tests.
[platform/upstream/iotivity.git] / resource / unit_tests.scons
1 ##
2 # 'unit_test' script for building unit tests and libs
3 #
4 ##
5
6 import os
7
8 Import('env')
9
10 target_os = env.get('TARGET_OS')
11 src_dir = env.get('SRC_DIR')
12 build_dir = env.get('BUILD_DIR')
13
14
15 if target_os == 'linux':
16         # Verify that 'google unit test' library is installed.  If not,
17         # get it and install it
18         SConscript(src_dir + '/extlibs/gtest/SConscript')
19
20         # Verify that 'hippomocks' mocking code is installed.  If not,
21         # get it and install it
22         SConscript(src_dir + '/extlibs/hippomocks.scons')
23
24         # Build C unit tests
25         SConscript('csdk/stack/test/SConscript')
26
27         # Build C++ unit tests
28         SConscript('unittests/SConscript')
29
30