From: David Antler Date: Wed, 15 Jun 2016 17:08:44 +0000 (-0700) Subject: Re-enable subset of provisioning unittests X-Git-Tag: 1.2.0+RC1~258^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e3e6b5732697be3716892e260b135aef39415a1;p=platform%2Fupstream%2Fiotivity.git Re-enable subset of provisioning unittests Some unit tests were added without comprehending Windows requirements. These must be disabled until the code is rewritten to be more cross-platform. Change-Id: I588d566e7fc43d135c088c63749b93c6776ca841 Signed-off-by: David Antler Reviewed-on: https://gerrit.iotivity.org/gerrit/8673 Tested-by: jenkins-iotivity Reviewed-by: Dave Thaler --- diff --git a/resource/csdk/security/provisioning/unittest/SConscript b/resource/csdk/security/provisioning/unittest/SConscript index dd3c3d8..c632e4c 100644 --- a/resource/csdk/security/provisioning/unittest/SConscript +++ b/resource/csdk/security/provisioning/unittest/SConscript @@ -86,22 +86,27 @@ if target_os in ['msys_nt', 'windows']: ###################################################################### # Source files and Targets ###################################################################### -unittest = sptest_env.Program('unittest', ['pmutilitytest.cpp', - 'secureresourceprovider.cpp', - 'provisioningdatabasemanager.cpp', - 'ocprovisioningmanager.cpp','otmunittest.cpp' ]) +unittest_src = ['pmutilitytest.cpp', + 'secureresourceprovider.cpp', + 'provisioningdatabasemanager.cpp', + 'ocprovisioningmanager.cpp', + ] -sample_server1 = sptest_env.Program('sample_server1', ['sampleserver1.cpp']) -sample_server2 = sptest_env.Program('sample_server2', ['sampleserver2.cpp']) +if target_os not in ['windows']: + unittest_src += [ 'otmunittest.cpp' ] -provisioning_unittest_src_dir = src_dir + '/resource/csdk/security/provisioning/unittest/' -provisioning_unittest_build_dir = env.get('BUILD_DIR') +'/resource/csdk/security/provisioning/unittest/' +unittest = sptest_env.Program('unittest', unittest_src) -Alias("test", [unittest, sample_server1, sample_server2]) +if target_os not in ['windows']: + sample_server1 = sptest_env.Program('sample_server1', ['sampleserver1.cpp']) + sample_server2 = sptest_env.Program('sample_server2', ['sampleserver2.cpp']) + Alias("test", [sample_server1, sample_server2]) + +Alias("test", [unittest]) env.AppendTarget('test') if env.get('TEST') == '1': - if target_os == 'linux': + if target_os in ['linux', 'windows']: out_dir = env.get('BUILD_DIR') result_dir = env.get('BUILD_DIR') + '/test_out/' if not os.path.isdir(result_dir): diff --git a/resource/unit_tests.scons b/resource/unit_tests.scons index b4be2de..50a38cc 100644 --- a/resource/unit_tests.scons +++ b/resource/unit_tests.scons @@ -72,6 +72,10 @@ elif target_os == 'windows' and env.get('TEST') == '1': # Build Security Resource Manager unit tests SConscript('csdk/security/unittest/SConscript') + # Build Provisioning API unit test + if env.get('SECURED') == '1': + SConscript('csdk/security/provisioning/unittest/SConscript') + elif target_os in ['darwin', 'msys_nt']: # Verify that 'google unit test' library is installed. If not, # get it and install it