Fix failed unit tests for CSDK stack.
authorDoug Hudson <douglas.hudson@intel.com>
Mon, 12 Jan 2015 16:28:32 +0000 (11:28 -0500)
committerSudarshan Prasad <sudarshan.prasad@intel.com>
Thu, 22 Jan 2015 15:41:33 +0000 (15:41 +0000)
commit0a204e3c7f3272e3c08f81a6e53bb3b9ffb449c3
treedac513ffe325550afde661f1c8c3f6957f4c48be
parentba73120634accd7064bd9e201926574b2a7e7c7f
Fix failed unit tests for CSDK stack.

The existing unit tests in stacktests.cpp had not kept up with
ongoing modifications to the C API.  Modified failing tests to
align with latest C API functionality.

Also modified to remove limitation that required the eth0 network
interface to be available on the test machine.  If eth0 was not
available, some tests would fail.

Also added a local function to handle C stack initialization and
modified tests to call this function.  Added local functions to
intialize the number of expected resources and resource index
depending on whether presence is defined.

Re-grouped related test cases and created common group test names.

Change-Id: Ief59854d762ef9837f8b1d5b95bebc6514bd545a
Signed-off-by: Doug Hudson <douglas.hudson@intel.com>
(cherry picked from commit 15c4be36928eafe79176dfa785d832276a2a1c2a)
Reviewed-on: https://gerrit.iotivity.org/gerrit/213
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Sudarshan Prasad <sudarshan.prasad@intel.com>
resource/csdk/stack/test/README
resource/csdk/stack/test/stacktests.cpp