Jira Issue-964: Add more types for OCEntityHandlerResult
[platform/upstream/iotivity.git] / resource / unittests / README
1 //---------------------------------------------------------------------
2 // NOTICE - Transition to SCONS
3 //---------------------------------------------------------------------
4
5 The IoTivity build system is transitioning to SCONS. Although the
6 makefiles are still available (until v1.0) and some developers are
7 still using them, they are currently no longer supported. To learn more
8 about building using SCONS see Readme.scons.txt in the repository root
9 directory. The build steps used in continuous integration can be found
10 in auto_build.sh which is also in the the repository root directory.
11
12 To dynamically link with the Google Unit test library,
13 add <src_dir>/extlibs/gtest/gtest-1.7.0/lib/.libs/ to LD_LIBRARY_PATH
14
15 //---------------------------------------------------------------------
16
17 The unittests folder contains unit tests for C++ APIs.
18 It uses Google Test for the unit tests. Please note that the unit tests are
19 only to test the functionality of public APIs.
20 It is not a system or end-to-end test.
21
22 1. To run the unit test, first build the unit tests with the following command
23    from root 'iotivity' folder:
24    scons unittests
25    NOTE: Just running 'scons' from 'iotivity' folder will build the entire stack along
26    with unit tests.
27
28 2. Export LD_LIBRARY_PATH before running the unit tests.
29    Example:
30    export LD_LIBRARY_PATH=/home/tester/Documents/iotivity/extlibs/gtest/gtest-1.7.0/lib/.libs/
31
32 3. Run the unit test by issuing the following command from root 'iotivity' folder:
33    ./out/<TARGET_OS>/<TARGET_ARCH>/<release/debug>/resource/unittests/unittests
34    Example: ./out/linux/x86_64/release/resource/unittests/unittests
35