rsc-enc: Removing redundant env configuration
authorPawel Winogrodzki <pawelwi@microsoft.com>
Tue, 15 Aug 2017 19:49:07 +0000 (12:49 -0700)
committerMats Wichmann <mats@linux.com>
Sun, 27 Aug 2017 13:34:53 +0000 (13:34 +0000)
Moving global environment configuration common for all
platforms into build_common/SConscript and removing repeated
lines from service/resource-encapsulation/*.

Bug: https://jira.iotivity.org/browse/IOT-1583
Change-Id: Id3ee5108c07fa22c77dd5998d7b311fbd6fed491
Signed-off-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21943
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Mats Wichmann <mats@linux.com>
service/resource-encapsulation/src/resourceBroker/unittest/SConscript
service/resource-encapsulation/src/resourceCache/unittests/SConscript
service/resource-encapsulation/unittests/SConscript

index 2e66098..5c167c7 100644 (file)
@@ -22,7 +22,6 @@
 # ResourceBroker Unit Test build script
 ##
 # SConscript file for Local PKI google tests
-
 from tools.scons.RunTest import run_test
 
 gtest_env = SConscript('#extlibs/gtest/SConscript')
@@ -30,13 +29,9 @@ lib_env = gtest_env.Clone()
 
 if lib_env.get('RELEASE'):
     lib_env.AppendUnique(CCFLAGS=['-Os'])
-    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     lib_env.AppendUnique(CCFLAGS=['-g'])
 
-if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
 SConscript('#service/third_party_libs.scons', 'lib_env')
 
 ######################################################################
@@ -57,6 +52,9 @@ broker_test_env.AppendUnique(CPPPATH=[
     '../../common/expiryTimer/include',
     '../../common/expiryTimer/src',
     '../../common/utils/include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/csdk/include',
     '#/resource/csdk/stack/include',
     '#/resource/include',
@@ -64,7 +62,6 @@ broker_test_env.AppendUnique(CPPPATH=[
 ])
 
 broker_test_env.PrependUnique(CPPPATH=['#/extlibs/hippomocks/hippomocks'])
-broker_test_env.AppendUnique(LIBPATH=[broker_test_env.get('BUILD_DIR')])
 
 broker_test_env.PrependUnique(LIBS=['coap'])
 broker_test_env.AppendUnique(LIBS=[
index 1d79377..bf36f98 100644 (file)
@@ -22,7 +22,6 @@
 # ResourceCache Unit Test build script
 ##
 # SConscript file for Local PKI google tests
-
 from tools.scons.RunTest import run_test
 
 gtest_env = SConscript('#extlibs/gtest/SConscript')
@@ -30,13 +29,9 @@ lib_env = gtest_env.Clone()
 
 if lib_env.get('RELEASE'):
     lib_env.AppendUnique(CCFLAGS=['-Os'])
-    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     lib_env.AppendUnique(CCFLAGS=['-g'])
 
-if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
 SConscript('#service/third_party_libs.scons', 'lib_env')
 
 ######################################################################
@@ -56,13 +51,15 @@ cache_test_env.AppendUnique(CPPPATH=[
     '../../common/expiryTimer/include',
     '../../common/expiryTimer/src',
     '../../common/utils/include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/csdk/include',
     '#/resource/csdk/stack/include',
     '#/resource/include',
     '#/resource/oc_logger/include'
 ])
 cache_test_env.PrependUnique(CPPPATH=['#/extlibs/hippomocks/hippomocks'])
-cache_test_env.AppendUnique(LIBPATH=[cache_test_env.get('BUILD_DIR')])
 cache_test_env.PrependUnique(LIBS=[
     'rcs_client',
     'rcs_common',
index 06813a8..70012b2 100644 (file)
@@ -28,17 +28,14 @@ from tools.scons.RunTest import run_test
 
 gtest_env = SConscript('#extlibs/gtest/SConscript')
 lib_env = gtest_env.Clone()
+
 target_os = lib_env.get('TARGET_OS')
 
 if lib_env.get('RELEASE'):
     lib_env.AppendUnique(CCFLAGS=['-Os'])
-    lib_env.AppendUnique(CPPDEFINES=['NDEBUG'])
 else:
     lib_env.AppendUnique(CCFLAGS=['-g'])
 
-if lib_env.get('LOGGING'):
-    lib_env.AppendUnique(CPPDEFINES=['TB_LOG'])
-
 # Add third party libraries
 SConscript('#service/third_party_libs.scons', 'lib_env')
 
@@ -60,6 +57,9 @@ rcs_test_env.AppendUnique(CPPPATH=[
     '#/extlibs/hippomocks/hippomocks',
     '../include',
     '../src/common/utils/include',
+    '#/resource/c_common',
+    '#/resource/c_common/oic_malloc/include',
+    '#/resource/c_common/oic_string/include',
     '#/resource/csdk/include',
     '#/resource/csdk/stack/include',
     '#/resource/include',