Merge branch '1.3-rel' (9fa8739) 75/22475/2
authorGeorge Nash <george.nash@intel.com>
Thu, 14 Sep 2017 20:31:30 +0000 (13:31 -0700)
committerGeorge Nash <george.nash@intel.com>
Thu, 14 Sep 2017 20:31:30 +0000 (13:31 -0700)
Relate-to:
https://gerrit.iotivity.org/gerrit/22035
https://gerrit.iotivity.org/gerrit/21947
https://gerrit.iotivity.org/gerrit/21941
https://gerrit.iotivity.org/gerrit/21291
https://gerrit.iotivity.org/gerrit/21943
https://gerrit.iotivity.org/gerrit/21227
https://gerrit.iotivity.org/gerrit/21885
https://gerrit.iotivity.org/gerrit/22113
https://gerrit.iotivity.org/gerrit/22039
https://gerrit.iotivity.org/gerrit/22041
https://gerrit.iotivity.org/gerrit/21325

Conflicts:
resource/IPCA/unittests/SConscript
resource/csdk/security/unittest/oic_svr_db.json
resource/csdk/security/unittest/oic_unittest.dat
resource/provisioning/unittests/SConscript
resource/unittests/SConscript
service/notification/unittest/SConscript

Bug: https://jira.iotivity.org/browse/IOT-2453
Change-Id: I75cd5c596cfa0277a55dc3e51b5678184c03881d
Signed-off-by: George Nash <george.nash@intel.com>
15 files changed:
1  2 
build_common/SConscript
resource/IPCA/unittests/SConscript
resource/csdk/security/include/internal/crl_logging.h
resource/csdk/security/src/pstatresource.c
resource/csdk/security/src/rolesresource.c
resource/csdk/stack/src/occollection.c
resource/provisioning/unittests/SConscript
resource/unittests/SConscript
service/easy-setup/enrollee/unittests/SConscript
service/easy-setup/sampleapp/enrollee/linux/SConscript
service/easy-setup/sampleapp/mediator/linux/richsdk_sample/SConscript
service/notification/unittest/NSProviderTest.cpp
service/notification/unittest/SConscript
service/resource-encapsulation/src/resourceCache/unittests/SConscript
service/resource-encapsulation/unittests/SConscript

Simple merge
@@@ -55,13 -58,15 +60,15 @@@ ipcatest_env.AppendUnique(CPPPATH=
  ])
  
  ipcatest_env.PrependUnique(LIBS=[
-     'oc_logger_internal',
-     'octbstack',
-     'ipca_static'
- ])
+         'oc_logger_internal',
+         'octbstack',
+         'ipca_static',
+         'logger',
+         'c_common',
+         ])
  
  if use_iotivity == 1:
 -    ipcatest_env.PrependUnique(LIBS = [
 +    ipcatest_env.PrependUnique(LIBS=[
          'oc',
          'connectivity_abstraction',
          'coap',
              'mbedx509',
              'mbedcrypto',
              'ocprovision'
 -            ])
 +        ])
  
  if target_os in ['msys_nt', 'windows']:
 -    ipcatest_env.AppendUnique(LINKFLAGS = ['/subsystem:CONSOLE'])
 +    ipcatest_env.AppendUnique(LINKFLAGS=['/subsystem:CONSOLE'])
+     ipcatest_env.AppendUnique(LIBS=['win_helper'])
  
 +if ipcatest_env.get('MULTIPLE_OWNER') == '1':
 +    ipcatest_env.AppendUnique(CPPDEFINES=['MULTIPLE_OWNER'])
 +
 +if with_cloud:
 +    ipcatest_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
 +
  ######################################################################
  # Source files and Targets
  ######################################################################
@@@ -34,71 -34,65 +34,73 @@@ with_ra_ibb = provisiontests_env.get('W
  ######################################################################
  # Build flags
  ######################################################################
 -provisiontests_env.PrependUnique(CPPPATH = [
 -        '#/resource/include',
 -        '#/resource/c_common',
 -        '#/resource/c_common/oic_malloc/include',
 -        '#/resource/c_common/oic_string/include',
 -        '#/resource/oc_logger/include',
 -        '#/resource/csdk/include',
 -        '#/resource/csdk/stack/include',
 -        '#/resource/csdk/security/include',
 -        '#/resource/csdk/security/provisioning/include',
 -        '#/resource/csdk/security/provisioning/include/oxm',
 -        '#/resource/csdk/security/provisioning/include/internal',
 -        '#/resource/csdk/security/provisioning/include/cloud',
 -        '#/resource/csdk/stack/include/internal',
 -        '#/resource/csdk/connectivity/api',
 -        '#/resource/csdk/connectivity/inc/pkix',
 -        '#/resource/csdk/connectivity/external/inc',
 -        '#/resource/csdk/ocsocket/include',
 -        '#/resource/csdk/ocrandom/include',
 -        '#/resource/csdk/logger/include',
 -        '#/resource/csdk/connectivity/lib/libcoap-4.1.1/include',
 -        '#/extlibs/hippomocks/hippomocks',
 -        ])
 +provisiontests_env.PrependUnique(CPPPATH=[
-     '../../include',
-     '../../oc_logger/include',
-     '../../csdk/include',
-     '../../csdk/stack/include',
-     '../../csdk/security/include',
-     '../../csdk/security/provisioning/include',
-     '../../csdk/security/provisioning/include/oxm',
-     '../../csdk/security/provisioning/include/internal',
-     '../../csdk/security/provisioning/include/cloud',
-     '../../csdk/stack/include/internal',
-     '../../csdk/connectivity/api',
-     '../../csdk/connectivity/inc/pkix',
-     '../../csdk/connectivity/external/inc',
-     '../../csdk/ocsocket/include',
-     '../../csdk/ocrandom/include',
-     '../../csdk/logger/include',
-     '../../csdk/connectivity/lib/libcoap-4.1.1/include',
-     '../../../extlibs/hippomocks/hippomocks/',
-     '../../../extlibs/hippomocks/hippomocks/'
- ])
++    '#/resource/include',
++    '#/resource/c_common',
++    '#/resource/c_common/oic_malloc/include',
++    '#/resource/c_common/oic_string/include',
++    '#/resource/oc_logger/include',
++    '#/resource/csdk/include',
++    '#/resource/csdk/stack/include',
++    '#/resource/csdk/security/include',
++    '#/resource/csdk/security/provisioning/include',
++    '#/resource/csdk/security/provisioning/include/oxm',
++    '#/resource/csdk/security/provisioning/include/internal',
++    '#/resource/csdk/security/provisioning/include/cloud',
++    '#/resource/csdk/stack/include/internal',
++    '#/resource/csdk/connectivity/api',
++    '#/resource/csdk/connectivity/inc/pkix',
++    '#/resource/csdk/connectivity/external/inc',
++    '#/resource/csdk/ocsocket/include',
++    '#/resource/csdk/ocrandom/include',
++    '#/resource/csdk/logger/include',
++    '#/resource/csdk/connectivity/lib/libcoap-4.1.1/include',
++    '#/extlibs/hippomocks/hippomocks',
++    ])
  
  if target_os in ['windows']:
      # Non-Windows platforms find the boost headers under /usr/include or similar path.
 -    provisiontests_env.AppendUnique(CPPPATH = ['#extlibs/boost/boost'])
 +    provisiontests_env.AppendUnique(CPPPATH=['#extlibs/boost/boost'])
  
-     provisiontests_env.AppendUnique(LIBS=['sqlite3'])
+     provisiontests_env.AppendUnique(LIBS=['sqlite3', 'win_helper'])
  elif target_os in ['tizen', 'linux']:
 -    provisiontests_env.ParseConfig('pkg-config --cflags --libs sqlite3 gobject-2.0 gio-2.0 glib-2.0')
 +    provisiontests_env.ParseConfig(
 +        'pkg-config --cflags --libs sqlite3 gobject-2.0 gio-2.0 glib-2.0')
  
 -provisiontests_env.PrependUnique(LIBS = [
 -        'ocprovision',
 -        'oc',
 -        'ocpmapi_internal',
 -        'octbstack_internal',
 -        'routingmanager',
 -        'oc_logger_internal',
 -        'logger',
 -        'connectivity_abstraction_internal',
 -        'coap',
 -        'ocsrm',
 -        'routingmanager',
 -        'c_common',
 -        ])
 +provisiontests_env.PrependUnique(LIBS=[
 +    'ocprovision',
 +    'oc',
 +    'ocpmapi_internal',
 +    'octbstack_internal',
 +    'routingmanager',
 +    'oc_logger_internal',
++    'logger',
 +    'connectivity_abstraction_internal',
 +    'coap',
-     'ocsrm'
- ])
++    'ocsrm',
++    'routingmanager',
++    'c_common',
++    ])
  
  if with_ra_ibb:
 -    provisiontests_env.AppendUnique(LIBS = provisiontests_env['RALIBS'], LIBPATH = provisiontests_env['RALIBPATH'], RPATH = provisiontests_env['RARPATH'])
 +    provisiontests_env.AppendUnique(
 +        LIBS=provisiontests_env['RALIBS'],
 +        LIBPATH=provisiontests_env['RALIBPATH'],
 +        RPATH=provisiontests_env['RARPATH'])
      print "RALIBS = %s" % provisiontests_env['RALIBS']
      print "RALIBPATH = %s" % provisiontests_env['RALIBPATH']
      print "RARPATH = %s" % provisiontests_env['RARPATH']
 -else :
 +else:
      if with_ra:
 -        provisiontests_env.AppendUnique(LIBS = ['ra_xmpp'])
 +        provisiontests_env.AppendUnique(LIBS=['ra_xmpp'])
  
  if provisiontests_env.get('SECURED') == '1':
 -    provisiontests_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509','mbedcrypto'])
 +    provisiontests_env.AppendUnique(LIBS=[
 +        'mbedtls',
 +        'mbedx509',
 +        'mbedcrypto'
 +    ])
  
- if provisiontests_env.get('LOGGING'):
-     provisiontests_env.AppendUnique(CPPDEFINES=['TB_LOG'])
  ######################################################################
  # Source files and Targets
  ######################################################################
@@@ -33,25 -33,30 +33,30 @@@ with_mq = unittests_env.get('WITH_MQ'
  ######################################################################
  # Build flags
  ######################################################################
 -unittests_env.PrependUnique(CPPPATH = [
 -        '#/resource/include',
 -        '#/resource/oc_logger/include',
 -        '#/resource/csdk/include',
 -        '#/resource/csdk/stack/include',
 -        '#/resource/csdk/security/include',
 -        '#/resource/csdk/stack/include/internal',
 -        '#/resource/csdk/connectivity/api',
 -        '#/resource/csdk/connectivity/external/inc',
 -        '#/resource/csdk/ocsocket/include',
 -        '#/resource/c_common',
 -        '#/resource/c_common/ocrandom/include',
 -        '#/resource/c_common/octhread/include',
 -        '#/resource/c_common/oic_malloc/include',
 -        '#/resource/c_common/oic_string/include',
 -        '#/resource/c_common/oic_time/include',
 -        '#/resource/csdk/logger/include',
 -        '#/extlibs/hippomocks/hippomocks',
 -        ])
 +unittests_env.PrependUnique(CPPPATH=[
-     '../include',
-     '../oc_logger/include',
-     '../csdk/include',
-     '../csdk/stack/include',
-     '../csdk/security/include',
-     '../csdk/stack/include/internal',
-     '../csdk/connectivity/api',
-     '../csdk/connectivity/external/inc',
-     '../csdk/ocsocket/include',
-     '../c_common/ocrandom/include',
-     '../csdk/logger/include',
++    '#/resource/include',
++    '#/resource/oc_logger/include',
++    '#/resource/csdk/include',
++    '#/resource/csdk/stack/include',
++    '#/resource/csdk/security/include',
++    '#/resource/csdk/stack/include/internal',
++    '#/resource/csdk/connectivity/api',
++    '#/resource/csdk/connectivity/external/inc',
++    '#/resource/csdk/ocsocket/include',
++    '#/resource/c_common',
++    '#/resource/c_common/ocrandom/include',
++    '#/resource/c_common/octhread/include',
++    '#/resource/c_common/oic_malloc/include',
++    '#/resource/c_common/oic_string/include',
++    '#/resource/c_common/oic_time/include',
++    '#/resource/csdk/logger/include',
 +    '#/extlibs/hippomocks/hippomocks',
- ])
++    ])
  
  if target_os in ['windows']:
      # Non-Windows platforms find the boost headers under /usr/include or similar path.
-     unittests_env.AppendUnique(CPPPATH=['#/extlibs/boost/boost'])
-     unittests_env.AppendUnique(LIBS=['sqlite3'])
 -    unittests_env.AppendUnique(CPPPATH = ['#extlibs/boost/boost'])
++    unittests_env.AppendUnique(CPPPATH=['#extlibs/boost/boost'])
+     unittests_env.AppendUnique(LIBS=['sqlite3', 'win_helper'])
  
      if unittests_env['CC'] == 'cl':
          # Fix for: resource\unittests\OCRepresentationEncodingTest.cpp "fatal error C1128:
@@@ -67,22 -71,21 +72,21 @@@ unittests_env.PrependUnique(LIBS=
      'ocsrm',
      'routingmanager',
      'oc_logger_internal',
+     'logger',
      'connectivity_abstraction_internal',
      'coap',
+     'c_common',
  ])
  
+ if target_os in ['linux', 'tizen']:
+     unittests_env.AppendUnique(LIBS = ['rt'])
  if unittests_env.get('SECURED') == '1':
 -    unittests_env.AppendUnique(LIBS = ['mbedtls', 'mbedx509'])
 +    unittests_env.AppendUnique(LIBS=['mbedtls', 'mbedx509'])
  
  # c_common calls into mbedcrypto.
 -unittests_env.AppendUnique(LIBS = ['mbedcrypto'])
 +unittests_env.AppendUnique(LIBS=['mbedcrypto'])
  
- if unittests_env.get('LOGGING'):
-     unittests_env.AppendUnique(CPPDEFINES=['TB_LOG'])
- if unittests_env.get('WITH_CLOUD'):
-     unittests_env.AppendUnique(CPPDEFINES=['WITH_CLOUD'])
  ######################################################################
  # Source files and Targets
  ######################################################################
@@@ -66,11 -60,11 +60,12 @@@ if target_os not in ['windows', 'winrt'
          CXXFLAGS=['-O2', '-g', '-Wall', '-fmessage-length=0', '-std=c++0x'])
  
  notification_test_env.AppendUnique(LINKFLAGS=['-Wl,--no-as-needed'])
- notification_test_env.AppendUnique(CXXFLAGS=['-pthread'])
- notification_test_env.AppendUnique(LIBS=['pthread'])
+ notification_test_env.AddPthreadIfNeeded()
  
  notification_test_env.PrependUnique(CPPPATH=[
 +    '#/extlibs/hippomocks/hippomocks',
      '../include',
      '../src/consumer',
      '../src/provider',