Repo Merge: Moving resource API down a directory
[platform/upstream/iotivity.git] / resource / unittests / README
1 tests.cpp contains unittests for C++ APIs. It uses Google Test for the unit
2 tests.  Note that the unit tests are only to test the functionality of OCApi.h.
3 It is not a system or end-to-end test.
4
5 Unit Test Requirements:
6
7 1. Install Google Test 1.7.0 on a Linux build machine to <gtest-1.7.0> from the
8    following address:
9
10         http://code.google.com/p/googletest/downloads/list
11
12 2. Create/Append a file named "local.properties" at <oic-resource>/csdk.
13    "local.properties" is used by the build process to specify the path to the
14    Google Test directory.
15
16    local.properties should contain GTEST_DIR, as follows:
17
18    GTEST_DIR := <gtest-1.7.0>
19
20 3. To run the unit test, first build the unit tests with the following command
21    from <oic-resource>:
22
23    make -f buildScript.mk linux_ub_unittests
24
25 4. Run the unit test by issuing the following command from <oic-resource>:
26
27    ./unittests/tests