//---------------------------------------------------------------------
-The unittests folder contains unit tests for OCPlatfrom and OCResource APIs.
+The unittests folder contains unit tests for C++ APIs.
It uses Google Test for the unit tests. Please note that the unit tests are
only to test the functionality of public APIs.
It is not a system or end-to-end test.
1. To run the unit test, first build the unit tests with the following command
- from <oic-resource>:
- make -f buildScript.mk linux_ub_unittests
+ from root 'iotivity' folder:
+ scons unittests
+ NOTE: Just running 'scons' from 'iotivity' folder will build the entire stack along
+ with unit tests.
-2. Run the unit test by issuing the following command from <oic-resource>:
- ./unittests/unittests
+2. Export LD_LIBRARY_PATH before running the unit tests.
+ Example:
+ export LD_LIBRARY_PATH=/home/tester/Documents/iotivity/extlibs/gtest/gtest-1.7.0/lib/.libs/
+
+3. Run the unit test by issuing the following command from root 'iotivity' folder:
+ ./out/<TARGET_OS>/<TARGET_ARCH>/<release/debug>/resource/unittests/unittests
+ Example: ./out/linux/x86_64/release/resource/unittests/unittests