1 //---------------------------------------------------------------------
2 // NOTICE - Transition to SCONS
3 //---------------------------------------------------------------------
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.
12 //---------------------------------------------------------------------
14 stacktests.cpp is a unit test of the APIs in ocstack.c.
15 It uses Google Test for the unit tests. Note that
16 the unit tests are only to test the functionality of
17 ocstack.c. It is not a system or end-to-end test.
19 Unit Test Requirements:
21 1. Install Google Test on a Linux build machine
22 2. Create a file called "local.properties" in the
23 root/csdk/stack/test. local.properties is used
24 by the makefile and specifies the path to the
25 Google Test directory on the build machine.
26 Since local.properties is specific to each build
27 system, do not add local.properties to the code repo.
29 local.properties should contain GTEST_DIR.
33 GTEST_DIR := /home/johndoe/utils/gtest-1.7.0
35 3. The unit test assumes that the "eth0" interface is
36 available. If not, the unit tests will FAIL.
37 4. To run the unit test, first build the C OCStack.
38 At the time of this writing this was done by running
40 root/csdk/make deepclean
41 root/csdk/make BUILD=release *default
42 root/csdk/make BUILD=debug
44 5. Next, build the ocstack
45 root/csdk/stack/test/make clean
46 root/csdk/stack/test/make BUILD=release *default
47 root/csdk/stack/test/make BUILD=debug
49 6. Run the unit test by
50 root/csdk/stack/test/release/stacktests
51 root/csdk/stack/test/debug/stacktests