Merge test folder of test branch 98/27798/2
authorMushfiqul Islam Antu <i.mushfiq@samsung.com>
Thu, 27 Dec 2018 06:41:57 +0000 (12:41 +0600)
committerMushfiqul Islam <mmiantu@gmail.com>
Mon, 31 Dec 2018 04:52:20 +0000 (04:52 +0000)
This patch enables all test activities and commits to be
maintained from master branch, instead of test branch.

Change-Id: I2d9123dbd605f0e91eb6d91282057de8735b20a7
Signed-off-by: Mushfiqul Islam Antu <i.mushfiq@samsung.com>
854 files changed:
test/.project [new file with mode: 0644]
test/IUT_README [new file with mode: 0644]
test/SConstruct [new file with mode: 0644]
test/astyle-cpp-format.sh [new file with mode: 0755]
test/astyle-java-format.sh [new file with mode: 0755]
test/build/SConscript [new file with mode: 0755]
test/build/android/SConscript [new file with mode: 0755]
test/build/android/build.gradle [new file with mode: 0755]
test/build/android/ca/gtest/jni/Android.mk [new file with mode: 0644]
test/build/android/ca/gtest/jni/Application.mk [new file with mode: 0755]
test/build/android/ca/gtest/native_build.sh [new file with mode: 0755]
test/build/android/ca/junit/jni/Android.mk [new file with mode: 0755]
test/build/android/ca/junit/jni/Application.mk [new file with mode: 0755]
test/build/android/ca/junit/native_build.sh [new file with mode: 0755]
test/build/android/iut/jni/Android.mk [new file with mode: 0755]
test/build/android/iut/jni/Application.mk [new file with mode: 0755]
test/build/android/iut/native_build.sh [new file with mode: 0755]
test/build/android/lib_maker.sh [new file with mode: 0755]
test/build/arduino/SConscript [new file with mode: 0644]
test/build/arduino/arduino.scons [new file with mode: 0644]
test/build/arduino/config.scons [new file with mode: 0644]
test/build/configuration.scons [new file with mode: 0644]
test/build/java/SConscript [new file with mode: 0755]
test/build/java/build.gradle [new file with mode: 0755]
test/build/linux/SConscript [new file with mode: 0755]
test/build/linux/SConscriptCA [new file with mode: 0755]
test/build/linux/SConscriptCHP [new file with mode: 0644]
test/build/linux/SConscriptCS [new file with mode: 0644]
test/build/linux/SConscriptCSC [new file with mode: 0644]
test/build/linux/SConscriptCSCPP [new file with mode: 0644]
test/build/linux/SConscriptCloud [new file with mode: 0644]
test/build/linux/SConscriptES [new file with mode: 0644]
test/build/linux/SConscriptIC [new file with mode: 0644]
test/build/linux/SConscriptIUT [new file with mode: 0644]
test/build/linux/SConscriptNS [new file with mode: 0644]
test/build/linux/SConscriptPM [new file with mode: 0644]
test/build/linux/SConscriptRC [new file with mode: 0644]
test/build/linux/SConscriptRD [new file with mode: 0644]
test/build/linux/SConscriptRE [new file with mode: 0644]
test/build/linux/SConscriptRI [new file with mode: 0644]
test/build/linux/SConscriptSK [new file with mode: 0644]
test/build/linux/SConscriptSM [new file with mode: 0644]
test/build/linux/SConscriptTAF [new file with mode: 0755]
test/build/tizen/SConscript [new file with mode: 0755]
test/build/tizen/ca/SConstruct [new file with mode: 0755]
test/build/tizen/common/com.oic.common.test.manifest [new file with mode: 0644]
test/build/tizen/common/com.oic.common.test.spec [new file with mode: 0755]
test/build/tizen/common/com.oic.common.test.xml [new file with mode: 0644]
test/build/tizen/common/gbsbuild.sh [new file with mode: 0644]
test/build/tizen/cs/SConstruct [new file with mode: 0755]
test/build/tizen/es/SConstruct [new file with mode: 0755]
test/build/tizen/ic/SConstruct [new file with mode: 0644]
test/build/tizen/iut/SConstruct [new file with mode: 0755]
test/build/tizen/pm/SConstruct [new file with mode: 0755]
test/build/tizen/rc/SConstruct [new file with mode: 0644]
test/build/tizen/re/SConstruct [new file with mode: 0755]
test/build/tizen/ri/SConstruct [new file with mode: 0755]
test/build/windows/SConscript [new file with mode: 0644]
test/build/windows/SConscriptCA [new file with mode: 0644]
test/build/windows/SConscriptES [new file with mode: 0644]
test/build/windows/SConscriptIUT [new file with mode: 0644]
test/build/windows/SConscriptPM [new file with mode: 0644]
test/build/windows/SConscriptRD [new file with mode: 0644]
test/build/windows/SConscriptRE [new file with mode: 0644]
test/build/windows/SConscriptRI [new file with mode: 0644]
test/build/windows/SConscriptSK [new file with mode: 0644]
test/extlibs/.project [new file with mode: 0755]
test/extlibs/ArduinoUnit/ArduinoUnit.h [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/advanced/advanced.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/basic/basic.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/continuous/continuous.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/digital_pin_test/digital_pin_test.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/filter/filter.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/examples/verbosity/verbosity.ino [new file with mode: 0755]
test/extlibs/ArduinoUnit/keywords.txt [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/ArduinoUnit.cpp [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/ArduinoUnit.d [new file with mode: 0644]
test/extlibs/ArduinoUnit/utility/FakeStream.cpp [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/FakeStream.d [new file with mode: 0644]
test/extlibs/ArduinoUnit/utility/FakeStream.h [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/FakeStreamBuffer.cpp [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/FakeStreamBuffer.d [new file with mode: 0644]
test/extlibs/ArduinoUnit/utility/FakeStreamBuffer.h [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/FreeMemory.cpp [new file with mode: 0755]
test/extlibs/ArduinoUnit/utility/FreeMemory.d [new file with mode: 0644]
test/extlibs/ArduinoUnit/utility/FreeMemory.h [new file with mode: 0755]
test/extlibs/ReadMe.txt [new file with mode: 0644]
test/extlibs/SConstruct [new file with mode: 0755]
test/extlibs/gtest-1.7.0/HowToGbsBuild.txt [new file with mode: 0755]
test/extlibs/gtest-1.7.0/Makefile [new file with mode: 0755]
test/extlibs/gtest-1.7.0/SConscript [new file with mode: 0644]
test/extlibs/gtest-1.7.0/gbsbuild.sh [new file with mode: 0755]
test/extlibs/gtest-1.7.0/packaging/gtest.spec [new file with mode: 0755]
test/extlibs/gtest-1.7.0/src/SConscript [new file with mode: 0755]
test/include/AM/bloodpressure0.h [new file with mode: 0644]
test/include/AM/bloodpressure1.h [new file with mode: 0644]
test/include/AM/bloodpressure2.h [new file with mode: 0644]
test/include/AM/dependencies/MySignals/bloodpressure.h [new file with mode: 0644]
test/include/AM/dependencies/common.h [new file with mode: 0644]
test/include/CloudCommonUtil.h [new file with mode: 0644]
test/include/CommonProperties.h [new file with mode: 0644]
test/include/CommonTestUtil.h [new file with mode: 0644]
test/include/CommonUtil.h [new file with mode: 0644]
test/include/Configuration.h [new file with mode: 0644]
test/include/IotivityTest_Logger.h [new file with mode: 0644]
test/include/MntResource.h [new file with mode: 0644]
test/include/NmonResource.h [new file with mode: 0644]
test/include/ResourceHelper.h [new file with mode: 0644]
test/include/ResourceServer.h [new file with mode: 0644]
test/include/SampleCollection.h [new file with mode: 0644]
test/include/SampleResource.h [new file with mode: 0644]
test/include/SecurityCommonUtil.h [new file with mode: 0644]
test/include/UnsupportiveResource.h [new file with mode: 0644]
test/include/gtest_custom.h [new file with mode: 0644]
test/include/trace.h [new file with mode: 0644]
test/res/ca_resource/config.ini [new file with mode: 0755]
test/res/ca_resource/runner.sh [new file with mode: 0755]
test/res/cloud_resource/cloud_build.sh [new file with mode: 0755]
test/res/cloud_resource/cloud_run.sh [new file with mode: 0755]
test/res/cloud_resource/rootca.crt [new file with mode: 0644]
test/res/common/config.properties [new file with mode: 0644]
test/res/common/tizen_runner.sh [new file with mode: 0755]
test/res/ctt_resource/client_config.txt [new file with mode: 0755]
test/res/ctt_resource/run_taf_agent.sh [new file with mode: 0755]
test/res/ctt_resource/server_config.txt [new file with mode: 0755]
test/res/descriptor/PICS_Client.json [new file with mode: 0755]
test/res/descriptor/PICS_Server.json [new file with mode: 0755]
test/res/descriptor/PICS_Server_OneResource_NoCollection.json [new file with mode: 0755]
test/res/descriptor/airconditioner-swagger.json [new file with mode: 0755]
test/res/pm_resource/cloud.dat [new file with mode: 0644]
test/res/pm_resource/mot_preconfig_pin_server.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_client.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_randompin_with_empty_deviceid.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_server.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_server_justworks.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_server_mfg.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_server_mvjustworks.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_server_randompin.dat [new file with mode: 0644]
test/res/pm_resource/oic_svr_db_subowner_client.dat [new file with mode: 0644]
test/res/pm_resource/preconfig_server_1.dat [new file with mode: 0644]
test/res/pm_resource/preconfig_server_2.dat [new file with mode: 0644]
test/res/pm_resource/rootca.crt [new file with mode: 0644]
test/res/raml/oic.r.light-error.json [new file with mode: 0644]
test/res/raml/oic.r.light.json [new file with mode: 0644]
test/res/raml/oic.r.light.raml [new file with mode: 0644]
test/res/resource_container_xml/ResourceContainerConfig.xml [new file with mode: 0644]
test/res/resource_container_xml/ResourceContainerConfigTestApp.xml [new file with mode: 0755]
test/res/resource_container_xml/ResourceContainerEmptyConfig.xml [new file with mode: 0644]
test/res/tizen_runner.sh [new file with mode: 0755]
test/src/automation/ctt/SConscript [new file with mode: 0755]
test/src/automation/ctt/include/DUTController.h [new file with mode: 0644]
test/src/automation/ctt/include/MiniHttpServer.h [new file with mode: 0644]
test/src/automation/ctt/include/ResourceMap.h [new file with mode: 0644]
test/src/automation/ctt/src/DUTController.c [new file with mode: 0644]
test/src/automation/ctt/src/MiniHttpServer.c [new file with mode: 0644]
test/src/automation/ctt/src/ResourceMap.c [new file with mode: 0644]
test/src/automation/ctt/src/TAFAgent.c [new file with mode: 0644]
test/src/automation/robot/config.txt [new file with mode: 0644]
test/src/automation/robot/device_lib/build.gradle [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/AbstractDeviceController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidADBManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidApplicationManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidCommand.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidDeviceController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidFileManager.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidLogcatManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidNetworkManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/AndroidScreenController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/CommandOutputCapture.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/android/PhysicalButton.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/Coordinate.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/DeviceInformation.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/DeviceStatus.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/JigCommand.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/JigFunction.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/JigMode.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/JigSolution.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/JigStatus.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/KeyEventType.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/RecoveryProcess.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/datamodel/RecoveryType.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IDeviceBridgeManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IDeviceController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IDeviceLogManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IFileManager.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/ILogObservable.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/ILogObserver.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/INetworkController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IProcess.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IProcessManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IProcessObserver.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/interfaces/IScreenController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxDeviceController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxFileManager.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxLogManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxNetworkController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxProcess.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxProcessManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/linux/LinuxProcessObserver.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenApplicationManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenCommand.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenConsoleManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenDLogManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenDeviceController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenFileManager.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenNetworkManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenSDBManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicecontroller/tizen/TizenScreenController.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicetestlib/DeviceControllerPluginManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicetestlib/LogManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicetestlib/MainConfig.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicetestlib/MultiDeviceManager.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/devicetestlib/RecoveryManager.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/util/FileUtil.java [new file with mode: 0755]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/util/IoTivityLogger.java [new file with mode: 0644]
test/src/automation/robot/device_lib/src/org/iotivity/test/rfw/common/util/SystemUtil.java [new file with mode: 0644]
test/src/automation/robot/download_iotivity.sh [new file with mode: 0755]
test/src/automation/robot/helper/DeviceControlKeyword.py [new file with mode: 0644]
test/src/automation/robot/helper/Iotivity_Interop_Test_Helper.txt [new file with mode: 0644]
test/src/automation/robot/helper/Iotivity_Test_Helper.txt [new file with mode: 0644]
test/src/automation/robot/helper/cloud_authenticator/SConstruct [new file with mode: 0644]
test/src/automation/robot/helper/cloud_authenticator/gitHubLogin.c [new file with mode: 0755]
test/src/automation/robot/helper/server_runner.py [new file with mode: 0755]
test/src/automation/robot/helper/variable.py [new file with mode: 0644]
test/src/automation/robot/readme [new file with mode: 0644]
test/src/automation/robot/robot_automation.sh [new file with mode: 0755]
test/src/automation/robot/robot_jython_log.txt [new file with mode: 0644]
test/src/automation/robot/tc/api/Iotivity_ComponentAPI_AndroidTest.txt [new file with mode: 0644]
test/src/automation/robot/tc/api/Iotivity_ComponentAPI_LinuxTest.txt [new file with mode: 0644]
test/src/automation/robot/tc/api/Iotivity_ComponentAPI_TizenTest.txt [new file with mode: 0644]
test/src/automation/robot/tc/bat/Iotivity_ComponentBAT_AndroidTest.txt [new file with mode: 0644]
test/src/automation/robot/tc/bat/Iotivity_ComponentBAT_LinuxTest.txt [new file with mode: 0755]
test/src/automation/robot/tc/bat/Iotivity_ComponentBAT_TizenTest.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_CS_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_ES_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_IC_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_NS_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_PM_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_RC_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_RE_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_RI_Test.txt [new file with mode: 0644]
test/src/automation/robot/tc/interop_app/Iotivity_ComponentInterOp_SM_Test.txt [new file with mode: 0644]
test/src/automation/robot/tizen_build_prep.sh [new file with mode: 0755]
test/src/common/app/c_cpp/SerialKiller.cpp [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/build.gradle [new file with mode: 0755]
test/src/common/app/java/java-android/TCPAndroidClient/ic_launcher-web.png [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/project.properties [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/AndroidManifest.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/java/org/iotivity/tcpandroidclient/MainActivity.java [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/java/org/iotivity/tcpandroidclient/MyCustomAdapter.java [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/java/org/iotivity/tcpandroidclient/TCPClient.java [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/drawable-hdpi/ic_launcher.png [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/drawable-mdpi/ic_launcher.png [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/drawable-xhdpi/ic_launcher.png [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/drawable-xxhdpi/ic_launcher.png [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/layout/activity_main.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/layout/list_item.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/layout/main.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values-v11/styles.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values-v14/styles.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values-w820dp/dimens.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values/colors.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values/dimens.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values/strings.xml [new file with mode: 0644]
test/src/common/app/java/java-android/TCPAndroidClient/src/main/res/values/styles.xml [new file with mode: 0644]
test/src/common/app/java/java-generic/TCPTestServer/build.gradle [new file with mode: 0644]
test/src/common/app/java/java-generic/TCPTestServer/src/org/iotivity/test/tcpserver/SocketMainServer.java [new file with mode: 0644]
test/src/common/commonutil/c_cpp/AM/bloodpressure0.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/AM/bloodpressure1.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/AM/bloodpressure2.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/AM/dependencies/MySignals/bloodpressure.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/AM/dependencies/common.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/CloudCommonUtil.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/CommonTestUtil.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/CommonUtil.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/Configuration.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/MntResource.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/NmonResource.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/ResourceHelper.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/ResourceServer.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/SampleCollection.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/SampleResource.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/SecurityCommonUtil.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/UnsupportiveResource.cpp [new file with mode: 0644]
test/src/common/commonutil/c_cpp/trace.c [new file with mode: 0644]
test/src/common/commonutil/java/common/resource/org/iotivity/common/ResourceConstants.java [new file with mode: 0644]
test/src/common/commonutil/java/common/resource/org/iotivity/common/ResourceHelper.java [new file with mode: 0644]
test/src/common/commonutil/java/common/resource/org/iotivity/resource/ResourceServer.java [new file with mode: 0644]
test/src/common/commonutil/java/common/resource/org/iotivity/resource/SampleResource.java [new file with mode: 0644]
test/src/common/commonutil/java/common/util/org/iotivity/configuration/IConfiguration.java [new file with mode: 0644]
test/src/common/commonutil/java/common/util/org/iotivity/configuration/ReadConfigPropFile.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/broadcast/TestBroadCast.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/cloud/org/iotivity/cloud/GetAuthCode.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/cloud/org/iotivity/cloud/OcAccountManagerHelper.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/cloud/org/iotivity/cloud/RequestTask.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/iotivityhelpers/es/ESHelperCommon.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/iotivityhelpers/ri/RIHelperCommon.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/logger/IoTivityLog.java [new file with mode: 0644]
test/src/common/commonutil/java/java-android/testcase/IoTivityTc.java [new file with mode: 0644]
test/src/common/commonutil/java/java-generic/cloud/org/iotivity/cloud/GetAuthCode.java [new file with mode: 0644]
test/src/common/commonutil/java/java-generic/cloud/org/iotivity/cloud/OcAccountManagerHelper.java [new file with mode: 0644]
test/src/common/commonutil/java/java-generic/iotivityhelpers/ri/RIHelperCommon.java [new file with mode: 0644]
test/src/common/commonutil/java/java-generic/logger/IoTivityLog.java [new file with mode: 0644]
test/src/common/commonutil/java/java-generic/testcase/IoTivityTc.java [new file with mode: 0644]
test/src/common/testcase/gtest/IotivitySECTestMain.cpp [new file with mode: 0644]
test/src/common/testcase/junit/org/iotivity/test/IotivityJunitRunner.java [new file with mode: 0644]
test/src/iBtestapp/common/android/org/iotivity/service/testapp/framework/Base.java [new file with mode: 0644]
test/src/iBtestapp/common/android/org/iotivity/service/testapp/framework/DialogInfo.java [new file with mode: 0644]
test/src/iBtestapp/common/android/org/iotivity/service/testapp/framework/InputReceiver.java [new file with mode: 0644]
test/src/iBtestapp/common/android/org/iotivity/service/testapp/framework/MenuInfo.java [new file with mode: 0644]
test/src/iBtestapp/common/include/IBtestappCommonUtil.h [new file with mode: 0644]
test/src/iBtestapp/common/src/IBtestappCommonUtil.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/assets/oic_svr_db_client.dat [new file with mode: 0755]
test/src/iBtestapp/modules/cs/android/assets/rootca.crt [new file with mode: 0755]
test/src/iBtestapp/modules/cs/android/build.gradle [new file with mode: 0755]
test/src/iBtestapp/modules/cs/android/settings.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/src/org/iotivity/test/cs/app/Action.java [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/src/org/iotivity/test/cs/app/CSConstants.java [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/src/org/iotivity/test/cs/app/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/cs/android/src/org/iotivity/test/cs/app/OcCloudProvisioningHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/cs/c_cpp/csdk/CSTestApp.cpp [new file with mode: 0755]
test/src/iBtestapp/modules/ic/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/build.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/settings.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICAction.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICMessageAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICMessageQueueHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICResourceDirectoryCommonAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/ICUtility.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/OcAccountManagerAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/OconGetGroupInfoAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/android/src/org/iotivity/test/ic/app/OconGetGroupInfoAllAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/include/BinarySwitchResourceHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/include/CloudHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/include/CloudResourceHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/res/resource_controller.dat [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/res/resource_server.dat [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/src/BinarySwitchResourceHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/src/CloudHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/src/CloudResourceHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ic/c_cpp/src/CloudTestAppMain.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/build.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/settings.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/src/org/iotivity/test/ns/app/testapp/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/src/org/iotivity/test/ns/app/testapp/NSAppAction.java [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/src/org/iotivity/test/ns/app/testapp/NSAppHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/ns/android/src/org/iotivity/test/ns/app/testapp/NSAppUtility.java [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/cpp/include/NSCppAppUtility.h [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/cpp/src/NSConsumerCppApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/cpp/src/NSProviderCppApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/csdk/include/NSUtility.h [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/csdk/src/NSConsumerApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ns/c_cpp/csdk/src/NSProviderApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/oic_svr_db_client.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/oic_svr_db_client_directpairing.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/oic_svr_db_server.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/oic_svr_db_server_justworks.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/oic_svr_db_server_randompin.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/assets/rootca.crt [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/build.gradle [new file with mode: 0755]
test/src/iBtestapp/modules/pm/android/settings.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/OCPlatformHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/OcDirectPairDeviceHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/PMAction.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/PMConstants.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/PMHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/android/src/org/iotivity/test/pm/app/PMLight.java [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/include/PMCppAppHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/res/direct_pairing_cpp.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/res/oic_svr_db_server.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/res/oic_svr_db_server_justworks.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/res/oic_svr_db_server_randompin.json [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/src/PMCppAppHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/src/PMCppAppMotHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/src/PMServers.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/cpp/src/PMTestApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/include/PMCsdkAppHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/include/PMCsdkAppMotHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/include/PMCsdkAppUtilityHelper.h [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/res/direct_pairing_c.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/res/oic_svr_db_server.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/res/oic_svr_db_server_justworks.dat [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/res/oic_svr_db_server_randompin.json [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/src/PMCsdkAppHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/src/PMCsdkAppMotHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/src/PMCsdkAppUtilityHelper.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/src/PMServers.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/pm/c_cpp/csdk/src/PMTestApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/assets/lib/ResourceContainerConfig.xml [new file with mode: 0755]
test/src/iBtestapp/modules/rc/android/build.gradle [new file with mode: 0755]
test/src/iBtestapp/modules/rc/android/settings.gradle [new file with mode: 0755]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/Action.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/RCClient.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/RCClientFindResourceAdapter.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/RCServer.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/RCTestAppStaticUtil.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/android/src/org/iotivity/service/rc/RCTestAppUtilityFunctions.java [new file with mode: 0644]
test/src/iBtestapp/modules/rc/c_cpp/include/RCClient.h [new file with mode: 0644]
test/src/iBtestapp/modules/rc/c_cpp/include/RCFoundResourcesListener.h [new file with mode: 0644]
test/src/iBtestapp/modules/rc/c_cpp/include/RCServer.h [new file with mode: 0644]
test/src/iBtestapp/modules/rc/c_cpp/src/RCClient.cpp [new file with mode: 0755]
test/src/iBtestapp/modules/rc/c_cpp/src/RCFoundResourcesListener.cpp [new file with mode: 0755]
test/src/iBtestapp/modules/rc/c_cpp/src/RCServer.cpp [new file with mode: 0755]
test/src/iBtestapp/modules/rc/c_cpp/src/RCTestAPP.cpp [new file with mode: 0755]
test/src/iBtestapp/modules/re/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/re/android/build.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/re/android/settings.gradle [new file with mode: 0755]
test/src/iBtestapp/modules/re/android/src/org/iotivity/test/re/app/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/re/android/src/org/iotivity/test/re/app/REAppHelper.java [new file with mode: 0644]
test/src/iBtestapp/modules/re/android/src/org/iotivity/test/re/app/RETestAppAction.java [new file with mode: 0644]
test/src/iBtestapp/modules/re/android/src/org/iotivity/test/re/app/REUtility.java [new file with mode: 0644]
test/src/iBtestapp/modules/re/c_cpp/include/REUtility.h [new file with mode: 0644]
test/src/iBtestapp/modules/re/c_cpp/src/RETestApp.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/AndroidManifest.xml [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/build.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/settings.gradle [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/src/org/iotivity/test/ri/app/InputReceiver.java [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/src/org/iotivity/test/ri/app/MainActivity.java [new file with mode: 0644]
test/src/iBtestapp/modules/ri/android/src/org/iotivity/test/ri/app/RITestAppAction.java [new file with mode: 0644]
test/src/iBtestapp/modules/ri/c_cpp/InterOpAppRI.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/sm/c_cpp/include/SMLocalOperations.h [new file with mode: 0644]
test/src/iBtestapp/modules/sm/c_cpp/include/SMRemoteOperations.h [new file with mode: 0644]
test/src/iBtestapp/modules/sm/c_cpp/src/SMLocalOperations.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/sm/c_cpp/src/SMRemoteOperations.cpp [new file with mode: 0644]
test/src/iBtestapp/modules/sm/c_cpp/src/SMTestApp.cpp [new file with mode: 0644]
test/src/tc/ca/arduinounit/include/CAHelper.h [new file with mode: 0755]
test/src/tc/ca/arduinounit/src/btc/CATest.cpp [new file with mode: 0755]
test/src/tc/ca/arduinounit/src/helper/CAHelper.cpp [new file with mode: 0755]
test/src/tc/ca/arduinounit/src/stc/CAClientTest.cpp [new file with mode: 0644]
test/src/tc/ca/arduinounit/src/stc/CACommonTest.cpp [new file with mode: 0755]
test/src/tc/ca/arduinounit/src/stc/CAMulticastTest.cpp [new file with mode: 0644]
test/src/tc/ca/gtest/include/CAHelper.h [new file with mode: 0755]
test/src/tc/ca/gtest/src/btc/CANetworkTest.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/btc/CATest.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/helper/CAAndroidGtestRunner.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/helper/CAHelper.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/stc/CAClientTest.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/stc/CACommonTest.cpp [new file with mode: 0644]
test/src/tc/ca/gtest/src/stc/CAMulticastTest.cpp [new file with mode: 0755]
test/src/tc/ca/gtest/src/stc/CANetworkCommonTest.cpp [new file with mode: 0755]
test/src/tc/ca/junit/AndroidManifest.xml [new file with mode: 0755]
test/src/tc/ca/junit/build.gradle [new file with mode: 0755]
test/src/tc/ca/junit/jni/CAJni.c [new file with mode: 0755]
test/src/tc/ca/junit/jni/org_iotivity_CAJni.h [new file with mode: 0755]
test/src/tc/ca/junit/settings.gradle [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/CAJni.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/btc/CAJavaAPINetworkTest.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/btc/CANetworkTest.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/helper/MainActivity.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/helper/TestInfo.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/stc/CAClientTest.java [new file with mode: 0644]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/stc/CAMulticastTest.java [new file with mode: 0755]
test/src/tc/ca/junit/src/org/iotivity/test/ca/tc/stc/CANetworkCommonTest.java [new file with mode: 0755]
test/src/tc/chp/gtest/include/CHPHelper.h [new file with mode: 0644]
test/src/tc/chp/gtest/src/btc/CHPServerTest.cpp [new file with mode: 0644]
test/src/tc/chp/gtest/src/helper/CHPHelper.cpp [new file with mode: 0644]
test/src/tc/chp/gtest/src/stc/CHPServerTest.cpp [new file with mode: 0644]
test/src/tc/cs/gtest/cpp/include/CSCppCloudHelper.h [new file with mode: 0755]
test/src/tc/cs/gtest/cpp/include/CSCppUtilityHelper.h [new file with mode: 0755]
test/src/tc/cs/gtest/cpp/src/btc/CSCppCloudTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/cpp/src/helper/CSCppCloudHelper.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/cpp/src/helper/CSCppUtilityHelper.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/cpp/src/stc/CSCppCloudTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/include/CSCsdkCloudClientHelper.h [new file with mode: 0644]
test/src/tc/cs/gtest/csdk/include/CSCsdkCloudHelper.h [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/include/CSCsdkUtilityHelper.h [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkAclDeleteTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkAclTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkCloudTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkGetInvitationTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkGroupTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/btc/CSCsdkPolicyCheckTest.cpp [new file with mode: 0644]
test/src/tc/cs/gtest/csdk/src/helper/CSCsdkCloudClientHelper.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/helper/CSCsdkCloudHelper.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/helper/CSCsdkUtilityHelper.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkAclDeleteTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkAclTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkCloudTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkGetInvitationTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkGroupTest.cpp [new file with mode: 0755]
test/src/tc/cs/gtest/csdk/src/stc/CSCsdkPolicyCheckTest.cpp [new file with mode: 0644]
test/src/tc/cs/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/cs/junit/build.gradle [new file with mode: 0755]
test/src/tc/cs/junit/settings.gradle [new file with mode: 0644]
test/src/tc/cs/junit/src/org/iotivity/test/cs/tc/btc/CSOcCloudProvisioningTest.java [new file with mode: 0644]
test/src/tc/cs/junit/src/org/iotivity/test/cs/tc/helper/CSConstants.java [new file with mode: 0644]
test/src/tc/cs/junit/src/org/iotivity/test/cs/tc/helper/OcCloudProvisioningHelper.java [new file with mode: 0644]
test/src/tc/cs/junit/src/org/iotivity/test/cs/tc/stc/CSProvisioningTest.java [new file with mode: 0644]
test/src/tc/es/gtest/include/ESHelper.h [new file with mode: 0644]
test/src/tc/es/gtest/include/enrollee/ESEnrolleeHelper.h [new file with mode: 0644]
test/src/tc/es/gtest/include/mediator/ESMediatorHelper.h [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/enrollee/ESEnrolleeTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESCloudResourceTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESEasySetupTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESEnrolleeResourceTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESEnrolleeSecurityTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESRemoteEnrolleeTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/btc/mediator/ESRichCommonTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/helper/enrollee/ESEnrolleeHelper.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/helper/mediator/ESMediatorHelper.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/stc/enrollee/ESEnrolleeTest.cpp [new file with mode: 0644]
test/src/tc/es/gtest/src/stc/mediator/ESMediatorTest.cpp [new file with mode: 0644]
test/src/tc/es/junit/AndroidManifest.xml [new file with mode: 0755]
test/src/tc/es/junit/assets/oic_svr_db_client.dat [new file with mode: 0644]
test/src/tc/es/junit/assets/oic_svr_db_client.json [new file with mode: 0644]
test/src/tc/es/junit/build.gradle [new file with mode: 0755]
test/src/tc/es/junit/project.properties [new file with mode: 0644]
test/src/tc/es/junit/settings.gradle [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESCloudPropTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESDevicePropTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESEasySetupTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESEnrolleeConfTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESRemoteEnrolleeTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/btc/ESStatusTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESCloudPropProvCallback.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESDevicePropProvCallback.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESEnrolleeConfHelper.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESEnrolleeHelper.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESGetConfigurationCallback.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESOICStackHelper.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESPropertiesHelper.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESSecurityProvisioningCallback.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/helper/ESUtility.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/stc/ESProvisionCloudPropertiesTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/stc/ESProvisionDevicePropertiesTest.java [new file with mode: 0644]
test/src/tc/es/junit/src/org/iotivity/test/es/tc/stc/ESProvisionSecurityTest.java [new file with mode: 0644]
test/src/tc/ic/gtest/include/ICAirconditionerResource.h [new file with mode: 0644]
test/src/tc/ic/gtest/include/ICBinarySwitchResource.h [new file with mode: 0644]
test/src/tc/ic/gtest/include/ICHelper.h [new file with mode: 0755]
test/src/tc/ic/gtest/include/ICResource.h [new file with mode: 0644]
test/src/tc/ic/gtest/include/ICResourceHelper.h [new file with mode: 0644]
test/src/tc/ic/gtest/include/ICTemperatureResource.h [new file with mode: 0644]
test/src/tc/ic/gtest/src/btc/ICCloudConnectorTest.cpp [new file with mode: 0755]
test/src/tc/ic/gtest/src/btc/ICMessageQueueTest.cpp [new file with mode: 0755]
test/src/tc/ic/gtest/src/btc/ICRDClient.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/btc/ICResourceDirectoryTest.cpp [new file with mode: 0755]
test/src/tc/ic/gtest/src/helper/ICAirconditionerResource.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/helper/ICBinarySwitchResource.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/helper/ICHelper.cpp [new file with mode: 0755]
test/src/tc/ic/gtest/src/helper/ICResource.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/helper/ICResourceHelper.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/helper/ICTemperatureResource.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/stc/ICOCAccountManagerTest.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/stc/ICOCPlatformTest.cpp [new file with mode: 0644]
test/src/tc/ic/gtest/src/stc/ICOCResourceTest.cpp [new file with mode: 0755]
test/src/tc/ic/gtest/src/stc/ICRDClientTest.cpp [new file with mode: 0755]
test/src/tc/ic/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/ic/junit/build.gradle [new file with mode: 0644]
test/src/tc/ic/junit/project.properties [new file with mode: 0644]
test/src/tc/ic/junit/settings.gradle [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/btc/ICMessageQueueTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/btc/ICOcAccountManagerTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/btc/ICResourceDirectoryTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/ICHelper.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/ICHelperStaticUtil.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/ICMessageAdapter.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/ICMessageQueue.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/ICResourceDirectoryCommonAdapter.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/OcAccountManagerAdapter.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/helper/OconGetGroupInfoAllAdapter.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/stc/ICAccountMangerTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/stc/ICMessageQueueTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/stc/ICPlateformTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/stc/ICPlatformTest.java [new file with mode: 0644]
test/src/tc/ic/junit/src/org/iotivity/test/ic/tc/stc/ICResourceDirectoryTest.java [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/include/NSCppHelper.h [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/include/NSCppUtility.h [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSConsumerCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSMediaContentsProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSMessageProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSSyncInfoProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSTopicProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/btc/NSTopicsListProviderCppTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/helper/NSCppHelper.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/helper/NSCppUtility.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/cpp/src/stc/NSCppScenarioTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/include/NSCommonHelper.h [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/include/NSConsumerHelper.h [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/include/NSProviderHelper.h [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/btc/NSConsumerTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/btc/NSProviderTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/helper/NSCommonHelper.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/helper/NSConsumerHelper.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/helper/NSProviderHelper.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/stc/NSIntegrationConsumerTest.cpp [new file with mode: 0644]
test/src/tc/ns/gtest/csdk/src/stc/NSIntegrationProviderTest.cpp [new file with mode: 0644]
test/src/tc/ns/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/ns/junit/build.gradle [new file with mode: 0755]
test/src/tc/ns/junit/settings.gradle [new file with mode: 0755]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/btc/NSConsumerTest.java [new file with mode: 0644]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/btc/NSProviderTest.java [new file with mode: 0644]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/btc/NSUtilityTest.java [new file with mode: 0644]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/helper/NSHelper.java [new file with mode: 0644]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/helper/NSTestUtilily.java [new file with mode: 0644]
test/src/tc/ns/junit/src/org/iotivity/test/ns/tc/stc/NSScenarioTest.java [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/include/PMCppCallbackHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/include/PMCppCertHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/include/PMCppHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/include/PMCppMotHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/include/PMCppUtilityHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppCertTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppCredTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppMotTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppOtmTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppPairwiseTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/btc/PMCppProvTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/helper/PMCppCallbackHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/helper/PMCppCertHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/helper/PMCppHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/helper/PMCppMotHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/helper/PMCppUtilityHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/stc/PMCppCertTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/cpp/src/stc/PMCppTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkAutoProvisionHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkCallbackHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkCertHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkMotHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/include/PMCsdkUtilityHelper.h [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkAutoProvisionTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkCertTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkCredTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkMotTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkOtmTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkPairwiseTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/btc/PMCsdkProvTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkAutoProvisionHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkCallbackHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkCertHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkMotHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/helper/PMCsdkUtilityHelper.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/stc/PMCsdkCertTest.cpp [new file with mode: 0644]
test/src/tc/pm/gtest/csdk/src/stc/PMCsdkTest.cpp [new file with mode: 0644]
test/src/tc/pm/junit/AndroidManifest.xml [new file with mode: 0755]
test/src/tc/pm/junit/assets/oic_svr_db_client.dat [new file with mode: 0644]
test/src/tc/pm/junit/assets/oic_svr_db_client_directpairing.dat [new file with mode: 0644]
test/src/tc/pm/junit/assets/oic_svr_db_server.dat [new file with mode: 0644]
test/src/tc/pm/junit/assets/oic_svr_db_server_justworks.dat [new file with mode: 0644]
test/src/tc/pm/junit/assets/oic_svr_db_server_randompin.dat [new file with mode: 0644]
test/src/tc/pm/junit/build.gradle [new file with mode: 0755]
test/src/tc/pm/junit/settings.gradle [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/btc/PMMotTest.java [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/btc/PMOcProvisioningTest.java [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/btc/PMOcSecureResourceTest.java [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/helper/PMConstants.java [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/helper/PMHelper.java [new file with mode: 0644]
test/src/tc/pm/junit/src/org/iotivity/test/pm/tc/stc/PMProvisioningTest.java [new file with mode: 0644]
test/src/tc/rc/gtest/include/RCHelper.h [new file with mode: 0755]
test/src/tc/rc/gtest/src/btc/RCResourceContainerTest.cpp [new file with mode: 0644]
test/src/tc/rc/gtest/src/helper/RCHelper.cpp [new file with mode: 0755]
test/src/tc/rc/gtest/src/stc/RCResourceBundleTest.cpp [new file with mode: 0644]
test/src/tc/rc/gtest/src/stc/RCResourceContainerTest.cpp [new file with mode: 0644]
test/src/tc/rc/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/rc/junit/assets/lib/ResourceContainerConfig.xml [new file with mode: 0644]
test/src/tc/rc/junit/assets/lib/ResourceContainerEmptyConfig.xml [new file with mode: 0644]
test/src/tc/rc/junit/assets/lib/hue-0.1.jar [new file with mode: 0644]
test/src/tc/rc/junit/build.gradle [new file with mode: 0644]
test/src/tc/rc/junit/settings.gradle [new file with mode: 0755]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/btc/RCRcsValueTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/btc/RCResourceAttributesTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/btc/RCResourceBundleTest.java [new file with mode: 0755]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/btc/RCResourceConfigTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/btc/RCResourceContainerTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/helper/RCCommonUtil.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/helper/RCCommonUtilBTC.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/helper/RCHelper.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/helper/RCHelperBTC.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/stc/RCResourceBundleTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/stc/RCResourceConfigTest.java [new file with mode: 0644]
test/src/tc/rc/junit/src/org/iotivity/test/rc/tc/stc/RCResourceContainerTest.java [new file with mode: 0755]
test/src/tc/rd/gtest/include/RDHelper.h [new file with mode: 0644]
test/src/tc/rd/gtest/src/btc/RDClientTest.cpp [new file with mode: 0644]
test/src/tc/rd/gtest/src/btc/RDServerTest.cpp [new file with mode: 0644]
test/src/tc/rd/gtest/src/helper/RDHelper.cpp [new file with mode: 0644]
test/src/tc/rd/gtest/src/stc/RDClientIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/rd/gtest/src/stc/RDServerIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/include/REHelper.h [new file with mode: 0644]
test/src/tc/re/gtest/src/btc/RERepresentationTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/btc/REResourceBrokerTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/btc/REResourceCacheTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/btc/REResourceWrapperTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/btc/REServerBuilderTest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/helper/REHelper.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/stc/RERepresentationAPITest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/stc/REResourceBrokerAPITest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/stc/REResourceCacheAPITest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/stc/REResourceWrapperAPITest.cpp [new file with mode: 0644]
test/src/tc/re/gtest/src/stc/REServerBuilderAPITest.cpp [new file with mode: 0644]
test/src/tc/re/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/re/junit/build.gradle [new file with mode: 0644]
test/src/tc/re/junit/settings.gradle [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/btc/REResourceBrokerTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/btc/REResourceCacheTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/btc/REResourceWrapperTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/btc/REServerBuilderTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/helper/REAPIHelper.java [new file with mode: 0644]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/helper/REHelper.java [new file with mode: 0644]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/helper/ResourceProperties.java [new file with mode: 0644]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/helper/ResourceUtil.java [new file with mode: 0644]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/stc/REResourceBrokerTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/stc/REResourceCacheTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/stc/REResourceWrapperTest.java [new file with mode: 0755]
test/src/tc/re/junit/src/org/iotivity/test/re/tc/stc/REServerBuilderTest.java [new file with mode: 0755]
test/src/tc/ri/gtest/cpp/include/RIHelper.h [new file with mode: 0644]
test/src/tc/ri/gtest/cpp/src/btc/RIClientTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/cpp/src/btc/RIResourceTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/cpp/src/btc/RIServerTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/cpp/src/helper/RIHelper.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/cpp/src/stc/RICppIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/include/RICsdkHelper.h [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/src/btc/RICsdkClientTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/src/btc/RICsdkServerTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/src/helper/RICsdkHelper.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/src/stc/RICsdkIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/ri/gtest/csdk/src/stc/RICsdkServerIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/ri/junit/AndroidManifest.xml [new file with mode: 0644]
test/src/tc/ri/junit/build.gradle [new file with mode: 0755]
test/src/tc/ri/junit/settings.gradle [new file with mode: 0755]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-android/RIClientConfigTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-android/RIServerConfigTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-common/RIClientTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-common/RIResourceTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-common/RIServerTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-generic/RIClientConfigTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/btc/java-generic/RIServerConfigTest.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/helper/IRIConstants.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/helper/RIHelper.java [new file with mode: 0644]
test/src/tc/ri/junit/src/org/iotivity/test/ri/tc/stc/RIIntegrationTest.java [new file with mode: 0644]
test/src/tc/sm/gtest/include/SMCommon.h [new file with mode: 0644]
test/src/tc/sm/gtest/include/SMHelper.h [new file with mode: 0644]
test/src/tc/sm/gtest/include/SMRemoteHelper.h [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMRemoteSceneActionTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMRemoteSceneCollectionTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMRemoteSceneListTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMRemoteSceneTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMSceneActionTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMSceneCollectionTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMSceneListTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/btc/SMSceneTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/helper/SMHelper.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/helper/SMRemoteHelper.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMRemoteSceneActionIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMRemoteSceneCollectionIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMRemoteSceneIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMRemoteSceneListIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMSceneActionIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMSceneCollectionIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMSceneIntegrationTest.cpp [new file with mode: 0644]
test/src/tc/sm/gtest/src/stc/SMSceneListIntegrationTest.cpp [new file with mode: 0644]
test/src/testapp/IUTSimulatorApp/c_cpp/include/IUTSimulatorUtils.h [new file with mode: 0644]
test/src/testapp/IUTSimulatorApp/c_cpp/include/SampleResourceFactory.h [new file with mode: 0644]
test/src/testapp/IUTSimulatorApp/c_cpp/src/IUTSimulator.cpp [new file with mode: 0644]
test/src/testapp/IUTSimulatorApp/c_cpp/src/IUTSimulatorUtils.cpp [new file with mode: 0644]
test/src/testapp/IUTSimulatorApp/c_cpp/src/SampleResourceFactory.cpp [new file with mode: 0644]
test/src/testapp/TcpClientApp/tcpclient.cpp [new file with mode: 0644]
test/src/testapp/ca/android/casimulator/build.gradle [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/gradle.properties [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/.gitignore [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/AndroidManifest.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/java/org/iotivity/CAJni.java [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/java/org/iotivity/ca/simulator/DLog.java [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/java/org/iotivity/ca/simulator/MainActivity.java [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/jni/Android.mk [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/jni/Application.mk [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/jni/CAJni.c [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/jni/org_iotivity_CAJni.h [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/layout/activity_main.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/menu/main.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values-v11/styles.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values-v14/styles.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values-w820dp/dimens.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values/dimens.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values/strings.xml [new file with mode: 0755]
test/src/testapp/ca/android/casimulator/src/main/res/values/styles.xml [new file with mode: 0755]
test/src/testapp/ca/c_cpp/include/casimulator.h [new file with mode: 0755]
test/src/testapp/ca/c_cpp/src/ca_simulator.c [new file with mode: 0755]
test/src/testapp/ca/c_cpp/src/sample_client.c [new file with mode: 0755]
test/src/testapp/ca/c_cpp/src/sample_server.c [new file with mode: 0755]
test/src/testapp/cloud/cloud_server.cpp [new file with mode: 0644]
test/src/testapp/cs/iotivity_cs_server.cpp [new file with mode: 0644]
test/src/testapp/es/essim.c [new file with mode: 0644]
test/src/testapp/ic/iotivity_ic_server.cpp [new file with mode: 0644]
test/src/testapp/ns/cpp/include/NSSimulatorCppUtil.h [new file with mode: 0644]
test/src/testapp/ns/cpp/src/NSConsumerCppSimulator.cpp [new file with mode: 0644]
test/src/testapp/ns/cpp/src/NSProviderCppSimulator.cpp [new file with mode: 0644]
test/src/testapp/ns/csdk/include/NSSimulatorUtil.h [new file with mode: 0644]
test/src/testapp/ns/csdk/src/NSConsumerSimulator.cpp [new file with mode: 0644]
test/src/testapp/ns/csdk/src/NSProviderSimulator.cpp [new file with mode: 0644]
test/src/testapp/pm/iotivity_pm_client.cpp [new file with mode: 0644]
test/src/testapp/pm/iotivity_pm_server.cpp [new file with mode: 0644]
test/src/testapp/re/c_cpp/src/retestservers.cpp [new file with mode: 0644]
test/src/testapp/sm/c_cpp/src/sceneserver.cpp [new file with mode: 0644]
test/test_manager/ReadMe [new file with mode: 0644]
test/test_manager/add_gcov_flag.sh [new file with mode: 0755]
test/test_manager/android_test_runner.py [new file with mode: 0755]
test/test_manager/common_test_runner.py [new file with mode: 0755]
test/test_manager/configuration.py [new file with mode: 0755]
test/test_manager/convention_checker.py [new file with mode: 0755]
test/test_manager/defect_info.py [new file with mode: 0644]
test/test_manager/defect_reporter.py [new file with mode: 0755]
test/test_manager/devunittest_reporter.py [new file with mode: 0755]
test/test_manager/devunittest_runner.py [new file with mode: 0755]
test/test_manager/generate_gcov_report_n_clean.sh [new file with mode: 0755]
test/test_manager/inter_op_reporter.py [new file with mode: 0755]
test/test_manager/ite/config.py [new file with mode: 0755]
test/test_manager/ite/constants.py [new file with mode: 0755]
test/test_manager/ite/exec/multi_runner.py [new file with mode: 0644]
test/test_manager/ite/exec/run_options.py [new file with mode: 0644]
test/test_manager/ite/exec/runner.py [new file with mode: 0755]
test/test_manager/ite/exec/runner_info_setter.py [new file with mode: 0644]
test/test_manager/ite/exec/tc_executor.py [new file with mode: 0644]
test/test_manager/ite/exec/tc_utility_action.py [new file with mode: 0644]
test/test_manager/ite/multi_logger.py [new file with mode: 0644]
test/test_manager/ite/reporter/excel_util.py [new file with mode: 0755]
test/test_manager/ite/reporter/reporter_util.py [new file with mode: 0755]
test/test_manager/ite/reporter/result_reporter.py [new file with mode: 0755]
test/test_manager/ite/reporter/tc_reporter.py [new file with mode: 0755]
test/test_manager/ite/result/collector.py [new file with mode: 0755]
test/test_manager/ite/tc/analyzer.py [new file with mode: 0755]
test/test_manager/ite/tc/container.py [new file with mode: 0755]
test/test_manager/ite/tc/robot_analyzer.py [new file with mode: 0755]
test/test_manager/ite/tc/xmlanalyzer.py [new file with mode: 0755]
test/test_manager/ite/util.py [new file with mode: 0755]
test/test_manager/ite/webreporter/tc_list_reporter.py [new file with mode: 0755]
test/test_manager/ite/webreporter/webreporter_util.py [new file with mode: 0755]
test/test_manager/junit_reporter.py [new file with mode: 0755]
test/test_manager/junit_runner.py [new file with mode: 0755]
test/test_manager/make_tc_list.py [new file with mode: 0755]
test/test_manager/result_reporter.py [new file with mode: 0755]
test/test_manager/robottcxmlparser/defectworksheet.py [new file with mode: 0755]
test/test_manager/robottcxmlparser/reporter.py [new file with mode: 0644]
test/test_manager/robottcxmlparser/summaryworksheet.py [new file with mode: 0755]
test/test_manager/robottcxmlparser/tcworksheet.py [new file with mode: 0755]
test/test_manager/robottcxmlparser/tcworksheet2.py [new file with mode: 0644]
test/test_manager/robottcxmlparser/testcase.py [new file with mode: 0644]
test/test_manager/robottcxmlparser/testsuite.py [new file with mode: 0644]
test/test_manager/robottcxmlparser/utility.py [new file with mode: 0644]
test/test_manager/robottcxmlparser/xmlparser.py [new file with mode: 0644]
test/test_manager/tc_list.txt [new file with mode: 0644]
test/test_manager/tc_verdicts.txt [new file with mode: 0644]
test/test_manager/test_runner.py [new file with mode: 0755]
test/test_manager/testspec_reporter.py [new file with mode: 0755]
test/test_manager/tizen_test_runner.py [new file with mode: 0755]
test/test_manager/xml_reporter.py [new file with mode: 0755]

diff --git a/test/.project b/test/.project
new file mode 100644 (file)
index 0000000..0b4464f
--- /dev/null
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>test</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+                       <triggers>clean,full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+                       <triggers>full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.cdt.core.cnature</nature>
+               <nature>org.eclipse.cdt.core.ccnature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+       </natures>
+       <linkedResources>
+               <link>
+               </link>
+       </linkedResources>
+</projectDescription>
diff --git a/test/IUT_README b/test/IUT_README
new file mode 100644 (file)
index 0000000..47aaa2b
--- /dev/null
@@ -0,0 +1 @@
+https://wiki.iotivity.org/iut_simulator_guide
diff --git a/test/SConstruct b/test/SConstruct
new file mode 100644 (file)
index 0000000..e5e8fca
--- /dev/null
@@ -0,0 +1,162 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+##
+# The main build script
+#
+##
+
+import os
+import platform
+
+print '---------------Started Building IotivitySecTest---------------'
+
+# Load common build config
+SConscript('build/SConscript')
+SConscript('build/configuration.scons')
+
+Import('env')
+
+target_os = env.get('TARGET_OS')
+target_arch = env.get('TARGET_ARCH')
+module = env.get('MODULE')
+test = env.get('TEST')
+sdk = env.get('SDK')
+target_transport = ARGUMENTS.get('TARGET_TRANSPORT')
+shield = ARGUMENTS.get('SHIELD')
+verbose = ARGUMENTS.get('VERBOSE')
+
+print 'TARGET OS : ' + str(target_os)
+print 'TARGET ARCH : ' + str(target_arch)
+print 'MODULE : ' + str(module)
+print 'TEST : ' + str(test)
+print 'SDK : ' + str(sdk)
+
+if not verbose:
+    env['CCCOMSTR'] = "Compiling $TARGET"
+    env['SHCCCOMSTR'] = "Compiling $TARGET"
+    env['CXXCOMSTR'] = "Compiling $TARGET"
+    env['SHCXXCOMSTR'] = "Compiling $TARGET"
+    env['LINKCOMSTR'] = "Linking $TARGET"
+    env['SHLINKCOMSTR'] = "Linking $TARGET"
+    env['ARCOMSTR'] = "Archiving $TARGET"
+    env['RANLIBCOMSTR'] = "Indexing Archive $TARGET"
+
+env_linux = env.Clone()
+env_tizen = env.Clone()
+env_android = env.Clone()
+env_java = env.Clone()
+env_windows = env.Clone()
+
+
+def build_linux():
+    variant_dir = 'bin/linux'
+    install_dir = 'bin/linux'
+    env_linux.Append(VARIANT_DIR = variant_dir)
+    env_linux.Append(INSTALL_DIR = install_dir)
+    env_linux.VariantDir(variant_dir, 'src', duplicate=0)
+
+    if target_os == 'all':
+        env_linux.Replace(TARGET_ARCH = 'x86')
+        print "Target_Arch " + env.get('TARGET_ARCH')
+
+        env_linux.Replace(TARGET_OS = 'linux')
+
+    SConscript('build/linux/SConscript', exports = 'env_linux')
+
+def build_tizen():
+    build_dir = 'bin/tizen/'
+    env_tizen.Append(VARIANT_DIR = build_dir)
+    env_tizen.VariantDir(build_dir, 'src', duplicate=0)
+
+    if target_os == 'all':
+        env_tizen.Replace(TARGET_ARCH = 'armv7l')
+        env_tizen.Replace(TARGET_OS = 'tizen')
+
+    SConscript('build/tizen/SConscript', exports = 'env_tizen')
+
+def build_windows():
+    variant_dir = 'bin/windows/'
+    install_dir = 'bin/windows/'
+    env_windows.Append(VARIANT_DIR = variant_dir)
+    env_windows.Append(INSTALL_DIR = install_dir)
+    env_windows.VariantDir(variant_dir, 'src', duplicate=0)
+    SConscript('build/windows/SConscript', exports = 'env_windows')
+
+
+def build_android():
+    SConscript('build/android/SConscript', exports = 'env_android')
+
+def build_java():
+    SConscript('build/java/SConscript', exports = 'env_java')
+
+def build_arduino():
+    build_dir = 'bin/arduino/'
+    env.Append(VARIANT_DIR = build_dir)
+    env.Append(BUILD_DIR = build_dir)
+    env.VariantDir(build_dir, 'src', duplicate=0)
+
+    if target_os == 'all':
+        env.Replace(TARGET_ARCH = 'avr')
+        env.Replace(TARGET_OS = 'arduino')
+
+    if 'IP' in target_transport:
+
+        env.Replace(TARGET_TRANSPORT = 'IP')
+
+        if 'ETH' in shield:
+            env.Replace(SHIELD = 'ETH')
+            SConscript('build/src_build.scons')
+            SConscript('build/arduino/SConscript')
+
+        if 'WIFI' in shield:
+            env.Replace(SHIELD = 'WIFI')
+            SConscript('build/src_build.scons')
+            SConscript('build/arduino/SConscript')
+
+    if 'BLE' in target_transport:
+        env.Replace(TARGET_TRANSPORT = 'BLE')
+        env.Replace(SHIELD = 'RBL_NRF8001')
+        SConscript('build/src_build.scons')
+        SConscript('build/arduino/SConscript')
+
+
+def build_module(self, module_name):
+    print "Build module called"
+    modules = {
+        'linux' : build_linux,
+        'tizen' : build_tizen,
+        'arduino' : build_arduino,
+        'android' : build_android,
+        'java' : build_java,
+        'windows' : build_windows
+    }
+
+    if 'java' in sdk:
+       modules.get('java',"")()
+    else:
+        modules.get(module_name,"")()
+
+
+env.AddMethod(build_module, 'BuildModule')
+
+env.BuildModule(target_os)
+
diff --git a/test/astyle-cpp-format.sh b/test/astyle-cpp-format.sh
new file mode 100755 (executable)
index 0000000..37e3c84
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+astyle --style=allman --indent=spaces=4 --min-conditional-indent=0 --align-pointer=name --align-reference=name --indent-classes --indent-switches --indent-cases --indent-namespaces --pad-oper --pad-header --keep-one-line-blocks --keep-one-line-statements --convert-tabs --mode=c --max-code-length=100 --suffix=none "*.cpp" "*.h" "*.c" --recursive
+
+echo ============================================================
+
+echo Removing trailing spaces started
+find . -type f \( -name "*.cpp" -o -name "*.c" -o -name "*.h" \) -exec sed --in-place 's/[[:space:]]\+$//' {} \+
+echo ------------------------------------------------------------
+echo Removing trailing spaces ended
diff --git a/test/astyle-java-format.sh b/test/astyle-java-format.sh
new file mode 100755 (executable)
index 0000000..24e7632
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+astyle --style=java --indent=spaces=4 --min-conditional-indent=0 --align-pointer=name --align-reference=name --indent-classes --indent-switches --indent-namespaces --pad-oper --pad-header --keep-one-line-blocks --keep-one-line-statements --convert-tabs --mode=java --max-code-length=100 --suffix=none "*.java" --recursive
+
+echo ============================================================
+
+echo Removing trailing spaces started
+find . -type f  -name "*.java" -exec sed --in-place 's/[[:space:]]\+$//' {} \+
+echo ------------------------------------------------------------
+echo Removing trailing spaces ended
diff --git a/test/build/SConscript b/test/build/SConscript
new file mode 100755 (executable)
index 0000000..cfb0e38
--- /dev/null
@@ -0,0 +1,221 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+
+##
+# This script includes generic build options:
+#    target os, target arch, cross toolchain, build environment etc
+##
+import os
+import platform
+
+print '---------------Loading Common Config---------------'
+
+# Map of host os and allowed target os (host: allowed target os)
+host_target_map = {
+        'linux': ['linux', 'android', 'arduino', 'tizen', 'all'],
+        'windows': ['windows', 'winrt', 'android', 'arduino', 'all'],
+        'darwin': ['darwin', 'ios', 'android', 'arduino', 'all'],
+        }
+
+# Map of os and allowed archs (os: allowed archs)
+os_arch_map = {
+        'linux': ['x86', 'x86_64', 'arm', 'arm64'],
+        'tizen': ['armv7l', 'x86', 'x86_64', 'arm', 'arm64'],
+        'android': ['armeabi', 'x86', 'x86_64', 'armeabi-v7a', 'armeabi-v7a-hard', 'arm64-v8a'],
+        'windows': ['x86', 'amd64', 'arm'],
+        'winrt': ['arm'],
+        'darwin': ['i386', 'x86_64'],
+        'ios': ['i386', 'x86_64', 'armv7', 'armv7s', 'arm64'],
+        'arduino': ['avr', 'arm'],
+        'yocto': ['x86', 'x86_64'],
+        'all': ['all']
+        }
+
+host = platform.system().lower()
+print '---------------Host OS : ' + host + '---------------'
+
+if not host_target_map.has_key(host):
+    print "\nError: Current system (%s) isn't supported\n" % host
+    Exit(1)
+
+######################################################################
+# Get build options (the options from command line)
+######################################################################
+target_os = ARGUMENTS.get('TARGET_OS', host).lower() # target os
+
+if target_os not in host_target_map[host] and target_os != 'all':
+    print "\nError: Unknown target os: %s (Allow values: %s)\n" % (target_os, host_target_map[host])
+    Exit(1)
+
+default_arch = platform.machine()
+
+if default_arch not in os_arch_map[target_os]:
+    default_arch = os_arch_map[target_os][0].lower()
+
+error_msg =  """
+
+#################################################################################################
+#   ERROR... If you Set TARGET_OS=all, You to have Set TARGET_ARCH=all or you can just          #
+#   avoid this Argument. In this case it will automatically assign TARGET_ARCH like following   #
+#                           linux = x86/x86_64(depending on host)                               #
+#                                   tizen = armv7l                                              #
+#                                  android = armeabi                                            #
+#                                    arduino = avr                                              #
+#                                    windows = x86                                              #
+#################################################################################################
+
+"""
+
+target_arch = ARGUMENTS.get('TARGET_ARCH', default_arch)
+
+if target_os == 'all' and target_arch != 'all':
+    print error_msg
+    exit(1)
+
+all_modules=['ca', 'ri', 'iut', 'pm', 'cs', 'ic', 'rd',  're', 'rc', 'es', 'sm', 'ns', 'chp', 'taf']
+all_transports = ['BT', 'BLE', 'IP', 'ETH', 'WIFI', 'TCP']
+all_sdk = ['csdk', 'cpp', 'java']
+all_test_option = ['tc', 'btc', 'stc', 'simulator', 'app']
+all_push_options = ['exe', 'lib']
+all_frameworks = ['gtest', 'junit', 'arduinojunit']
+
+help_vars = Variables()
+help_vars.Add(BoolVariable('RELEASE', 'Build for release?', True))
+help_vars.Add(BoolVariable('LOGGING', 'Enable stack logging', False))
+help_vars.Add(EnumVariable('TARGET_OS', 'Target platform', host, host_target_map[host]))
+help_vars.Add(ListVariable('TARGET_TRANSPORT', 'Target transport', 'all', all_transports))
+help_vars.Add(EnumVariable('TARGET_ARCH', 'Target architecture', default_arch, os_arch_map[target_os]))
+help_vars.Add(ListVariable('MODULE', 'Name of target module', 'all', all_modules))
+help_vars.Add(ListVariable('SDK', 'Name of programming platform', all_sdk, all_sdk))
+help_vars.Add(ListVariable('TEST', 'Type of the TEST', 'tc', all_test_option))
+help_vars.Add(EnumVariable('SECURED', 'Build with Security', '1', allowed_values=('0', '1')))
+help_vars.Add(BoolVariable('TLS_MODE', 'Build with TLS mode or not', False))
+help_vars.Add(BoolVariable('CLOUD_SERVICE', 'Build Cloud Service Dev Source', False))
+help_vars.Add(PathVariable('ANDROID_NDK', 'Android NDK path', None, PathVariable.PathAccept))
+help_vars.Add(PathVariable('ANDROID_HOME', 'Android SDK path', None, PathVariable.PathAccept))
+help_vars.Add(PathVariable('ANDROID_GRADLE', 'Gradle binary file', None, PathVariable.PathIsFile))
+help_vars.Add('PROJECT_VERSION', 'Set the version needed for RPMS', '')
+help_vars.Add(PathVariable('TIZEN_HOME', 'Root path of tizen SDK', None, PathVariable.PathAccept))
+help_vars.Add(PathVariable('GBS_ROOT', 'GBS Root Path', None, PathVariable.PathAccept))
+help_vars.Add(PathVariable('KAFKA_ROOT', 'KAFKA Root Path', None, PathVariable.PathAccept))
+help_vars.Add(PathVariable('IOTIVITY_ROOT', 'IOTIVITY Root Path', Dir('../..').srcnode().abspath, PathVariable.PathAccept))
+help_vars.Add(ListVariable('PUSH', 'To push binary to device', 'none', all_push_options))
+help_vars.Add(BoolVariable('OFFLINE', 'Build in offline mode', False))
+help_vars.Add(EnumVariable('ES_ROLE', 'Target ES Role', 'all', allowed_values=('all', 'mediator', 'enrollee')))
+help_vars.Add(ListVariable('FRAMEWORK', 'TC Framework Type', 'all', all_frameworks))
+help_vars.Add(BoolVariable('COVERAGE', 'Add Code coverage', False))
+help_vars.Add(BoolVariable('VERBOSE', 'Show compilation', False))
+
+help_vars.Add(EnumVariable('BUILD_SAMPLE', 'Build with sample', 'ON', allowed_values=('ON', 'OFF')))
+help_vars.Add(EnumVariable('PREVENT', 'Build with sample', 'OFF', allowed_values=('ON', 'OFF')))
+help_vars.Add(BoolVariable('SRC_BUILD', 'Enable Dev Source Building?', False))
+help_vars.Add(BoolVariable('SRC_UPDATE', 'Enable Dev Source Updating?', False))
+help_vars.Add(BoolVariable('WITH_RD', 'Build with RD Server', False))
+
+targets_support_cc = ['linux', 'arduino', 'tizen', 'android']
+
+if target_os in targets_support_cc:
+    # Set cross compile toolchain
+    help_vars.Add('TC_PREFIX', "Toolchain prefix (Generally only be required for cross-compiling)", os.environ.get('TC_PREFIX'))
+
+if target_os in ['android', 'arduino']: # Android/Arduino always uses GNU compiler regardless of the host
+    env = Environment(variables = help_vars,
+            tools = ['gnulink', 'gcc', 'g++', 'ar', 'as'],
+            ENV = os.environ)
+else:
+    env = Environment(variables = help_vars, TARGET_ARCH = target_arch, TARGET_OS = target_os, ENV = os.environ)
+
+unknown = help_vars.UnknownVariables()
+if unknown:
+    print 'Unknown Parameters: ', unknown.keys()
+    Exit(1)
+
+Help(help_vars.GenerateHelpText(env))
+
+if env.get('RELEASE'):
+    release_dir = 'release'
+else:
+    release_dir = 'debug'
+
+env.Append(ALL_MODULES = all_modules)
+env.Append(RELEASE_DIR = release_dir)
+iotivity_root = Dir('..').srcnode().abspath
+
+env.Append(IOTIVITY_TEST_ROOT = Dir('..').srcnode().abspath)
+
+iotivity_root = env.get('IOTIVITY_ROOT')
+
+if not (os.path.exists(iotivity_root + '/resource') and os.path.exists(iotivity_root + '/service') and os.path.exists(iotivity_root + '/extlibs')):
+    print 'Invalid IOTIVITY_ROOT: ' + iotivity_root
+    exit(-1)
+
+iotivity_test_root = env.get('IOTIVITY_TEST_ROOT')
+
+target_os = env.get('TARGET_OS')
+module = env.get('MODULE')
+framework = env.get('FRAMEWORK')
+test = env.get('TEST')
+transport = env.get('TARGET_TRANSPORT')
+sdk = env.get('SDK')
+push = env.get('PUSH')
+
+if 'all' in str(module):
+    env.Replace(MODULE = all_modules)
+    module = all_modules
+
+if 'all' in str(framework):
+    env.Replace(FRAMEWORK = all_frameworks)
+    framework = all_frameworks
+
+if 'all' in str(test):
+    env.Replace(TEST = all_test_option)
+    test = all_test_option
+
+if 'all' in str(transport):
+    env.Replace(TARGET_TRANSPORT = all_transports)
+    transport = all_transports
+
+if 'all' in str(push):
+    env.Replace(PUSH = all_push_options)
+    push = all_push_options
+
+if 'all' in str(sdk):
+    env.Replace(SDK = ['csdk', 'cpp'])
+
+print target_os
+print module
+print framework
+print test
+print transport
+print sdk
+
+if 'tc' in test:
+    if 'linux' in target_os or 'tizen' in target_os:
+        SConscript(iotivity_test_root + '/extlibs/SConstruct')
+    elif 'android' in target_os and 'ca' in module and 'gtest' in framework:
+        SConscript(iotivity_test_root + '/extlibs/SConstruct')
+
+env.AppendUnique(PLATFORM="win")
+env.AppendUnique(PATH = os.environ['PATH'])
+Export('env')
+
+print '---------------Finished Loading Common Config---------------'
diff --git a/test/build/android/SConscript b/test/build/android/SConscript
new file mode 100755 (executable)
index 0000000..a039112
--- /dev/null
@@ -0,0 +1,191 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+##
+# The build script for Android
+#
+##
+
+import os
+import os.path
+
+print '\n---------------Started Building IotivitySecTest for Android---------------\n'
+
+Import('env_android')
+
+iotivity_root = env_android.get('IOTIVITY_ROOT')
+
+if not env_android.get('ANDROID_HOME'):
+    if os.path.exists(iotivity_root + '/extlibs/android/sdk/android-sdk-linux'):
+        env_android.Replace(ANDROID_HOME = iotivity_root + '/extlibs/android/sdk/android-sdk-linux')
+    else:
+        env_android.Replace(ANDROID_HOME = os.environ.get('ANDROID_HOME'))
+
+if not env_android.get('ANDROID_NDK'):
+    if os.path.exists(iotivity_root + '/extlibs/android/ndk/android-ndk-r10d'):
+        env_android.Replace(ANDROID_NDK = iotivity_root + '/extlibs/android/ndk/android-ndk-r10d')
+    else:
+        env_android.Replace(ANDROID_NDK = os.environ.get('ANDROID_NDK'))
+
+if not env_android.get('ANDROID_GRADLE'):
+    if os.path.isfile(iotivity_root + '/extlibs/android/gradle/gradle-2.2.1/bin/gradle'):
+        env_android.Replace(ANDROID_GRADLE = iotivity_root + '/extlibs/android/gradle/gradle-2.2.1/bin/gradle')
+    else:
+        env_android.Replace(ANDROID_GRADLE = os.environ.get('ANDROID_GRADLE'))
+
+target_arch = env_android.get('TARGET_ARCH')
+module = env_android.get('MODULE')
+test = env_android.get('test')
+target_transport = ARGUMENTS.get('TARGET_TRANSPORT')
+secured = env_android.get('SECURED')
+iotivity_root = env_android.get('IOTIVITY_ROOT')
+iotivity_test_root = env_android.get('IOTIVITY_TEST_ROOT')
+release_dir=env_android.get('RELEASE_DIR')
+all_modules = env_android.get('ALL_MODULES')
+test = env_android.get('TEST')
+gradle_bin = env_android.get('ANDROID_GRADLE')
+ndk_dir = env_android.get('ANDROID_NDK')
+sdk_dir = env_android.get('ANDROID_HOME')
+
+push = env_android.get('PUSH')
+push = ",".join(push)
+
+framework = env_android.get('FRAMEWORK')
+cloud_service_build = env_android.get('CLOUD_SERVICE')
+kafka_root = env_android.get('KAFKA_ROOT')
+
+print sdk_dir
+print ndk_dir
+print gradle_bin
+print push
+
+if not os.path.exists(sdk_dir):
+    print 'No valid ANDROID_HOME found'
+    exit(-1)
+
+if not os.path.exists(ndk_dir):
+    print 'No valid ANDROID_NDK found'
+    exit(-1)
+
+if not os.path.isfile(gradle_bin):
+    print 'No valid ANDROID_GRADLE found'
+    exit(-1)
+
+os.environ['ANDROID_HOME'] = sdk_dir
+
+default_targets = []
+
+if cloud_service_build:
+    if 'ic' in module or 'cs' in module:
+        build_command = 'bash ' + iotivity_test_root + '/res/cloud_resource/cloud_build.sh ' + kafka_root + ' ' + iotivity_root
+        cloud_build = env_android.Command('cloud_build', None, build_command)
+        default_targets += [cloud_build]
+
+for temp in list(set(all_modules) - set(['iut', 'ca'])):
+
+    if temp in module:
+
+        jdk_env = Environment(ENV=os.environ)
+        build_command = gradle_bin + ' ' + 'install' + ' -b ' + iotivity_test_root + '/build/android/build.gradle -Pmodule_name=%s \
+        -Parch=%s -Prelease=%s -Piotivity_root=%s  -Pp=%s -Ptest_root=%s -Psrc_type=%s -Ptest=%s' \
+        %(temp, target_arch, release_dir, iotivity_root, iotivity_test_root + '/build/android/', iotivity_test_root, "android", test)
+
+        print "Build Command:\n"
+        print build_command
+
+        if 'tc' in test:
+            if temp == 'es' or temp == 're' or temp == 'pm':
+                print "TCP Server"
+                jdk_env['BUILDERS']['Gradle'] = Builder(action = gradle_bin + ' install -b' + iotivity_test_root + '/src/common/app/java/java-generic/TCPTestServer/build.gradle -PIOTIVITY_TEST_ROOT=' + iotivity_test_root)
+                source_list = Glob(iotivity_test_root + '/src/common/commonutil/java/TCPTestServer/*.java')
+                tcp_server = jdk_env.Gradle(target='tcp_server', source=source_list)
+                default_targets += tcp_server
+
+                print "TCP Client"
+                jdk_env['BUILDERS']['Gradle'] = Builder(action = gradle_bin + ' installDebug -b' + iotivity_test_root + '/src/common/app/java/java-android/TCPAndroidClient/build.gradle -PIOTIVITY_TEST_ROOT=' + iotivity_test_root)
+                source_list = Glob(iotivity_test_root + '/src/common/commonutil/java/TCPAndroidClient/*.java')
+                tcp_client = jdk_env.Gradle(target='tcp_client', source=source_list)
+                default_targets += tcp_client
+
+            jdk_env['BUILDERS']['Gradle'] = Builder(action = build_command)
+            source_list = Glob(iotivity_test_root + '/src/tc/' + temp + '/junit/*.java')
+            junit_tc = jdk_env.Gradle(target='junit_tc', source=source_list)
+            default_targets += junit_tc
+
+        if 'app' in test:
+            jdk_env['BUILDERS']['Gradle'] = Builder(action = build_command + ' -Papp')
+            source_list = Glob(iotivity_test_root + '/src/iBtestapp/modules/' + temp + '/android' + '/junit/*.java')
+            interop_app = jdk_env.Gradle(target='junit_tc', source=source_list)
+            default_targets += interop_app
+
+if 'iut' in module:
+    security_mode = env_android.get('SECURITY_MODE')
+    native_script = "bash build/android/iut/native_build.sh stand_alone=false ndk_path=%s push=%s security_mode=%s" % (ndk_dir, push, security_mode)
+    default_targets += [native_script]
+    native_build = env_android.Command('native_build', None, default_targets)
+    env_android.Default(native_build)
+
+if 'ca' in module:
+    os.environ['ANDROID_HOME'] = sdk_dir
+    jdk_env = Environment(ENV=os.environ)
+
+    CURRENT_PATH = Dir('.').srcnode().abspath
+
+    if 'gtest' in framework:
+
+        param = "clean=0"
+        if push:
+            param += " push=" + push
+        param += " android_home=%s android_ndk=%s release_dir=%s target_arch=%s iotivity_root=%s iotivity_test_root=%s" % (sdk_dir, ndk_dir, release_dir, target_arch, iotivity_root, iotivity_test_root)
+        cagtest_build_script = "bash build/android/ca/gtest/native_build.sh " + param
+        cagtest_native_build = env_android.Command('cagtest_native_build', None, cagtest_build_script)
+        default_targets += cagtest_native_build
+
+    if 'junit' in framework:
+        if 'tc' in test:
+            build_command = "bash build/android/ca/junit/native_build.sh \
+            test=tc stand_alone=0 android_ndk=%s release=%s target_arch=%s iotivity_root=%s test_root=%s"\
+             % (ndk_dir, release_dir, target_arch, iotivity_root, iotivity_test_root)
+
+            ca_tc_native_build = env_android.Command('ca_tc_native_build', None, build_command)
+            default_targets += ca_tc_native_build
+
+            build_command = gradle_bin + ' ca -b' + iotivity_test_root + '/build/android/build.gradle -Pmodule_name=%s \
+            -Parch=%s -Prelease=%s -Piotivity_root=%s  -Pp=%s -Ptest_root=%s -Psrc_type=%s -Ptest=%s' \
+            %('ca', target_arch, release_dir, iotivity_root, iotivity_test_root + '/build/android/', iotivity_test_root, "android", test)
+
+            jdk_env['BUILDERS']['Gradle'] = Builder(action = build_command)
+            source_list = Glob(iotivity_test_root + '/src/tc/ca/junit/*.java')
+            cajunit_gradle_build = jdk_env.Gradle(target='cajunit_gradle_build', source=source_list)
+            default_targets += cajunit_gradle_build
+
+        if 'tc' in test or 'simulator' in test:
+            build_command = "bash build/android/ca/junit/native_build.sh test=simulator stand_alone=0 android_ndk=%s release=%s target_arch=%s iotivity_root=%s iotivity_test_root=%s" % (ndk_dir, release_dir, target_arch, iotivity_root, iotivity_test_root)
+            default_targets += env_android.Command('ca_simulator_native_build', None, build_command)
+
+            build_command = gradle_bin + ' installDebug -b' + iotivity_test_root + '/src/testapp/ca/android/casimulator/build.gradle -PTARGET_ARCH=%s -PRELEASE=%s -PANDROID_NDK=%s -PIOTIVITY_ROOT=%s' %(target_arch, release_dir, ndk_dir, iotivity_root)
+
+            jdk_env['BUILDERS']['Gradle'] = Builder(action = build_command)
+            source_list = Glob(iotivity_test_root + 'src/testapp/ca/android/casimulator/*.java')
+            ca_simulator_gradle_build = jdk_env.Gradle(target = 'ca_simulator_gradle_build', source = source_list)
+            default_targets += ca_simulator_gradle_build
+
+env_android.Default(default_targets)
diff --git a/test/build/android/build.gradle b/test/build/android/build.gradle
new file mode 100755 (executable)
index 0000000..a25dccb
--- /dev/null
@@ -0,0 +1,114 @@
+/******************************************************************
+ *
+ * Copyright 2018 Samsung Electronics All Rights Reserved.
+ *
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************/
+
+println "-----------------------------------------------------------------------"
+println "--------------------------Gradle Android Main--------------------------"
+println "-----------------------------------------------------------------------"
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'de.undercouch:gradle-download-task:1.0'
+    }
+}
+
+import de.undercouch.gradle.tasks.download.Download
+
+ext.javaExtLibDir = ""
+ext.iotivityBaseAARFileDir = "${iotivity_root}/java/iotivity-android/build/outputs/aar"
+ext.iotivityBaseAARFile ="${iotivityBaseAARFileDir}/iotivity-base-release"
+
+def downLoadLinks=['https://github.com/downloads/jsankey/android-junit-report/android-junit-report-1.5.8.jar',
+                   'https://repo1.maven.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar',
+                   'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/dexmaker/dexmaker-1.0.jar',
+                   'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/dexmaker/dexmaker-mockito-1.0.jar'
+                   ]
+
+/*
+ *task to download junit library
+ *if not exist download
+*/
+task checkCommonLibFiles(type:Download) {
+    doFirst {
+        mkdir(javaExtLibDir)
+        src (downLoadLinks)
+        overwrite false
+        dest javaExtLibDir
+    }
+}
+
+
+/*
+ * task to check iotivity base library file
+*/
+task checkBaseAARFile {
+
+       ext.iotivityBaseAARFileDir = "${iotivity_root}/java/iotivity-android/build/outputs/aar"
+       ext.iotivityBaseAARFile ="${iotivityBaseAARFileDir}/iotivity-base-release"
+
+    println iotivityBaseAARFileDir
+    println iotivityBaseAARFile+".aar"
+
+    if( !file("${iotivityBaseAARFile}.aar").exists() ) {
+        throw new GradleException("${baseAARFileFromMainBuild}.aar File  Doesn't Exist")
+    }
+}
+
+/*
+ * task to build module
+*/
+task install(type: GradleBuild, dependsOn: ['checkCommonLibFiles']) {
+    startParameter.projectProperties = project.getGradle().getStartParameter().getProjectProperties()
+    startParameter.projectProperties["buildType"] = "java"
+    startParameter.projectProperties["iotivityRoot"]= "${iotivity_root}"
+    startParameter.projectProperties["testRoot"] = "${test_root}"
+    startParameter.projectProperties["moduleName"] = "${module_name}"
+    startParameter.projectProperties["architecture"] = "${arch}"
+    startParameter.projectProperties["tcModuleDir"] = "${test_root}/src/tc/modules"
+    startParameter.projectProperties["tcModuleRoot"] = "${test_root}/src/tc/${module_name}/junit/build.gradle"
+    startParameter.projectProperties["appModuleRoot"] = "${test_root}/src/iBtestapp/modules/${module_name}/${src_type}/build.gradle"
+    startParameter.projectProperties["binDirectory"] ="${test_root}/bin/${src_type}"
+    startParameter.projectProperties["testCommonUtilSrcDirectory"] = "${test_root}/src/common/commonutil/${src_type}"
+    startParameter.projectProperties["javaExtLibDir"]="${test_root}/extlibs/java/common/"
+    startParameter.projectProperties["binDir"] = "${test_root}/bin/${src_type}/${module_name}"
+
+    startParameter.projectProperties["iotivityBaseAARFileDir"] = "${test_root}/bin/${src_type}/${module_name}"
+    startParameter.projectProperties["iotivityBaseAARFile"] = "iotivity-base-${release}"
+
+    def junitJarFile = startParameter.projectProperties["javaExtLibDir"] + "/android-junit-report-1.5.8.jar"
+    def mockitoallJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/mockito-all-1.9.5.jar"
+    def dexmakerJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/dexmaker-1.0.jar"
+    def dexmakermockitoJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/dexmaker-mockito-1.0.jar"
+    def moduleBuildFileDir = "${test_root}/src/tc"
+    javaExtLibDir = startParameter.projectProperties["javaExtLibDir"]
+
+    if(test == 'tc') { 
+        buildFile = startParameter.projectProperties["tcModuleRoot"]
+    } else if (test == 'app') {
+         buildFile = startParameter.projectProperties["appModuleRoot"]
+    }
+
+    println "------------------------\nJava Project Properties\n------------------------"
+    startParameter.projectProperties.each{ key, value -> println "    ${key} : ${value}" }
+
+    tasks = ["${module_name}build".toString()]
+}
diff --git a/test/build/android/ca/gtest/jni/Android.mk b/test/build/android/ca/gtest/jni/Android.mk
new file mode 100644 (file)
index 0000000..2af89d3
--- /dev/null
@@ -0,0 +1,162 @@
+APP_PATH := $(call my-dir)
+PROJECT_ROOT_PATH = $(IOTIVITY_ROOT)/resource/csdk/connectivity
+SIMULATOR_INCLUDE_PATH = $(IOTIVITY_TEST_ROOT)/src/testapp/ca/c_cpp/include
+SIMULATOR_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/testapp/ca/c_cpp/src
+ITC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/stc
+UTC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/btc
+HELPER_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/src/helper
+HELPER_HEADER_PATH = $(IOTIVITY_TEST_ROOT)/src/tc/ca/gtest/include
+COMMON_UTIL_SRC_PATH = $(IOTIVITY_TEST_ROOT)/src/common/commonutil/c_cpp
+COMMON_UTIL_HEADER_PATH = $(IOTIVITY_TEST_ROOT)/include
+CURRENT_PATH = $(IOTIVITY_TEST_ROOT)/build/android/ca/gtest/jni
+EXTERNAL_PATH = $(CURRENT_PATH)/external
+GTEST_PATH = $(IOTIVITY_TEST_ROOT)/extlibs/gtest-1.7.0
+BOOST_PATH = $(IOTIVITY_ROOT)/extlibs/boost/boost_1_58_0
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := libgtest
+LOCAL_CPP_EXTENSION := .cc
+LOCAL_C_INCLUDES := $(GTEST_PATH)/include $(GTEST_PATH)
+LOCAL_SRC_FILES := $(GTEST_PATH)/src/gtest-all.cc
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := boostsystemModule
+LOCAL_C_INCLUDES := $(BOOST_PATH)
+LOCAL_SRC_FILES := $(BOOST_PATH)/libs/system/src/error_code.cpp
+include $(BUILD_STATIC_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := boostfilesystemModule
+LOCAL_C_INCLUDES := $(BOOST_PATH)
+LOCAL_SRC_FILES := $(BOOST_PATH)/libs/filesystem/src/codecvt_error_category.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/operations.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/path.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/path_traits.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/portability.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/unique_path.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/utf8_codecvt_facet.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/windows_file_codecvt.cpp \
+                $(BOOST_PATH)/libs/filesystem/src/windows_file_codecvt.hpp
+include $(BUILD_STATIC_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+IOTIVITY_INCLUDE := $(IOTIVITY_ROOT)/resource/csdk/connectivity/api
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/inc
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/external/inc
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/stack/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)resource/csdk/logger/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/ocrandom/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/logger/include/experimental
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/logger/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/oic_malloc/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/c_common/oic_string/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/lib/libcoap-4.1.1/include
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/resource/csdk/connectivity/common/inc
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/extlibs/mbedtls/mbedtls/include/mbedtls
+IOTIVITY_INCLUDE += $(IOTIVITY_ROOT)/out/android/$(IOTIVITY_TARGET_ARCH)/${RELEASE_DIR}/resource/c_common
+
+COMMON_TC_INCLUDE := $(BOOST_PATH) $(GTEST_PATH) $(GTEST_PATH)/include
+COMMON_TC_INCLUDE += $(IOTIVITY_INCLUDE)
+COMMON_TC_INCLUDE += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE := connectivity_abstraction
+LOCAL_SRC_FILES := $(IOTIVITY_ROOT)/out/android/$(IOTIVITY_TARGET_ARCH)/${RELEASE_DIR}/libconnectivity_abstraction.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+LOCAL_PATH := $(APP_PATH)
+LOCAL_MODULE := helper_interface
+LOCAL_STATIC_LIBRARIES := libgtest boostsystemModule boostfilesystemModule
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
+LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAHelper.cpp $(COMMON_UTIL_SRC_PATH)/CommonUtil.cpp $(COMMON_UTIL_SRC_PATH)/CommonTestUtil.cpp
+LOCAL_LDLIBS := -llog
+LOCAL_CFLAGS := -std=gnu++11 -fpermissive -D__CA__ -D__WITH_DTLS__ -DTCP_ADAPTER -D__ANDROID_NATIVE__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+include $(BUILD_STATIC_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+include $(CLEAR_VARS)
+LOCAL_PATH := $(APP_PATH)
+LOCAL_MODULE := tcp_helper_interface
+LOCAL_STATIC_LIBRARIES := libgtest boostsystemModule boostfilesystemModule
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
+LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
+LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAHelper.cpp $(COMMON_UTIL_SRC_PATH)/CommonUtil.cpp
+LOCAL_LDLIBS := -llog
+LOCAL_CFLAGS := -std=gnu++11 -fpermissive -D__CA__ -DTCP_ADAPTER -D__ANDROID_NATIVE__ -D__WITH_DTLS__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+include $(BUILD_STATIC_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := iotivity_ca_test
+LOCAL_STATIC_LIBRARIES := helper_interface
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__WITH_DTLS__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
+LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
+LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
+                     $(ITC_PATH)/CACommonTest.cpp \
+                     $(UTC_PATH)/CATest.cpp
+LOCAL_LDFLAGS := -fPIE -pie
+include $(BUILD_EXECUTABLE)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := iotivity_ca_ip_test
+LOCAL_STATIC_LIBRARIES := helper_interface
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__IP__ -D__WITH_DTLS__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
+LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
+LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
+                     $(ITC_PATH)/CANetworkCommonTest.cpp  \
+                     $(ITC_PATH)/CAClientTest.cpp \
+                     $(ITC_PATH)/CAMulticastTest.cpp \
+                     $(UTC_PATH)/CANetworkTest.cpp
+LOCAL_LDFLAGS := -fPIE -pie
+include $(BUILD_EXECUTABLE)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := iotivity_ca_tcp_test
+LOCAL_STATIC_LIBRARIES := helper_interface
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -DTCP_ADAPTER -D__ANDROID__ -D__ANDROID_NATIVE__ -D__ALL_TRANSPORT__ -D__TCP__ -D__WITH_DTLS__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+LOCAL_C_INCLUDES := $(COMMON_TC_INCLUDE)
+LOCAL_C_INCLUDES += $(COMMON_UTIL_HEADER_PATH) $(EXTERNAL_PATH) $(HELPER_HEADER_PATH)
+LOCAL_SRC_FILES := $(HELPER_SRC_PATH)/CAAndroidGtestRunner.cpp \
+                     $(ITC_PATH)/CANetworkCommonTest.cpp  \
+                     $(ITC_PATH)/CAClientTest.cpp \
+                     $(UTC_PATH)/CANetworkTest.cpp
+
+LOCAL_LDFLAGS := -fPIE -pie
+include $(BUILD_EXECUTABLE)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := iotivity_ca_simulator
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+#LOCAL_STATIC_LIBRARIES := CA
+LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__CA__ -D__WITH_DTLS__ -D__ANDROID_NATIVE__ -DTCP_ADAPTER
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+LOCAL_C_INCLUDES = $(IOTIVITY_INCLUDE)
+LOCAL_C_INCLUDES += $(SIMULATOR_INCLUDE_PATH)
+LOCAL_SRC_FILES := $(SIMULATOR_SRC_PATH)/ca_simulator.c
+LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog
+LOCAL_LDFLAGS := -fPIE -pie
+include $(BUILD_EXECUTABLE)
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/test/build/android/ca/gtest/jni/Application.mk b/test/build/android/ca/gtest/jni/Application.mk
new file mode 100755 (executable)
index 0000000..cea3f34
--- /dev/null
@@ -0,0 +1,6 @@
+APP_STL := gnustl_shared
+APP_PLATFORM = android-21
+APP_CPPFLAGS += -fexceptions
+APP_CPPFLAGS += -frtti
+APP_CFLAGS = -Wno-error=format-security
+
diff --git a/test/build/android/ca/gtest/native_build.sh b/test/build/android/ca/gtest/native_build.sh
new file mode 100755 (executable)
index 0000000..c959fde
--- /dev/null
@@ -0,0 +1,136 @@
+#!/bin/bash
+
+push='exe'
+clean='1'
+release_dir='debug'
+total_device=1
+red=`tput setaf 1`
+green=`tput setaf 2`
+reset=`tput sgr0`
+stand_alone='1'
+android_home=${ANDROID_HOME}
+android_ndk=${ANDROID_NDK}
+target_arch='x86'
+
+for i in `seq 1 $#` 
+do
+    eval arg=\$$i
+    arg=${arg// /+}
+    args+=$arg" "
+done
+
+arg_parts=(${args//=/ })
+len=${#arg_parts[@]}
+
+i=0
+while [ $i -lt $len ]; do
+    arg_parts[i]=${arg_parts[i],,}
+    let i=i+2
+done
+
+i=0
+while [ $i -lt $len ]; do
+    arg=${arg_parts[i+1]}
+    arg=${arg//+/ }
+    if [[ "${arg_parts[i]}" = "push" ]]; then
+        push=${arg}
+    elif [[ "${arg_parts[i]}" = "clean" ]]; then
+        clean=${arg}
+    elif [[ "${arg_parts[i]}" = "iotivity_root" ]]; then
+        IOTIVITY_ROOT=${arg}
+    elif [[ "${arg_parts[i]}" = "iotivity_test_root" ]]; then
+        IOTIVITY_TEST_ROOT=${arg}
+    elif [[ "${arg_parts[i]}" = "clean" ]]; then
+        clean=${arg}
+    elif [[ "${arg_parts[i]}" = "target_arch" ]]; then
+        target_arch=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "release_dir" ]]; then
+        release_dir=${arg}
+    elif [[ "${arg_parts[i]}" = "android_home" ]]; then
+        android_home=${arg}
+    elif [[ "${arg_parts[i]}" = "stand_alone" ]]; then
+        stand_alone=${arg}
+    fi
+    let i=i+2
+done
+
+adb_path=${android_home}'/platform-tools/adb'
+
+if [[ "${push}" = "exe" || "${push}" = "lib" ]]; then
+
+    device_ids=$(${adb_path} devices | awk '/[a-zA-Z0-9]+[ \t]+device$/{print $1}')
+    
+    device_list=(${device_ids})
+    total_device=${#device_list[@]}
+
+    if [ $total_device -lt 1 ]; then
+        echo ${red}'No device Found'${reset}
+        exit 127
+    fi
+
+    echo 'total_device: '${total_device}
+fi
+
+cwd=$(pwd)
+cd build/android/ca/gtest
+
+if [[ "${clean}" = "1" ]]; then
+    rm -rf obj
+fi
+
+echo '-----------------------Environment Variable-----------------------'
+export RELEASE_DIR=${release_dir}
+export IOTIVITY_TEST_ROOT=${IOTIVITY_TEST_ROOT}
+export IOTIVITY_ROOT=${IOTIVITY_ROOT}
+export IOTIVITY_TARGET_ARCH=${target_arch}
+echo ${IOTIVITY_ROOT}
+echo ${IOTIVITY_TEST_ROOT}
+echo '-----------------------End-----------------------'
+
+rm -rf libs
+
+${android_ndk}/ndk-build
+
+cd ${cwd}
+
+file_list=(libconnectivity_abstraction.so libgnustl_shared.so iotivity_ca_test iotivity_ca_ip_test iotivity_ca_tcp_test iotivity_ca_simulator)
+
+total_file=${#file_list[@]}
+
+i=0
+
+while [ $i -lt $total_file ]; do
+  
+    if [ ! -f build/android/ca/gtest/libs/${target_arch}/${file_list[i]}  ]; then
+        echo ${red}'File '${file_list[i]}' isn not created !!!'${reset}
+        echo ${red}'Build Failed'${reset}
+        exit 127
+    fi
+  
+    echo ${green}${file_list[i]}' Build Successful'${reset}
+  
+    let i=i+1
+done
+
+
+if [[ "${push}" = "exe" || "${push}" = "lib" ]]; then
+    i=0
+    while [ $i -lt $total_device ]; do
+    
+        device_id='-s '${device_list[i]}
+        echo 'device_id: '${device_id}
+
+        ${adb_path} $device_id push ${IOTIVITY_TEST_ROOT}/res/ca_resource/runner.sh /data/local/tmp/
+        ${adb_path} $device_id push ${IOTIVITY_TEST_ROOT}/res/ca_resource/config.ini /data/local/tmp/
+
+        echo 'total_file: '${total_file}
+        j=0    
+        while [ $j -lt $total_file ]; do
+            ${adb_path} $device_id push build/android/ca/gtest/libs/${target_arch}/${file_list[j]} /data/local/tmp/
+            echo ${green}${file_list[j]}' pushed /data/local/tmp folder in device '${device_id}${reset}
+            let j=j+1
+        done
+
+        let i=i+1
+    done
+fi
diff --git a/test/build/android/ca/junit/jni/Android.mk b/test/build/android/ca/junit/jni/Android.mk
new file mode 100755 (executable)
index 0000000..eed35f1
--- /dev/null
@@ -0,0 +1,38 @@
+APP_PATH := $(call my-dir)
+CURRENT_PATH = $(IOTIVITY_TEST_ROOT)/build/android/ca/junit
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE := connectivity_abstraction
+LOCAL_SRC_FILES := $(IOTIVITY_ROOT)/out/android/$(IOTIVITY_TARGET_ARCH)/$(RELEASE_DIR)/libconnectivity_abstraction.so
+include $(PREBUILT_SHARED_LIBRARY)
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+include $(CLEAR_VARS)
+LOCAL_PATH := $(APP_PATH)
+LOCAL_MODULE := CAJni
+LOCAL_SHARED_LIBRARIES := connectivity_abstraction
+LOCAL_C_INCLUDES := $(CURRENT_PATH)
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/api 
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/inc 
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/common/inc 
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/c_common/
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/c_common/oic_malloc/include
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/c_common/oic_string/include
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/c_common/ocrandom/include
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/logger/include 
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/lib/libcoap-4.1.1
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/lib/libcoap-4.1.1/include
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/src/bt_le_adapter/android/
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/util/inc/
+LOCAL_C_INCLUDES += $(IOTIVITY_ROOT)/resource/csdk/connectivity/util/src/camanager/android/
+
+LOCAL_SRC_FILES := $(CURRENT_PATH)/jni/CAJni.c
+
+LOCAL_LDLIBS := -llog
+LOCAL_CFLAGS := -std=c99 -D__CA__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+include $(BUILD_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/test/build/android/ca/junit/jni/Application.mk b/test/build/android/ca/junit/jni/Application.mk
new file mode 100755 (executable)
index 0000000..cea3f34
--- /dev/null
@@ -0,0 +1,6 @@
+APP_STL := gnustl_shared
+APP_PLATFORM = android-21
+APP_CPPFLAGS += -fexceptions
+APP_CPPFLAGS += -frtti
+APP_CFLAGS = -Wno-error=format-security
+
diff --git a/test/build/android/ca/junit/native_build.sh b/test/build/android/ca/junit/native_build.sh
new file mode 100755 (executable)
index 0000000..f721e4b
--- /dev/null
@@ -0,0 +1,102 @@
+#!/bin/bash
+
+for i in `seq 1 $#`
+do
+    eval arg=\$$i
+    arg=${arg// /+}
+    args+=$arg" "
+done
+
+arg_parts=(${args//=/ })
+len=${#arg_parts[@]}
+
+clean='1'
+test='tc'
+release_dir='debug'
+android_ndk=${ANDROID_NDK}
+stand_alone='1'
+target_arch='armeabi'
+iotivity_root=''
+iotivity_test_root=''
+
+i=0
+while [ ${i} -lt ${len} ]; do
+    arg_parts[i]=${arg_parts[i],,}
+    let i=i+2
+done
+
+i=0
+while [ $i -lt $len ]; do
+    if [[ "${arg_parts[i]}" = "clean" ]]; then
+        clean=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "iotivity_root" ]]; then
+        iotivity_root=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "iotivity_test_root" ]]; then
+        iotivity_test_root=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "test" ]]; then
+        test=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "target_arch" ]]; then
+        target_arch=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "release" ]]; then
+        release_dir=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "android_ndk" ]]; then
+        android_ndk=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "stand_alone" ]]; then
+        stand_alone=${arg_parts[i+1]}
+    fi
+    let i=i+2
+done
+
+current_path=`pwd`
+
+if [[ "${stand_alone}" = "0" ]]; then
+    cd build/android/ca/junit
+fi
+
+if [[ "${android_ndk}" = "" ]]; then
+    echo 'ANDROID_NDK NOT DEFINED'
+    echo 'Script Exiting...'
+    exit 127
+fi
+
+ndk_file=${android_ndk}'/ndk-build'
+if [ ! -f "${ndk_file}" ]; then
+    echo 'Invalid ANDROID_NDK. No ndk-build found in path: '${android_ndk}
+    echo 'Script Exiting...'
+    exit 127
+fi
+
+export RELEASE_DIR=${release_dir}
+export IOTIVITY_TEST_ROOT=${iotivity_test_root}
+export IOTIVITY_ROOT=${iotivity_root}
+export IOTIVITY_TARGET_ARCH=${target_arch}
+export CURRENT_PATH=${current_path}
+
+dst_path=${IOTIVITY_TEST_ROOT}'/build/android/ca/junit/jni'
+tc_path=${IOTIVITY_TEST_ROOT}'/src/tc/ca/junit/jni'
+simulator_path=${IOTIVITY_TEST_ROOT}'/src/testapp/ca/android/casimulator/src/main/jni'
+
+rm ${dst_path}/org_iotivity_CAJni.h
+rm ${dst_path}/CAJni.c
+
+if [[ "${test}" = "tc" ]]; then
+    cp ${tc_path}/org_iotivity_CAJni.h ${dst_path}/org_iotivity_CAJni.h
+    cp ${tc_path}/CAJni.c ${dst_path}/CAJni.c
+fi
+
+if [[ "${test}" = "simulator" ]]; then
+    cp ${simulator_path}/org_iotivity_CAJni.h ${dst_path}/org_iotivity_CAJni.h
+    cp ${simulator_path}/CAJni.c ${dst_path}/CAJni.c
+fi
+
+if [[ "${clean}" = "1" ]]; then
+    rm -rf libs
+    rm -rf obj
+fi
+
+${android_ndk}/ndk-build
+
+mkdir -p ${IOTIVITY_TEST_ROOT}/extlibs/android/ca/${target_arch}
+cp -r ./libs/${target_arch}/* ${IOTIVITY_TEST_ROOT}/extlibs/android/ca/${target_arch}
+
+cd ${current_path}
diff --git a/test/build/android/iut/jni/Android.mk b/test/build/android/iut/jni/Android.mk
new file mode 100755 (executable)
index 0000000..8bf16ad
--- /dev/null
@@ -0,0 +1,54 @@
+APP_PATH := $(call my-dir)
+IOTIVITY_RELEASE_PATH = $(IOTIVITY_PATH)/out/android/armeabi/$(RELEASE_DIR)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := OC
+LOCAL_SRC_FILES := $(IOTIVITY_RELEASE_PATH)/liboc.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := OC_LOGGER
+LOCAL_SRC_FILES := $(IOTIVITY_RELEASE_PATH)/liboc_logger.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := OC_PM_API
+LOCAL_SRC_FILES := $(IOTIVITY_RELEASE_PATH)/libocpmapi.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := OC_TB_STACK
+LOCAL_SRC_FILES := $(IOTIVITY_RELEASE_PATH)/liboctbstack.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := CA
+LOCAL_SRC_FILES := $(IOTIVITY_RELEASE_PATH)/libconnectivity_abstraction.so
+include $(PREBUILT_SHARED_LIBRARY)
+
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+include $(CLEAR_VARS)
+LOCAL_MODULE := ConformanceSimulator
+LOCAL_SHARED_LIBRARIES := OC OC_LOGGER OC_PM_API OC_TB_STACK CA
+LOCAL_CFLAGS := -std=gnu++11 -fPIE -fpermissive -D__WITH_DTLS__ -D__ANDROID__
+LOCAL_CPPFLAGS := -pthread -frtti -fexceptions
+LOCAL_C_INCLUDES = $(HEADER_PATH)
+LOCAL_C_INCLUDES += $(IOTIVITY_PATH)/resource/include
+LOCAL_C_INCLUDES += $(IOTIVITY_PATH)/resource/csdk/stack/include
+LOCAL_C_INCLUDES += $(IOTIVITY_PATH)/resource/c_common
+LOCAL_C_INCLUDES += $(IOTIVITY_PATH)/resource/oc_logger/include
+LOCAL_C_INCLUDES += $(IOTIVITY_PATH)/extlibs/boost/boost_1_58_0
+LOCAL_C_INCLUDES += $(TEST_PROJECT_ROOT)/include
+LOCAL_SRC_FILES := $(TEST_PROJECT_ROOT)/src/testapp/IUTSimulatorApp/c_cpp/IUTSimulator.cpp \
+                                        $(TEST_PROJECT_ROOT)/src/common/commonutil/c_cpp/ResourceHelper.cpp  \
+                                        $(TEST_PROJECT_ROOT)/src/common/commonutil/c_cpp/ResourceServer.cpp \
+                                        $(TEST_PROJECT_ROOT)/src/common/commonutil/c_cpp/SampleResource.cpp
+LOCAL_LDFLAGS := -fPIE -pie
+include $(BUILD_EXECUTABLE)
+#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
diff --git a/test/build/android/iut/jni/Application.mk b/test/build/android/iut/jni/Application.mk
new file mode 100755 (executable)
index 0000000..74501bb
--- /dev/null
@@ -0,0 +1,6 @@
+APP_STL := gnustl_shared 
+APP_PLATFORM = android-21
+APP_CPPFLAGS += -fexceptions
+APP_CPPFLAGS += -frtti
+APP_CFLAGS = -Wno-error=format-security
+
diff --git a/test/build/android/iut/native_build.sh b/test/build/android/iut/native_build.sh
new file mode 100755 (executable)
index 0000000..2dd70dd
--- /dev/null
@@ -0,0 +1,141 @@
+#!/bin/bash
+
+# ./build.sh device_id=android_devices_id clean=true
+
+deviceId=''
+push="true"
+clean="true"
+source=""
+iotivity_dir="iotivity"
+given_adapter=""
+release='1'
+stand_alone='true'
+security_mode='justworks'
+ndk_path=$ANDROID_NDK
+
+for i in `seq 1 $#` 
+do
+       eval arg=\$$i
+       arg=${arg// /+}
+    args+=$arg" "
+done
+
+arg_parts=(${args//=/ })
+len=${#arg_parts[@]}
+
+i=0
+while [ $i -lt $len ]; do
+    arg_parts[i]=${arg_parts[i],,}
+    let i=i+2
+done
+
+i=0
+while [ $i -lt $len ]; do
+    if [[ "${arg_parts[i]}" = "device_id" ]]; then
+        deviceId="-s "${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "push" ]]; then
+        push=${arg_parts[i+1],,}
+    elif [[ "${arg_parts[i]}" = "clean" ]]; then
+        clean=${arg_parts[i+1],,}
+    elif [[ "${arg_parts[i]}" = "target_source" ]]; then
+        source=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "iotivity_dir" ]]; then
+        iotivity_dir=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "release" ]]; then
+        release=${arg_parts[i+1],,}
+    elif [[ "${arg_parts[i]}" = "stand_alone" ]]; then
+        stand_alone=${arg_parts[i+1],,}     
+    elif [[ "${arg_parts[i]}" = "ndk_path" ]]; then
+        ndk_path=${arg_parts[i+1]}
+    elif [[ "${arg_parts[i]}" = "security_mode" ]]; then
+        security_mode=${arg_parts[i+1],,}        
+    fi
+    let i=i+2
+done
+
+if [[ "${stand_alone}" = "false" ]] || [[ "${stand_alone}" = "0" ]]; then
+    cd build/android/iut
+fi    
+
+ndk_file=${ndk_path}"/ndk-build"
+if [ ! -f "$ndk_file" ]; then
+    echo 'Invalid ANDROID_NDK. No ndk-build found'
+    echo 'Script Exiting...'
+    exit 127
+fi
+
+current_path=`pwd`
+echo 'current_path: '$current_path
+
+cd ../../../
+test_project_root=`pwd`
+echo 'test_project_root: '$test_project_root
+       
+cd ..
+iotivity_path=`pwd`
+echo 'iotivity_path: '$iovitiy_path
+
+cd $current_path
+
+if [[ "${clean}" = "true" ]] || [[ "${clean}" = "1" ]]; then
+    rm -rf libs
+    rm -rf obj
+fi
+
+if [[ "${release}" = "true" ]] || [[ "${release}" = "1" ]]; then
+    release_dir='release'
+else
+    release_dir='debug'    
+fi
+
+export IOTIVITY_PATH=$iotivity_path
+export RELEASE_DIR=$release_dir
+export TEST_PROJECT_ROOT=$test_project_root
+
+echo '-----------------------Environment Variable-----------------------'
+echo $TEST_PROJECT_ROOT
+echo $IOTIVITY_PATH
+echo $RELEASE_DIR
+echo '-----------------------End-----------------------'
+
+rm -rf libs
+
+${ndk_path}/ndk-build
+
+if [ -f libs/armeabi/ConformanceSimulator ]; then
+    echo 'Build Successful'
+else
+    echo 'Build Failed'
+    exit 127
+fi
+
+if [[ "${push}" = "true" ]] || [[ "${push}" = "1" ]]; then
+    echo 'Pushing files in adnroid device ...'
+
+    adb $deviceId push libs/armeabi/libconnectivity_abstraction.so /data/local/tmp/obj/local/armeabi/libconnectivity_abstraction.so
+    adb $deviceId push libs/armeabi/libgnustl_shared.so /data/local/tmp/obj/local/armeabi/
+    adb $deviceId push libs/armeabi/liboc.so /data/local/tmp/obj/local/armeabi/
+    adb $deviceId push libs/armeabi/liboc_logger.so /data/local/tmp/obj/local/armeabi/
+    adb $deviceId push libs/armeabi/libocpmapi.so /data/local/tmp/obj/local/armeabi/
+    adb $deviceId push libs/armeabi/liboctbstack.so /data/local/tmp/obj/local/armeabi/
+    adb $deviceId push libs/armeabi/ConformanceSimulator /data/local/tmp/
+    
+    if [[ "${security_mode}" = "justworks" ]]; then
+        db_filename='oic_svr_db_server_justworks.dat'
+    elif [[ "${arg_parts[i]}" = "randompin" ]]; then
+        db_filename='oic_svr_db_server_randompin.dat'
+    fi
+    
+    adb $deviceId push $iotivity_path/resource/csdk/security/provisioning/sample/oic_svr_db_server_justworks.dat /usr/apps/com.oic.cs/bin/oic_svr_db_server_justworks.dat
+    adb $deviceId push $iotivity_path/resource/csdk/security/provisioning/sample/oic_svr_db_server_randompin.dat /usr/apps/com.oic.cs/bin/oic_svr_db_server_randompin.dat
+    adb $deviceId push $iotivity_path/resource/csdk/security/provisioning/sample/$db_filename /usr/apps/com.oic.cs/bin/oic_svr_db_server.dat
+    
+fi
+
+mkdir -p $test_project_root/bin/android/iut/
+cp -rf $test_project_root/build/android/iut/libs/armeabi/* $test_project_root/bin/android/iut
+rm -rf $test_project_root/build/android/iut/libs
+
+if [[ "${stand_alone}" = "false" ]] || [[ "${stand_alone}" = "0" ]]; then
+    cd ../../../
+fi    
diff --git a/test/build/android/lib_maker.sh b/test/build/android/lib_maker.sh
new file mode 100755 (executable)
index 0000000..3aab001
--- /dev/null
@@ -0,0 +1,247 @@
+#!/bin/bash
+
+<<"License"
+/******************************************************************
+ *
+ * Copyright 2016 Samsung Electronics All Rights Reserved.
+ *
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************/'
+License
+
+### To execute this file, use ./lib_maker.sh <module> <mode> <iotivityHome> <testHome>###
+### Example for calling this script: ./lib_maker.sh tm release ###
+### Its only for rh and tm module ###
+### The default mode is release ###
+
+module=$1
+mode=$2
+iotivityHomePath=$3
+testPath=$4
+
+tmpFolder="tmpDir"
+currentDir=$(pwd)
+
+#Project home from tmpDir folder
+
+if [[ ! -z $iotivityHomePath ]]; then
+       if [ -d "$iotivityHomePath" ]; then
+               iotivityHome="$iotivityHomePath"
+               echo "Continue with IoTivity Home Path: $iotivityHome"
+       else
+               echo "******* $iotivityHomePath ==> Is not a currect directory *******"
+               exit 1
+       fi
+else
+       cd ../../..
+       iotivityHome=$(pwd)
+       cd $currentDir
+fi
+
+# TestHome path set
+if [[ ! -z $testPath ]]; then
+       if [ -d "$testPath" ]; then
+               testHome="$testPath"
+               echo "Continue with Test Home Path: $testHome"
+       else
+               echo "******* $testPath ==> Is not a currect directory *******"
+               exit 1
+       fi
+else
+       cd ../..
+       testHome=$(pwd)
+       cd $currentDir
+fi
+
+
+
+serviceHome="$iotivityHome/service"
+
+extlibsDir="$testHome/extlibs/android"
+isCopied=true
+arch="armeabi"
+
+tmpLibProject="$testHome/$tmpFolder"
+
+outDir="$iotivityHome/out/android/$arch/$mode"
+
+if [ "$mode" != "debug" ]; then
+       mode="release"
+else
+       mode="debug"
+fi
+
+## Checking Module ##
+if [[ $module == "rh" || $module == "tm" || $module == "rc" ]]; then
+       echo "Creating Library Project for $module."
+else
+       echo "Please enter valid module. Valid module are rh, rc and tm"
+       echo "Exit from Lib Maker...."
+       exit 1
+fi
+
+copy_api_project()
+{
+       echo "Copy Command: $copySrcCommand"
+
+       if eval $copySrcCommand; then
+               echo "API Project copied successfully"
+       else
+               isCopied=false
+               echo "Can't copy API Project"
+       fi
+}
+
+copy_bundles()
+{
+       bmiBundle="libBMISensorBundle.so"
+       diBundle="libDISensorBundle.so"
+
+       copyBMIBundle="cp -r $outDir/$bmiBundle $rcAssetDir/$bmiBundle"
+       copyDIBundle="cp -r $outDir/$diBundle $rcAssetDir/$diBundle"
+
+       if eval $copyBMIBundle && $copyDIBundle; then
+               echo "Copy BMI and DI successfully..."
+       else
+               echo "Can't copy bundle files...."
+       fi
+
+       hueBundleDir="$hueSampleDir/target"
+
+       for i in `find $hueBundleDir -name hue*.jar`;
+       do
+               copyHueBundle="cp -r $i $rcAssetDir/"
+               if eval $copyHueBundle; then
+                       echo "Copy Hue Bundle successfully..."
+               else
+                       echo "Can't copy Hue Bundle file...."
+               fi
+       done
+}
+
+hue_bundle_mvn_build()
+{
+       hueHomeCommand="cd $hueSampleDir"
+       hueCompileCommand="mvn compile"
+       hueInstallCommand="mvn install"
+       hueCopyCommand=""
+
+       # Go to hueJavaSample project
+       if eval $hueHomeCommand; then
+               echo "### Current directory $(pwd) ###"
+               if eval $hueCompileCommand; then
+                       if eval $hueInstallCommand; then
+                               echo "HueJavaSample build and installed successfully..."
+                       else
+                               echo "Fail to execute $hueInstallCommand at $hueSampleDir...!!!"
+                       fi
+               else
+                       echo "Fail to execute $hueCompileCommand at $hueSampleDir...!!!"
+               fi
+
+               # Go to build directory
+               cd $currentDir
+       fi
+}
+
+make_library_project()
+{
+       echo "### API Directory: $apiDir ###"
+
+       android_command="android create lib-project --name $module --target android-21 --path $tmpLibProject --package $package"
+       copySrcCommand="cp -r $apiDir $tmpLibProject"
+
+       if eval $android_command; then
+               echo "$module Library project is created successfully"
+
+               echo "Copy the API files to Library Project"
+               copy_api_project
+
+               baseLibPath="$iotivityHome/android/android_api/base/build/intermediates/bundles/$mode/classes.jar"
+               if [ $module == "tm" ]; then
+                       copyBase="cp $baseLibPath $tmpLibProject/libs/"
+                       if eval $copyBase; then
+                               echo "base.jar copied for TM..."
+                       else
+                               echo "Can't copy base.jar"
+                               isCopied=false
+                       fi
+               fi
+
+               if [ $isCopied == true ]; then
+                       cd $tmpLibProject
+                       echo "Build Library Project Started..."
+                       buildcommand="ant clean debug"
+
+                       if eval $buildcommand; then
+                               if [ ! -d "$extlibsDir/$module" ]; then
+                                       mkdir -p $extlibsDir/$module
+                               fi
+
+                               copyAPILib="cp -r $tmpLibProject/bin/classes.jar $extlibsDir/$module/$module.jar"
+
+                               if eval $copyAPILib; then
+                                       echo "API Library file created and copied to libs directory successfully as $module.jar"
+                               else
+                                       echo "API Library is not created properly..."
+                               fi
+                       else
+                               echo "Build Library Project failed."
+                       fi
+
+                       cd $testHome
+               else
+                       echo "Can't build the API project."
+               fi
+       else
+          echo "$module Library project creation failed"
+       fi
+}
+
+remove_temp_folder ()
+{
+       removeTmp="rm -rf "$tmpFolder"/"
+
+       if eval $removeTmp; then
+               echo "temp folder removed"
+       else
+               echo "Can't remove temp folder"
+       fi
+}
+
+if [ $module == "rh" ]; then
+       package="org.iotivity.service.rh"
+       rhHome="$serviceHome/resource-hosting"
+       apiDir="$rhHome/android/resource_hosting/*"
+       make_library_project
+elif [ $module == "tm" ]; then
+       package="org.iotivity.service.tm"
+       tmHome="$serviceHome/things-manager"
+       apiDir="$tmHome/sdk/java/*"
+       make_library_project
+elif [ $module == "rc" ]; then
+       rcHome="$serviceHome/resource-container"
+       hueSampleDir="$rcHome/examples/HueJavaSampleBundle/hue"
+       hue_bundle_mvn_build
+       rcAssetDir="$testHome/src/tc/rc/junit/assets/lib"
+       echo "### Current directory $(pwd) ###"
+       copy_bundles
+fi
+
+# Called Removing temp. directory function
+remove_temp_folder
+
+echo "API Library Maker has finished..."
diff --git a/test/build/arduino/SConscript b/test/build/arduino/SConscript
new file mode 100644 (file)
index 0000000..66af27b
--- /dev/null
@@ -0,0 +1,348 @@
+##
+# The build script for Arduino
+#
+## 
+
+print '\n---------------Started Building IotivitySecTest for Arduino---------------\n'
+
+SConscript('config.scons')
+SConscript('arduino.scons')
+
+Import('env')
+
+target_arch = env.get('TARGET_ARCH')
+target_service = env.get('TARGET_SERVICE')
+tc_type = env.get('TARGET_TC')
+target_transport = env.get('TARGET_TRANSPORT')
+target_secured = env.get('SECURED')
+target_upload = env.get('UPLOAD')
+variant_dir = env.get('VARIANT_DIR')
+target_port = env.get('TARGET_PORT')
+target_source = env.get('TARGET_SOURCE')
+
+if target_source == None:
+       print "No TARGET SOURCE Found"
+else:  
+       print "target source is --------------------------------" + target_source
+
+if env.get('RELEASE'):
+       target_release = 'release'
+else:
+       target_release = 'debug'
+
+# Initializing Home Dir
+######################################################################
+
+ENV_HOME = '../../..'
+PROJECT_HOME = '../../'
+EXT_LIB_HOME = PROJECT_HOME + 'extlibs'
+#EXT_LIB_HOME = ENV_HOME + '/IotivitySECTestExtLibs'
+
+if target_source == '':
+       ORG_SRC_HOME = ENV_HOME
+else:
+       ORG_SRC_HOME = ENV_HOME + '/IotivityOrgSource/' + target_source + '/iotivity'
+               
+#ORG_SRC_HOME = ENV_HOME + '/IotivityOrgSource/' + target_source + '/iotivity'
+
+######################################################################
+
+# Initializing COMMON Dir
+######################################################################
+RESOURCE_OC_LOGGER_INCLUDE_DIR = ORG_SRC_HOME + '/resource/oc_logger/include'
+RESOURCE_LOGGER_INCLUDE_DIR = ORG_SRC_HOME + '/resource/csdk/logger/include'
+EXTLIB_CJSON_DIR = ORG_SRC_HOME + '/extlibs/cjson'
+RESOURCE_OC_STACK_INCLUDE = ORG_SRC_HOME + '/resource/csdk/stack/include'
+RESOURCE_C_COMMON = ORG_SRC_HOME + '/resource/c_common'
+
+
+######################################################################
+
+# Initializing CA Arduino Dir
+######################################################################
+
+CA_ARDUINO_DIR = ORG_SRC_HOME + '/resource/csdk/connectivity'
+CA_ARDUINO_LIB = ORG_SRC_HOME + '/out/arduino/avr/' + target_release
+
+CA_ARDUINO_INCLUDE = CA_ARDUINO_DIR + '/inc'
+CA_ARDUINO_API_INCLUDE = CA_ARDUINO_DIR + '/api'
+CA_ARDUINO_COAP_INCLUDE = CA_ARDUINO_DIR + '/lib/libcoap-4.1.1/'
+CA_ARDUINO_COMMON_INCLUDE = CA_ARDUINO_DIR + '/common/inc/'
+#CA_ARDUINO_SAMPLE_INCLUDE = CA_ARDUINO_DIR + '/samples/arduino/cahelper/'
+CA_ARDUINOUNIT_INCLUDE = EXT_LIB_HOME + '/ArduinoUnit'
+
+######################################################################
+
+# Initializing PHY Arduino Dir
+######################################################################
+print "Initializing PHY Arduino Dir "
+
+PHY_ARDUINO_RESOURCE_DIR = ORG_SRC_HOME + '/resource/csdk/connectivity'
+PHY_DIR = ORG_SRC_HOME + '/service/easy-setup'
+PHY_ARDUINO_LIB = ORG_SRC_HOME + '/out/arduino/avr/' + target_release
+
+PHY_SDK_COMMON = PHY_DIR + '/sdk/common'
+PHY_SDK_ENROLLEE_COMMON_INCLUDE = PHY_DIR + '/sdk/enrollee/common/inc'
+PHY_SDK_ENROLLEE_COMMON_SOURCE = PHY_DIR + '/sdk/enrollee/common/src'
+PHY_SDK_ENROLLEE_WIFI = PHY_DIR + '/sdk/enrollee/arduino/wifi'
+PHY_SDK_ENROLLEE_API = PHY_DIR + '/sdk/enrollee/api'
+
+######################################################################
+
+# Initializing Project Dir
+######################################################################
+
+TC_DIR = PROJECT_HOME +  variant_dir + 'tc' + '/ca/arduinounit/src'
+TESTAPP_DIR = PROJECT_HOME +  variant_dir + 'testapp' + '/ca/c_cpp'
+ITC_DIR = TC_DIR + '/stc'
+UTC_DIR = TC_DIR + '/btc'
+SECTEST_DIR = ENV_HOME + '/IotivitySECTest'
+
+COMMON_DIR = PROJECT_HOME + variant_dir + 'common'
+COMMON_UTIL_DIR = PROJECT_HOME + variant_dir + 'common/commonutil/c_cpp'
+CA_ARDUINO_COMMON_DIR = TC_DIR + '/helper'
+TEST_APP_DIR = PROJECT_HOME + variant_dir + 'test_app'
+CA_ARDUINO_TEST_APP_DIR = TEST_APP_DIR + '/ca/arduino' 
+
+INCLUDE_DIR = PROJECT_HOME + '/include'
+TC_INCLUDE_DIR = PROJECT_HOME +  variant_dir + 'tc' + '/ca/arduinounit/include'
+CA_ARDUINO_INCLUDE_DIR = TC_INCLUDE_DIR + '/ca/arduinounit'
+COMMON_UTIL_INCLUDE_DIR = INCLUDE_DIR + '/commonutil'
+CA_SIMULATOR_INCLUDE_DIR = TESTAPP_DIR + '/include' 
+OIC_MALLOC_INCLUDE = ORG_SRC_HOME + '/resource/c_common/oic_malloc/include'
+OIC_STRING_INCLUDE = ORG_SRC_HOME + '/resource/c_common/oic_string/include'
+CA_COMMON_LIBC = CA_ARDUINO_LIB + '/resource/c_common'
+PHY_INCLUDE = TC_INCLUDE_DIR + '/PHY/arduinounit'
+
+######################################################################
+
+# Initializing Includes
+######################################################################
+print "Initializing Includes"
+
+COMMON_CINCLUDE = [COMMON_UTIL_INCLUDE_DIR, INCLUDE_DIR, TC_INCLUDE_DIR, CA_ARDUINO_INCLUDE_DIR, OIC_MALLOC_INCLUDE, OIC_STRING_INCLUDE, RESOURCE_OC_STACK_INCLUDE, RESOURCE_C_COMMON]
+
+CA_ARDUINO_CINCLUDE = [COMMON_CINCLUDE, CA_ARDUINO_INCLUDE, CA_ARDUINO_API_INCLUDE, CA_ARDUINO_COAP_INCLUDE, CA_ARDUINO_COMMON_INCLUDE, CA_ARDUINOUNIT_INCLUDE, CA_SIMULATOR_INCLUDE_DIR]
+
+PHY_ARDUINO_CINCLUDE = [COMMON_CINCLUDE, RESOURCE_OC_LOGGER_INCLUDE_DIR, RESOURCE_LOGGER_INCLUDE_DIR, EXTLIB_CJSON_DIR, PHY_SDK_COMMON, PHY_SDK_ENROLLEE_COMMON_INCLUDE, PHY_SDK_ENROLLEE_COMMON_SOURCE, PHY_SDK_ENROLLEE_WIFI, PHY_INCLUDE, PHY_SDK_ENROLLEE_API]
+
+
+######################################################################
+
+# Initializing Libraries
+######################################################################
+
+COMMON_LIB_LOCATION = [CA_ARDUINO_LIB, CA_COMMON_LIBC]
+CA_ARDUINO_LIB_LOCATION = COMMON_LIB_LOCATION
+PHY_ARDUINO_LIB_LOCATION = [ORG_SRC_HOME+'/out/arduino/avr/' + target_release, ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/c_common', ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/csdk/routing']
+
+COMMON_STATIC_LIBS = []
+COMMON_SHARED_LIBS = ['libc_common']
+
+CA_ARDUINO_STATIC_LIBS = ['connectivity_abstraction', 'coap', 'c_common']
+CA_ARDUINO_LIBS = [COMMON_SHARED_LIBS, CA_ARDUINO_STATIC_LIBS]
+
+PHY_ARDUINO_SHARED_LIBS = ['octbstack','ocsrm','connectivity_abstraction','coap', 'ESSDKLibrary', 'routingmanager', 'libc_common']
+PHY_ARDUINO_STATIC_RESOURCE_LIBS = []
+PHY_ARDUINO_LIBS = [COMMON_SHARED_LIBS, PHY_ARDUINO_SHARED_LIBS]
+
+######################################################################
+
+# Initializing Targets
+######################################################################
+print "Initializing Targets"
+
+
+CA_ARDUINO_UTC_BIN = 'CATest'
+CA_ARDUINO_UTC_HEX = CA_ARDUINO_UTC_BIN + '.hex'
+
+CA_ARDUINO_ITC_COMMON_BIN = 'CACommonTest'
+CA_ARDUINO_ITC_COMMON_HEX = CA_ARDUINO_ITC_COMMON_BIN + '.hex'
+
+CA_ARDUINO_ITC_CLIENT_BIN = 'CAClientTest'
+CA_ARDUINO_ITC_CLIENT_HEX = CA_ARDUINO_ITC_CLIENT_BIN + '.hex'
+
+CA_ARDUINO_ITC_MULTICAST_BIN = 'CAMulticastTest'
+CA_ARDUINO_ITC_MULTICAST_HEX = CA_ARDUINO_ITC_MULTICAST_BIN + '.hex'
+
+CA_ARDUINO_SIMULATOR_BIN = 'CASimulator'
+CA_ARDUINO_SIMULATOR_HEX = CA_ARDUINO_SIMULATOR_BIN + '.hex'
+
+PHY_ARDUINO_WIFI_UTC_BIN = 'PhyWifiTest'
+PHY_ARDUINO_WIFI_UTC_HEX = PHY_ARDUINO_WIFI_UTC_BIN + '.hex'
+
+PHY_ARDUINO_WIFI_ITC_BIN = 'PhyWifiComplexTest'
+PHY_ARDUINO_WIFI_ITC_HEX = PHY_ARDUINO_WIFI_ITC_BIN + '.hex'
+
+######################################################################
+
+# Initializing Sources
+######################################################################
+
+COMMON_CPP = Glob(COMMON_UTIL_DIR + '/*.cpp')
+COMMON_TC_CPP = Glob(COMMON_DIR + '/testcase/*.cpp')
+CA_ARDUINO_HELPER_CPP = Glob(CA_ARDUINO_COMMON_DIR + '/*.cpp')
+
+COMMON_UTIL_CPP = COMMON_UTIL_DIR + '/CommonUtil.cpp'
+TEST_MAIN = [TC_DIR + '/IotivitySECTestMain.cpp']
+
+CA_ARDUINO_UTC_CPP = UTC_DIR + '/CATest.cpp'
+CA_ARDUINO_ITC_COMMON_CPP = Glob(ITC_DIR + '/CACommonTest.cpp')
+CA_ARDUINO_ITC_CLIENT_CPP = Glob(ITC_DIR + '/CAClientTest.cpp')
+CA_ARDUINO_ITC_MULTICAST_CPP = Glob(ITC_DIR + '/CAMulticastTest.cpp')
+CA_ARDUINO_SIMULATOR_CPP = Glob(TESTAPP_DIR + '/src/ca_simulator.c')
+CA_ARDUINO_ARDUINOUNIT_CPP = Glob(CA_ARDUINOUNIT_INCLUDE + '/utility/*.cpp')
+
+TEMP_OIC_STRING = [CA_ARDUINO_LIB + '/resource/c_common/oic_string/src/oic_string.o']
+TEMP_OC_RANDOM = [CA_ARDUINO_LIB + '/resource/c_common/ocrandom/src/ocrandom.o']
+
+PHY_ARDUINO_WIFI_UTC_CPP = Glob(UTC_DIR + '/phy/arduinounit/*.cpp')
+PHY_ARDUINO_WIFI_ITC_CPP = Glob(ITC_DIR + '/phy/arduinounit/*.cpp')
+PHY_ARDUINO_HELPER_CPP = Glob(COMMON_DIR + '/testcase/PHY/arduinounit/*.cpp')
+
+
+CA_ARDUINO_UTC_SRC = [CA_ARDUINO_UTC_CPP, CA_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP]
+CA_ARDUINO_ITC_COMMON_SRC = [CA_ARDUINO_ITC_COMMON_CPP, CA_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP]
+CA_ARDUINO_ITC_CLIENT_SRC = [CA_ARDUINO_ITC_CLIENT_CPP, CA_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP]
+CA_ARDUINO_ITC_MULTICAST_SRC = [CA_ARDUINO_ITC_MULTICAST_CPP, CA_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP]
+CA_ARDUINO_SIMULATOR_SRC = [CA_ARDUINO_SIMULATOR_CPP]
+
+PHY_ARDUINO_WIFI_UTC_SRC = [PHY_ARDUINO_WIFI_UTC_CPP, PHY_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP, ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/c_common/oic_malloc/src/oic_malloc.o', ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/c_common/oic_string/src/oic_string.o']
+
+PHY_ARDUINO_WIFI_ITC_SRC = [PHY_ARDUINO_WIFI_ITC_CPP, PHY_ARDUINO_HELPER_CPP, CA_ARDUINO_ARDUINOUNIT_CPP, ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/c_common/oic_malloc/src/oic_malloc.o', ORG_SRC_HOME+'/out/arduino/avr/' + target_release + '/resource/c_common/oic_string/src/oic_string.o']
+
+######################################################################
+
+# Initializing CPP Defines
+######################################################################
+
+transport = env.get('TARGET_TRANSPORT')
+
+env.AppendUnique(CPPDEFINES = ['__TC_PLATFORM_ARDUINO__'])
+
+if 'ALL' in transport:
+       print "All transports are not supported simultaneously in Arduino"
+       exit(1)
+else:
+       if 'BT' in transport:
+               env.AppendUnique(CPPDEFINES = ['EDR_ADAPTER'])
+       else:
+               env.AppendUnique(CPPDEFINES = ['NO_EDR_ADAPTER'])
+
+       if 'BLE' in transport:
+               env.AppendUnique(CPPDEFINES = ['LE_ADAPTER'])
+       else:
+               env.AppendUnique(CPPDEFINES = ['NO_LE_ADAPTER'])
+
+       if 'IP' in transport:
+               env.AppendUnique(CPPDEFINES = ['IP_ADAPTER'])
+       else:
+               env.AppendUnique(CPPDEFINES = ['NO_IP_ADAPTER'])
+
+if env.get('SHIELD') == 'WIFI':
+       env.AppendUnique(CPPDEFINES = ['ARDUINOWIFI', 'ESWIFI'])
+elif env.get('SHIELD') == 'ETH':
+       env.AppendUnique(CPPDEFINES = ['ARDUINOETH'])
+
+######################################################################
+
+# Initializing Build
+######################################################################
+
+if target_service == 'ca':
+       env.AppendUnique(LIBPATH = [CA_ARDUINO_LIB_LOCATION])
+       env.PrependUnique(LIBS = [CA_ARDUINO_LIBS])
+       env.PrependUnique(CPPPATH = [CA_ARDUINO_CINCLUDE, PHY_ARDUINO_CINCLUDE])
+       env.PrependUnique(CPPFLAGS = ["-fpermissive"])
+
+if target_service == 'phy':
+       env.AppendUnique(LIBPATH = [PHY_ARDUINO_LIB_LOCATION])
+       env.PrependUnique(LIBS = [PHY_ARDUINO_LIBS])
+       env.PrependUnique(CPPPATH = [CA_ARDUINO_CINCLUDE, PHY_ARDUINO_CINCLUDE])
+       env.PrependUnique(CPPFLAGS = ["-fpermissive", "-g", "-mmcu=atmega2560", "-DF_CPU=16000000L", "-DARDUINO=158", "-DARDUINO_AVR_MEGA2560", "-DARDUINO_ARCH_AVR"])
+       env.PrependUnique(CPPDEFINES = ['ARDUINOWIFI', 'WITH_ARDUINO', '__ARDUINO__', '-D__OIC_DEVICE_NAME__=\'"OIC-DEVICE"\'', 'TB_LOG', 'NO_EDR_ADAPTER', 'NO_LE_ADAPTER', 'IP_ADAPTER', 'NO_TCP_ADAPTER', 'ROUTING_EP', 'SINGLE_THREAD', 'EASY_SETUP_CA_INIT'])
+
+
+if target_service == 'ca':
+       ca_arduino_utc = env.Program(target = CA_ARDUINO_UTC_BIN, source = CA_ARDUINO_UTC_SRC)
+       env.CreateBin(CA_ARDUINO_UTC_BIN)
+
+       ca_arduino_itc_common = env.Program(target = CA_ARDUINO_ITC_COMMON_BIN, source = CA_ARDUINO_ITC_COMMON_SRC)
+       env.CreateBin(CA_ARDUINO_ITC_COMMON_BIN)
+
+       ca_arduino_itc_client = env.Program(target = CA_ARDUINO_ITC_CLIENT_BIN, source = CA_ARDUINO_ITC_CLIENT_SRC)
+       env.CreateBin(CA_ARDUINO_ITC_CLIENT_BIN)
+
+       ca_arduino_itc_multicast = env.Program(target = CA_ARDUINO_ITC_MULTICAST_BIN, source = CA_ARDUINO_ITC_MULTICAST_SRC)
+       env.CreateBin(CA_ARDUINO_ITC_MULTICAST_BIN)
+       
+       ca_simulator_env = env.Clone()
+       
+       ca_simulator_env.Replace(CC = 'avr-g++')
+       ca_simulator_env.Replace(CXX = 'avr-g++')
+       ca_simulator_env.Replace(LINK = 'avr-g++')
+       
+       ca_arduino_simulator = ca_simulator_env.Program(target = CA_ARDUINO_SIMULATOR_BIN, source = CA_ARDUINO_SIMULATOR_SRC)
+       ca_simulator_env.CreateBin(CA_ARDUINO_SIMULATOR_BIN)
+
+if target_service == 'phy':
+       phy_arduino_wifi_utc = env.Program(target = PHY_ARDUINO_WIFI_UTC_BIN, source = PHY_ARDUINO_WIFI_UTC_SRC)
+       env.CreateBin(PHY_ARDUINO_WIFI_UTC_BIN)
+       phy_arduino_wifi_itc = env.Program(target = PHY_ARDUINO_WIFI_ITC_BIN, source = PHY_ARDUINO_WIFI_ITC_SRC)
+       env.CreateBin(PHY_ARDUINO_WIFI_ITC_BIN)
+
+if target_service == 'ps':
+       SConscript('SCons_phy_sim', exports = 'env')
+
+######################################################################
+
+# Define Build Targets
+######################################################################
+
+target_service = env.get('TARGET_SERVICE')
+target_transport = env.get('TARGET_TRANSPORT')
+target_tc = env.get('TARGET_TC')
+default_targets = []
+install_targets = []
+
+print "---------------service--------------" + target_service + " : " + target_tc
+
+if 'ca' in target_service or 'all' in target_service:
+       print "CA is Selected"
+       default_targets += [CA_ARDUINO_UTC_HEX, CA_ARDUINO_ITC_COMMON_HEX, CA_ARDUINO_ITC_CLIENT_HEX, CA_ARDUINO_ITC_MULTICAST_HEX, CA_ARDUINO_SIMULATOR_HEX]
+       install_targets += [CA_ARDUINO_UTC_BIN, CA_ARDUINO_ITC_COMMON_BIN, CA_ARDUINO_ITC_CLIENT_BIN, CA_ARDUINO_ITC_MULTICAST_BIN, CA_ARDUINO_SIMULATOR_BIN]
+
+if 'phy' in target_service or 'all' in target_service:
+       default_targets += [PHY_ARDUINO_WIFI_UTC_HEX,PHY_ARDUINO_WIFI_ITC_HEX]
+       install_targets += [PHY_ARDUINO_WIFI_UTC_BIN,PHY_ARDUINO_WIFI_ITC_BIN]
+       
+install = env.Install(PROJECT_HOME + variant_dir, [install_targets, default_targets])
+delete_targets = install_targets + default_targets + ['bin']
+
+delete_bin = []
+i = 0
+for delete_target in delete_targets:
+    delete_bin += '0'
+    delete_target = "build/arduino/" + delete_target
+    delete_bin[i] = env.Command(str(i), [], Delete(delete_target))
+    i = i + 1
+
+default_targets += install + delete_bin
+
+env.Default(default_targets)
+
+######################################################################
+
+# Upload Targets
+######################################################################
+
+if(env['UPLOAD'] == True):
+       print "Uploading..."
+       #env.Upload(variant_dir + CA_ARDUINO_UTC_HEX,target_port)
+       #env.Upload(variant_dir + CA_ARDUINO_ITC_COMMON_HEX,target_port)
+       #env.Upload(variant_dir + CA_ARDUINO_ITC_CLIENT_HEX,target_port)
+       #env.Upload(variant_dir + CA_ARDUINO_ITC_SERVER_HEX,target_port)
+       #env.Upload(variant_dir + CA_ARDUINO_ITC_MULTICAST_HEX,target_port)
+       #env.Upload(variant_dir + CA_ARDUINO_SIMULATOR_HEX,target_port)
+       #env.Upload(variant_dir + PHY_ARDUINO_WIFI_UTC_HEX,target_port)
+       #env.Upload(variant_dir + PHY_ARDUINO_WIFI_ITC_HEX,target_port)
diff --git a/test/build/arduino/arduino.scons b/test/build/arduino/arduino.scons
new file mode 100644 (file)
index 0000000..242a4b4
--- /dev/null
@@ -0,0 +1,30 @@
+##
+# This script includes arduino specific config for oic-resource
+##
+Import('env')
+
+# Add 'SHIELD' build option, let user select board network connection type
+vars = Variables()
+if 'IP' in env.get('TARGET_TRANSPORT'):
+       vars.Add(EnumVariable('SHIELD', 'Network connection type', 'WIFI', ['ETH', 'WIFI']))
+elif 'BLE' in env.get('TARGET_TRANSPORT'):
+       vars.Add(EnumVariable('SHIELD', 'Network connection type', 'RBL_NRF8001', ['RBL_NRF8001']))
+vars.Update(env)
+Help(vars.GenerateHelpText(env))
+
+env.ImportLib('SPI')
+if 'ETH' in env.get('SHIELD'):
+       env.ImportLib('Ethernet')
+if 'WIFI' in env.get('SHIELD'):
+       env.ImportLib('WiFi')
+if 'RBL_NRF8001' in env.get('SHIELD'):
+       env.ImportLib('BLE')
+       env.ImportLib('RBL_nRF8001')
+
+env.ImportLib('Time/Time')
+env.ImportLib('ArduinoUnit')
+# we have variety of macros for arduino!!
+if env.get('RELEASE'):
+       env.AppendUnique(CPPDEFINES = ['WITH_ARDUINO', '__ARDUINO__'])
+else:
+       env.AppendUnique(CPPDEFINES = ['WITH_ARDUINO', '__ARDUINO__', 'TB_LOG'])
diff --git a/test/build/arduino/config.scons b/test/build/arduino/config.scons
new file mode 100644 (file)
index 0000000..f070247
--- /dev/null
@@ -0,0 +1,438 @@
+##
+# This script includes arduino specific config
+##
+import os
+import platform
+
+Import('env')
+
+def __parse_config(f):
+       dict = {}
+
+       if not os.path.isfile(f):
+               return dict
+
+       file = open(f, 'r')
+       strs = file.readlines()
+       for str in strs:
+               str = str.strip()
+               if len(str) > 0 and str[0] == '#':
+                       continue
+
+               idx = str.find('=')
+               if idx > 0:
+                       dict.setdefault(str[0:idx], str[idx + 1:])
+
+       return dict
+
+def __get_boards(dict):
+       boards = []
+       keys = dict.keys()
+       for key in keys:
+               idx = key.find('.name')
+               if idx > 0:
+                       if key.endswith('.name'):
+                               boards.append(key[0:idx])
+       return boards
+
+def __get_cpu(dict, board):
+       cpus = []
+       keys = dict.keys()
+       for key in keys:
+               idx = key.find(board + '.menu.cpu.')
+               start = len(board + '.menu.cpu.')
+               if idx >= 0:
+                       end = key.find('.', start)
+                       if end > 0:
+                               cpu = key[start:end]
+                               exist = False
+                               for c in cpus:
+                                       if c == cpu:
+                                               exist = True
+                                               break
+
+                               if not exist:
+                                       cpus.append(cpu)
+       return cpus
+
+def __get_board_info(board, key):
+       if cpu:
+               v = boards_info.get(board + '.menu.cpu.' + cpu + key)
+               if not v:
+                       v = boards_info.get(board + key)
+       else:
+               v = boards_info.get(board + key)
+       return v
+
+def __search_files(path, pattern, ondisk=True, source=True, strings=False, recursive=True):
+       if not recursive:
+               return Glob(pattern, ondisk, source, strings)
+
+       matches = []
+       for root, dirnames, filenames in os.walk(path):
+               #BLE library examples throw lot of errors. We dont need examples.
+               if 'examples' not in root:
+                       matches.extend(Glob(root + '/' + pattern, ondisk, source, strings))
+       return matches
+
+# To make sure the src is built in 'BUILD_DIR' (by default it will be built at
+# the same directory as the .c .cpp .S)
+def __src_to_obj(env, srcs):
+       objs = []
+       prefix = env.get('BOARD') + '_'
+       if env.get('CPU'):
+               prefix += env.get('CPU') + '_'
+
+       build_dir = env.get('BUILD_DIR') + '/arduino/'
+       for src in srcs:
+               obj = src.path.replace(arduino_home, build_dir)
+               i = obj.rfind('.')
+               obj = obj[0:i]
+               if env.get('OBJSUFFIX'):
+                       obj += env.get('OBJSUFFIX')
+               objs.extend(env.Object(obj, src, OBJPREFIX=prefix))
+       return objs
+
+def __import_lib(env, lib):
+       lib_path = arduino_home + '/libraries/' + lib
+       if not os.path.exists(lib_path):
+               if target_arch == 'avr':
+                       lib_path = arduino_home + '/hardware/arduino/avr/libraries/' + lib
+               else:
+                       lib_path = arduino_home + '/hardware/arduino/sam/libraries/' + lib
+
+       if os.path.exists(lib_path + '/src'):
+               lib_path = lib_path + '/src'
+
+       env.AppendUnique(CPPPATH = [lib_path])
+
+       if os.path.exists(lib_path + '/utility'):
+               env.AppendUnique(CPPPATH = [lib_path + '/utility'])
+
+       lib_src = []
+       lib_src.extend(__search_files(lib_path, '*.S'))
+       lib_src.extend(__search_files(lib_path, '*.c'))
+       lib_src.extend(__search_files(lib_path, '*.cpp'))
+
+       lib_obj = __src_to_obj(env, lib_src)
+       build_dir = env.get('BUILD_DIR')
+       if build_dir:
+               lib_a = env.StaticLibrary(build_dir + lib, lib_obj)
+       else:
+               lib_a = env.StaticLibrary(lib, lib_obj)
+
+       # If we link libSPI.a, the final binary is not getting launched
+       # on the board.  Which is not the case if we directly use SPI.o.
+
+       if env.get('TARGET_ARCH') == 'arm':
+               if lib == 'SPI':
+                       for obj in lib_obj:
+                               if obj.name.endswith('SPI.o'):
+                                       env.PrependUnique(LIBS = [File(obj)])
+               else:
+                       env.AppendUnique(LIBS = [File(lib_a[0])])
+       else:
+               env.PrependUnique(LIBS = [File(lib_a[0])])
+
+def __build_core(env):
+       core_src = __search_files(core_folder, '*.S')
+       core_src.extend(__search_files(core_folder, '*.c'))
+       core_src.extend(__search_files(core_folder, '*.cpp'))
+
+       core_src.extend(__search_files(variant_folder, '*.S'))
+       core_src.extend(__search_files(variant_folder, '*.c'))
+       core_src.extend(__search_files(variant_folder, '*.cpp'))
+
+       core_obj = __src_to_obj(env, core_src)
+       build_dir = env.get('BUILD_DIR')
+       if build_dir:
+               s_core = env.StaticLibrary(build_dir + 'core', core_obj)
+       else:
+               s_core = env.StaticLibrary('core', core_obj)
+       env.AppendUnique(LIBS = [File(s_core[0])])
+
+       # To avoid compiler issue. Otherewise there may be warnings:
+       #       undefined reference to '_exit' '_close', '_getpid' ...
+       # Above functions are used in libc.a and implemented in syscalls_sam3.c
+       if env.get('TARGET_ARCH') == 'arm':
+               for obj in core_obj:
+                       if obj.name.endswith('syscalls_sam3.o'):
+                               env.AppendUnique(LIBS = [File(obj)])
+
+def __create_bin(env, source):
+       name = source
+       if target_arch == 'avr':
+               eep = env.Command(name + '.eep', source, 'avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 $SOURCE $TARGET')
+               hex = env.Command(name + '.hex', source, 'avr-objcopy -O ihex -R .eeprom $SOURCE $TARGET')
+       else:
+               hex = env.Command(name + '.hex', source, 'arm-none-eabi-objcopy -O binary $SOURCE $TARGET')
+
+#Currently Mega and Due build is supported.
+def __upload(env, binary,port):
+        if target_arch == 'avr':
+                protocol = __get_board_info(board, '.upload.protocol')
+                speed = __get_board_info(board, '.upload.speed')
+                #port = '/dev/ttyACM0'
+                upload_cmd = arduino_home + '/hardware/tools/avr/bin/avrdude -C' + arduino_home +'/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -p' \
+                + mcu + ' -c' + protocol + ' -P' + port + ' -b' + speed + ' -D -Uflash:w:' + binary + ':i'
+
+                print "Upload command: %s" %upload_cmd
+                install_cmd = env.Command('install_cmd', None, upload_cmd)
+                env.Default('install_cmd')
+        else:
+               uu = __get_board_info(board, '.upload.native_usb')
+                port = 'ttyACM0'
+               upload_cmd = 'stty -F /dev/' + port + ' speed 1200 cs8 -cstopb -parenb \n' + arduino_home + '/hardware/tools/bossac -i -d --port=' + port + ' -U ' + uu + ' -e -w -v -b ' + binary + ' -R'
+                print "Upload command: %s" %upload_cmd
+                install_cmd = env.Command('install_cmd', None, upload_cmd)
+                env.Default('install_cmd')
+
+# Print the command line that to upload binary to the board
+def __upload_help(env):
+       if target_arch == 'avr':
+               protocol = __get_board_info(board, '.upload.protocol')
+               speed = __get_board_info(board, '.upload.speed')
+
+               upload_cmd = arduino_home + '/hardware/tools/avr/bin/avrdude -C' + arduino_home +'/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -p' \
+       + mcu + ' -c' + protocol + ' -P<serial_port>' + ' -b' + speed + ' -D -Uflash:w:<hex_file>:i'
+       else:
+               uu = __get_board_info(board, '.upload.native_usb')
+               upload_cmd = arduino_home + '/hardware/tools/bossac -i -d --port=<serial_port> -U ' + uu + ' -e -w -v -b <bin file> -R'
+
+       Help('''
+===============================================================================
+You can upload the bin file with following command line:
+''')
+       Help('\n   $ ' + upload_cmd)
+       Help('''
+\nPlease replace <xxx> according to the actual situation.
+===============================================================================
+''')
+
+# ARDUINO_HOME build option
+help_vars = Variables()
+help_vars.Add(PathVariable('ARDUINO_HOME', 'ARDUINO root directory', os.environ.get('ARDUINO_HOME')))
+help_vars.Update(env)
+Help(help_vars.GenerateHelpText(env))
+
+target_arch = env.get('TARGET_ARCH')
+arduino_home = env.get('ARDUINO_HOME')
+if not arduino_home:
+       print '''
+************************************* Error ***********************************
+*   Arduino root directory isn't set, you can set enviornment variable        *
+* ARDUINO_HOME or add it in command line as:                                  *
+*      # scons ARDUINO_HOME=<path to arduino root directory> ...              *
+*******************************************************************************
+'''
+       Exit(1)
+
+# Overwrite suffixes and prefixes
+if env['HOST_OS'] == 'win32':
+       env['OBJSUFFIX'] = '.o'
+       env['SHOBJSUFFIX'] = '.os'
+       env['LIBPREFIX'] = 'lib'
+       env['LIBSUFFIX'] = '.a'
+       env['SHLIBPREFIX'] = 'lib'
+       env['SHLIBSUFFIX'] = '.so'
+       env['LIBPREFIXES'] = ['lib']
+       env['LIBSUFFIXES'] = ['.a', '.so']
+       env['PROGSUFFIX'] = ''
+elif platform.system().lower() == 'darwin':
+       env['SHLIBSUFFIX'] = '.so'
+       env['LIBSUFFIXES'] = ['.a', '.so']
+       env['PROGSUFFIX'] = ''
+
+# Debug/release relative flags
+if env.get('RELEASE'):
+       env.AppendUnique(CCFLAGS = ['-Os'])
+       env.AppendUnique(CPPDEFINES = ['NDEBUG'])
+else:
+       env.AppendUnique(CCFLAGS = ['-g'])
+
+# BOARD / CPU option
+
+# Get IDE version
+if os.path.exists(arduino_home + '/lib/version.txt'):
+       vf = open(arduino_home + '/lib/version.txt', 'r')
+       version = vf.readline().replace('.', '')
+else:
+       print '''
+************************************* Error ***********************************
+* Can't find version file (lib/version.txt), please check if (%s)
+* is arduino root directory.                                                  *
+*******************************************************************************
+''' % arduino_home
+       Exit(1)
+
+if version[0:2] == '10':
+       is_1_0_x = True
+       boards_info = __parse_config(arduino_home + '/hardware/arduino/boards.txt')
+       env.PrependENVPath('PATH', arduino_home + '/hardware/tools/avr/bin/')
+       env.Replace(CC = 'avr-gcc')
+       env.Replace(CXX = 'avr-gcc')
+       env.Replace(AR = 'avr-ar')
+       env.Replace(AS = 'avr-as')
+       env.Replace(LINK = 'avr-gcc')
+       env.Replace(RANLIB = 'avr-ranlib')
+       if target_arch != 'avr':
+               print '''
+************************************* Error ***********************************
+* Arduino 1.0.x IDE only support 'avr', to support other arch at least 1.5.x  *
+* is required.
+*******************************************************************************
+'''
+               Exit(1)
+else:
+       is_1_0_x = False
+       if target_arch == 'avr':
+               boards_info = __parse_config(arduino_home + '/hardware/arduino/avr/boards.txt')
+               platform_info = __parse_config(arduino_home + '/hardware/arduino/avr/platform.txt')
+       elif target_arch == 'arm':
+               boards_info = __parse_config(arduino_home + '/hardware/arduino/sam/boards.txt')
+               platform_info = __parse_config(arduino_home + '/hardware/arduino/sam/platform.txt')
+       else:
+               print '''
+************************************* Error ***********************************
+* CPU arch %s isn't supported currently.
+*******************************************************************************
+''' % target_arch
+
+#Board option, let user to select the board
+boards = __get_boards(boards_info)
+help_vars = Variables()
+help_vars.Add(EnumVariable('BOARD', 'arduino board', boards[0], boards))
+help_vars.Update(env)
+Help(help_vars.GenerateHelpText(env))
+
+#CPU option
+board = env.get('BOARD')
+cpus = __get_cpu(boards_info, board)
+if len(cpus) > 0:
+       help_vars = Variables()
+       help_vars.Add(EnumVariable('CPU', 'arduino board cpu', cpus[0], cpus))
+       help_vars.Update(env)
+       Help(help_vars.GenerateHelpText(env))
+
+# Arduino commom flags
+cpu = env.get('CPU')
+board = env.get('BOARD')
+mcu = __get_board_info(board, '.build.mcu')
+f_cpu = __get_board_info(board, '.build.f_cpu')
+usb_vid = __get_board_info(board, '.build.vid')
+usb_pid = __get_board_info(board, '.build.pid')
+variant = __get_board_info(board, '.build.variant')
+
+if not usb_vid:
+       usb_vid = __get_board_info(board, '.vid.0')
+if not usb_pid:
+       usb_pid = __get_board_info(board, '.pid.0')
+
+if is_1_0_x:
+       core_base = arduino_home + '/hardware/arduino/'
+else:
+       if target_arch == 'avr':
+               core_base = arduino_home + '/hardware/arduino/avr/'
+       else:
+               core_base = arduino_home + '/hardware/arduino/sam/'
+
+variant_folder = core_base + 'variants/' + variant
+env.AppendUnique(CPPPATH = [variant_folder])
+
+core = __get_board_info(board, '.build.core')
+core_folder = core_base + 'cores/' + core + '/'
+env.AppendUnique(CPPPATH = [core_folder])
+
+if is_1_0_x:
+       comm_flags = ['-std=c99']
+       if mcu:
+               comm_flags.extend(['-mmcu=' + mcu])
+       if f_cpu:
+               comm_flags.extend(['-DF_CPU=' + f_cpu])
+       comm_flags.extend(['-DARDUINO=' + version])
+       if usb_vid:
+               comm_flags.extend(['-DUSB_VID=' + usb_vid])
+       if usb_pid:
+               comm_flags.extend(['-DUSB_PID=' + usb_pid])
+
+       env.AppendUnique(ASFLAGS = ['-x', 'assembler-with-cpp'])
+       env.AppendUnique(ASFLAGS = comm_flags)
+
+       env.AppendUnique(CFLAGS = ['-Os', '-ffunction-sections', '-fdata-sections', '-MMD'])
+       env.AppendUnique(CFLAGS = comm_flags)
+
+       env.AppendUnique(CXXFLAGS = ['-Os', '-fno-exceptions', '-ffunction-sections', '-fdata-sections','-MMD'])
+       env.AppendUnique(CXXFLAGS = comm_flags)
+
+       env.AppendUnique(LINKFLAGS = ['-Os'])
+       if mcu == 'atmega2560':
+               env.AppendUnique(LINKFLAGS = ['-Wl,--gc-sections,--relax'])
+       else:
+               env.AppendUnique(LINKFLAGS = ['-Wl,--gc-sections'])
+       env.AppendUnique(LINKFLAGS = ['-mmcu=' + mcu])
+else:
+       if target_arch == 'avr':
+               cpu_flag = '-mmcu=' + mcu
+       else:
+               cpu_flag = '-mcpu=' + mcu
+
+       comm_flag = [cpu_flag, '-DF_CPU=' + f_cpu, '-DARDUINO=' + version, '-DARDUINO_' + __get_board_info(board, '.build.board')]
+       if target_arch == 'arm':
+               # As of 1.5.8 the arduino headers had asm bugs with ARM and
+               # require gnu99 to be used.
+               comm_flag.extend(['-std=gnu99', '-DARDUINO_ARCH_SAM'])
+       else:
+               comm_flag.extend(['-std=c99', '-DARDUINO_ARCH_AVR'])
+
+       compiler_path = platform_info.get('compiler.path')
+       compiler_path = compiler_path.replace('{runtime.ide.path}', arduino_home)
+       env.PrependENVPath('PATH', compiler_path)
+       env.Replace(CC = platform_info.get('compiler.c.cmd'))
+       env.Replace(CXX = platform_info.get('compiler.cpp.cmd'))
+       env.Replace(AR = platform_info.get('compiler.ar.cmd'))
+       if target_arch == 'arm':
+               env.AppendUnique(CPPPATH = [arduino_home + '/hardware/arduino/sam/system/libsam',
+                                                       arduino_home + '/hardware/arduino/sam/system/CMSIS/CMSIS/Include/',
+                                                       arduino_home + '/hardware/arduino/sam/system//CMSIS/Device/ATMEL'])
+       env.AppendUnique(ASFLAGS = ['-x', 'assembler-with-cpp'])
+       env.AppendUnique(ASFLAGS = comm_flag)
+       env.AppendUnique(CFLAGS = Split(platform_info.get('compiler.c.flags')))
+       env.AppendUnique(CXXFLAGS = Split(platform_info.get('compiler.cpp.flags')))
+       env.AppendUnique(ARFLAGS = Split(platform_info.get('compiler.ar.flags')))
+       env.AppendUnique(CCFLAGS = comm_flag)
+
+       extra_flags = __get_board_info(board, '.build.extra_flags')
+       if extra_flags:
+               extra_flags = extra_flags.replace('{build.usb_flags}', '')
+               env.AppendUnique(CCFLAGS = Split(extra_flags))
+               usb_flags = ['-DUSB_VID=' + usb_vid, '-DUSB_PID=' + usb_pid, '-DUSBCON', '-DUSB_MANUFACTURER="Unknown"']
+               env.AppendUnique(CCFLAGS = usb_flags)
+
+       if target_arch == 'arm':
+               env.AppendUnique(LINKFLAGS = ['-Os', '-Wl,--gc-sections', cpu_flag,
+                                       '-T' + variant_folder + '/' + __get_board_info(board, '.build.ldscript'),
+                                       '-Wl,-Map,' + env.get('BUILD_DIR') + 'arduino_prj.map'])
+               env.AppendUnique(LINKFLAGS = Split('-lm -lgcc -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -Wl,--warn-unresolved-symbols -Wl,--start-group'))
+
+               variant_system_lib = __get_board_info(board, '.build.variant_system_lib')
+               if variant_system_lib:
+                       if variant_folder.find(' ') >= 0:
+                               variant_folder = '"' + variant_folder + '"'
+                       env.Replace(LINKCOM = '$LINK -o $TARGET $_LIBDIRFLAGS $LINKFLAGS $SOURCES $_LIBFLAGS '
+                                       + variant_folder + '/' + variant_system_lib + ' -Wl,--end-group')
+               else:
+                       env.Replace(LINKCOM = '$LINK -o $TARGET $_LIBDIRFLAGS $LINKFLAGS $SOURCES $_LIBFLAGS -Wl,--end-group')
+       else:
+               env.AppendUnique(LINKFLAGS = Split(platform_info.get('compiler.c.elf.flags')))
+               env.AppendUnique(LINKFLAGS = [cpu_flag])
+               env.AppendUnique(LIBS = 'm')
+       env.Replace(ARCOM = '$AR ' + platform_info.get('compiler.ar.flags') + ' $TARGET $SOURCES')
+
+__build_core(env)
+
+env.AddMethod(__import_lib, "ImportLib") #import arduino library
+#env.AddMethod(__build_core, "BuildCore") #build arduino core
+env.AddMethod(__create_bin, "CreateBin") #create binary files(.eep and .hex)
+env.AddMethod(__upload, "Upload") #Upload binary to board
+env.AddMethod(__upload_help, "UploadHelp") #print the command line that to upload binary to the boardf
+
diff --git a/test/build/configuration.scons b/test/build/configuration.scons
new file mode 100644 (file)
index 0000000..bc64250
--- /dev/null
@@ -0,0 +1,46 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+
+##
+# Configuratoin file for Test [Please do not keep any field EMPTY]
+#
+##
+
+Import('env')
+
+env.Replace(LINUX_TARGET = 'bin/linux/')
+env.Replace(TIZEN_TARGET = 'bin/tizen/')
+env.Replace(JAVA_LINUX_TARGET = 'bin/java/')
+env.Replace(ANDROID_TARGET = 'bin/android/')
+env.Replace(ARDUINO_TARGET = 'bin/arduino/')
+env.Replace(WINDOWS_TARGET = 'bin/windows/')
+
+#----------------------------------------------------------------------
+# Source Dirs
+#----------------------------------------------------------------------
+
+env.Replace(ENV_HOME = '../../..')
+env.Replace(PROJECT_HOME = '../../')
+env.Replace(EXT_LIB_HOME = env.get('ENV_HOME') + '/IotivitySECTestExtLibs')
+env.Replace(DEV_SRC_HOME = env.get('ENV_HOME') + '/IotivitySECDevSource')
+env.Replace(ORG_SRC_TARGET = '/IotivityOrgSource/target/iotivity')
+env.Replace(ORG_SRC_LAST = '/IotivityOrgSource/last/iotivity')
diff --git a/test/build/java/SConscript b/test/build/java/SConscript
new file mode 100755 (executable)
index 0000000..e01ae9c
--- /dev/null
@@ -0,0 +1,95 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+
+print '-----------------------------------------------------------------------'
+print '---------------Started Building test for Java---------------'
+print '-----------------------------------------------------------------------'
+
+import os
+import SCons.Errors
+Import('env_java')
+
+iotivity_root = env_java.get('IOTIVITY_ROOT')
+
+if not env_java.get('ANDROID_GRADLE'):
+    if os.path.isfile(iotivity_root + '/extlibs/android/gradle/gradle-2.2.1/bin/gradle'):
+        env_java.Replace(ANDROID_GRADLE = iotivity_root + '/extlibs/android/gradle/gradle-2.2.1/bin/gradle')
+    else:
+        env_java.Replace(ANDROID_GRADLE = os.environ.get('ANDROID_GRADLE'))
+
+target_os = env_java.get('TARGET_OS')
+iotivity_root = env_java.get('IOTIVITY_ROOT')
+iotivity_test_root = env_java.get('IOTIVITY_TEST_ROOT')
+
+target_arch = env_java.get('TARGET_ARCH')
+module = env_java.get('MODULE')
+test = env_java.get('test')
+target_transport = ARGUMENTS.get('TARGET_TRANSPORT')
+secured = env_java.get('SECURED')
+
+release_dir=env_java.get('RELEASE_DIR')
+all_modules = env_java.get('ALL_MODULES')
+test = env_java.get('TEST')
+gradle_bin = env_java.get('ANDROID_GRADLE')
+push = env_java.get('PUSH')
+push = ",".join(push)
+
+framework = env_java.get('FRAMEWORK')
+cloud_service_build = env_java.get('CLOUD_SERVICE')
+kafka_root = env_java.get('KAFKA_ROOT')
+
+if not os.path.isfile(gradle_bin):
+    print 'No valid GRADLE found'
+    exit(-1)
+
+default_targets = []
+
+if cloud_service_build:
+    if 'ic' in module or 'cs' in module:
+        build_command = 'bash ' + iotivity_test_root + '/res/cloud_resource/cloud_build.sh ' + kafka_root + ' ' + iotivity_root
+        cloud_build = env_java.Command('cloud_build', None, build_command)
+        default_targets += [cloud_build]
+
+for temp in list(set(all_modules) - set(['iut', 'ca'])):
+    if temp in module:
+        jdk_env = Environment(ENV=os.environ)
+        build_command = gradle_bin + ' ' + 'install' + ' -b ' + iotivity_test_root \
+        + '/build/java/build.gradle -Pmodule_name=%s -Pos=%s -Parch=%s -Prelease=%s -Piotivity_root=%s -Ptest_root=%s -Psrc_type=%s -Ptest=%s'\
+         %(temp, target_os, target_arch, release_dir, iotivity_root, iotivity_test_root, "java", test)
+
+        print '-----------------------------------------------------------------------'
+        print "\nBuild Command :\n" + build_command
+        print '-----------------------------------------------------------------------'
+
+        if 'tc' in test:
+            jdk_env['BUILDERS']['Gradle'] = Builder(action = build_command)
+            source_list = Glob(iotivity_test_root + '/src/tc/' + temp + '/junit/*.java')
+            junit_tc = jdk_env.Gradle(target='junit_tc', source=source_list)
+            default_targets += junit_tc
+
+unsupported_modules = ['ca', 're', 'rc', 'es', 'ns', 'chp', 'rd', 'sm']
+for target_module in module:
+    if target_module in unsupported_modules:
+        print target_module + ' Module not supported in Java'
+        Exit(1)
+
+env_java.Default(default_targets)
\ No newline at end of file
diff --git a/test/build/java/build.gradle b/test/build/java/build.gradle
new file mode 100755 (executable)
index 0000000..8e8b783
--- /dev/null
@@ -0,0 +1,93 @@
+/******************************************************************
+ *
+ * Copyright 2018 Samsung Electronics All Rights Reserved.
+ *
+ *
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ ******************************************************************/
+
+println "-----------------------------------------------------------------------"
+println "----------------------------Gradle Java Main---------------------------"
+println "-----------------------------------------------------------------------"
+
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'de.undercouch:gradle-download-task:1.0'
+    }
+}
+
+import de.undercouch.gradle.tasks.download.Download
+
+ext.javaExtLibDir = ""
+
+def downLoadLinks=['https://github.com/downloads/jsankey/android-junit-report/android-junit-report-1.5.8.jar',
+                   'https://repo1.maven.org/maven2/org/mockito/mockito-all/1.9.5/mockito-all-1.9.5.jar',
+                   'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/dexmaker/dexmaker-1.0.jar',
+                   'https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/dexmaker/dexmaker-mockito-1.0.jar'
+                   ]
+
+
+/*
+ *task to download junit library
+ *if not exist download
+*/
+task checkCommonLibFiles(type:Download) {
+    doFirst {
+        mkdir(javaExtLibDir)
+        src (downLoadLinks)
+        overwrite false
+        dest javaExtLibDir
+    }
+}
+
+
+/*
+ * task to build module
+*/
+task install(type: GradleBuild, dependsOn: ['checkCommonLibFiles']){
+    startParameter.projectProperties = project.getGradle().getStartParameter().getProjectProperties()
+    startParameter.projectProperties["testRoot"] =
+
+    startParameter.projectProperties["buildType"] = "java"
+    startParameter.projectProperties["iotivityRoot"]= "${iotivity_root}"
+    startParameter.projectProperties["testRoot"] = "${test_root}"
+    startParameter.projectProperties["moduleName"] = "${module_name}"
+    startParameter.projectProperties["os"] = "${os}"
+    startParameter.projectProperties["architecture"] = "${arch}"
+    startParameter.projectProperties["logLevel"] = "${release}"
+    startParameter.projectProperties["tcModuleDir"] = "${test_root}/src/tc/modules"
+    startParameter.projectProperties["tcModuleRoot"] = "${test_root}/src/tc/${module_name}/junit/build.gradle"
+    startParameter.projectProperties["binDirectory"] ="${test_root}/bin/${src_type}"
+    startParameter.projectProperties["testCommonUtilSrcDirectory"] = "${test_root}/src/common/commonutil/${src_type}"
+    startParameter.projectProperties["javaExtLibDir"]="${test_root}/extlibs/java/common/"
+    startParameter.projectProperties["binDir"] = "${test_root}/bin/${src_type}/${module_name}"
+
+    def junitJarFile = startParameter.projectProperties["javaExtLibDir"] + "/android-junit-report-1.5.8.jar"
+    def mockitoallJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/mockito-all-1.9.5.jar"
+    def dexmakerJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/dexmaker-1.0.jar"
+    def dexmakermockitoJarFile = startParameter.projectProperties["javaExtLibDir"] +  "/dexmaker-mockito-1.0.jar"
+    def moduleBuildFileDir = "${test_root}/src/tc"
+    javaExtLibDir = startParameter.projectProperties["javaExtLibDir"]
+
+    buildFile = startParameter.projectProperties["tcModuleRoot"]
+
+    println "------------------------\nJava Project Properties\n------------------------"
+    startParameter.projectProperties.each{ key, value -> println "    ${key} : ${value}" }
+
+    tasks = ["${module_name}build".toString()]
+}
\ No newline at end of file
diff --git a/test/build/linux/SConscript b/test/build/linux/SConscript
new file mode 100755 (executable)
index 0000000..d167a06
--- /dev/null
@@ -0,0 +1,174 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+print '\n---------------Started Building Test for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+iotivity_root = env_linux.get('IOTIVITY_ROOT')
+iotivity_test_root = env_linux.get('IOTIVITY_TEST_ROOT')
+variant_dir = env_linux.get('VARIANT_DIR')
+install_dir = env_linux.get('INSTALL_DIR')
+test_src_root = iotivity_test_root + '/' + variant_dir
+target_arch = env_linux.get('TARGET_ARCH')
+release_dir = env_linux.get('RELEASE_DIR')
+test = env_linux.get('TEST')
+module = env_linux.get('MODULE')
+all_modules = env_linux.get('ALL_MODULES')
+tls_mode = env_linux.get('TLS_MODE')
+
+print 'IOTIVITY ROOT: ' + iotivity_root
+print 'IOTIVITY TEST ROOT: ' + iotivity_test_root
+print 'RELEASE DIR: ' + release_dir
+print 'MODULE: ' + str(module)
+print 'TEST: ' + str(test)
+
+env_linux.Append(IOTIVITY_LIB_PATH = iotivity_root + '/out/linux/' + target_arch + '/' + release_dir)
+
+if target_arch in ['x86']:
+    env_linux.AppendUnique(CCFLAGS = ['-m32'])
+    env_linux.AppendUnique(LINKFLAGS = ['-m32'])
+elif target_arch in ['x86_64']:
+    env_linux.AppendUnique(CCFLAGS = ['-m64'])
+    env_linux.AppendUnique(LINKFLAGS = ['-m64'])
+
+env_linux.ParseConfig("pkg-config --cflags --libs uuid")
+
+create_target_dir = env_linux.Command('target.out', [], Mkdir(variant_dir))
+pre_job = [create_target_dir]
+default_targets = [pre_job]
+install_targets = []
+
+SConscript(iotivity_test_root + '/extlibs/gtest-1.7.0/SConscript')
+
+iotivity_common_includes_paths = [
+    iotivity_root + '/resource/csdk/logger/include',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/csdk/stack/include',
+    iotivity_root + '/resource/c_common',
+    iotivity_root + '/resource/c_common/oic_malloc/include',
+    iotivity_root + '/resource/c_common/oic_string/include',
+    iotivity_root + '/resource/c_common/ocrandom/include',
+    iotivity_root + '/resource/oc_logger/include',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/csdk/stack/include/experimental',
+    iotivity_root + '/extlibs/tinycbor/tinycbor/src',
+    iotivity_root + '/resource/include',
+    iotivity_root + '/resource/csdk/include',
+    iotivity_root + '/resource/csdk/resource-directory/include',
+    iotivity_root + '/out/linux/' + target_arch + '/' + release_dir + '/resource/c_common'
+]
+
+if env_linux.get('SECURED') == '1':
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/c_common/octhread/include')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/connectivity/inc')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/connectivity/api')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/connectivity/common/inc')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/security/include')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/security/provisioning/include/internal')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/security/provisioning/include/cloud')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/security/provisioning/include/oxm')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/security/provisioning/include')
+    iotivity_common_includes_paths.append(iotivity_root + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include')
+    iotivity_common_includes_paths.append(iotivity_root + '/extlibs/mbedtls/mbedtls/include')
+    iotivity_common_includes_paths.append(iotivity_root + '/extlibs/tinydtls')
+    iotivity_common_includes_paths.append(iotivity_root + '/extlibs/mbedtls/mbedtls/include/mbedtls')
+
+
+iotivity_test_include_paths = [ iotivity_test_root + '/include' ]
+extlibs_include_paths = [ iotivity_test_root + '/extlibs/gtest-1.7.0/include' ]
+
+common_linux_cppflags = ['-DLINUX', '-D__LINUX__']
+
+cppflags = Split('-s -pthread -march=native -std=gnu++0x -Wall')
+
+if env_linux.get('SECURED') == '1':
+    cppflags.append('-D__SECURED__ ')
+
+if env_linux.get('COVERAGE'):
+    common_linux_cppflags.append('-finstrument-functions')
+    common_linux_cppflags.append('-ftest-coverage')
+    common_linux_cppflags.append('-fprofile-arcs')
+    #common_linux_cppflags.append('-D__COVERAGE__')
+
+env_linux.Append(COMMON_LINUX_CPPFLAGS = common_linux_cppflags)
+
+install_targets += env_linux.StaticLibrary('common_util',
+                    source = [test_src_root + '/common/commonutil/c_cpp/CommonUtil.cpp',
+                        test_src_root + '/common/commonutil/c_cpp/Configuration.cpp'
+                    ],
+                    CPPPATH = iotivity_common_includes_paths + iotivity_test_include_paths + extlibs_include_paths,
+                    LIBS = ['boost_system', 'boost_filesystem', 'boost_thread'],
+                    LIBPATH = ['/usr/local/lib'],
+                    CPPFLAGS = cppflags + common_linux_cppflags)
+
+if 'tc' in test:
+    tc_util = env_linux.StaticLibrary('tc_util',
+                source = [
+                            test_src_root + '/common/commonutil/c_cpp/trace.c',
+                            test_src_root + '/common/testcase/gtest/IotivitySECTestMain.cpp',
+                            test_src_root + '/common/commonutil/c_cpp/CommonTestUtil.cpp',
+                        ],
+                CPPPATH = iotivity_common_includes_paths + iotivity_test_include_paths + extlibs_include_paths,
+                LIBS = ['boost_system', 'boost_filesystem', 'boost_thread'],
+                LIBPATH = ['/usr/local/lib'],
+                CPPFLAGS = cppflags + common_linux_cppflags)
+
+if 'ic' in module or 'cs' in module:
+    if tls_mode == 1:
+        cppflags.append(['-D__TLS_ON__'])
+    cloud_util = env_linux.StaticLibrary('cloud_util',
+                    source = [test_src_root + '/common/commonutil/c_cpp/CloudCommonUtil.cpp'],
+                    CPPPATH = iotivity_common_includes_paths + iotivity_test_include_paths + extlibs_include_paths,
+                    LIBS = ['curl', 'boost_system', 'boost_filesystem', 'boost_thread', 'common_util' ],
+                    LIBPATH = ['.', '/usr/local/lib'],
+                    CPPFLAGS = cppflags + common_linux_cppflags)
+
+if 'pm' in module or 'ri' in module:
+    print ('calling SConscriptSK')
+    SConscript('SConscriptSK', exports = 'env_linux')
+else:
+    print ('no call to SConscriptSK')
+
+for temp in all_modules:
+    if temp in module:
+        SConscript('SConscript' + temp.upper(), exports = 'env_linux')
+
+if 'tc' in test:
+    install_targets += tc_util
+
+    if 'ic' in module or 'cs' in module:
+        install_targets += cloud_util
+
+install_bin = env_linux.Install(iotivity_test_root + '/' + install_dir, install_targets)
+
+delete_bin = []
+i = 0
+for delete_target in install_targets:
+    #delete_bin.append(Command(str(i), [], Delete(delete_target)))
+    i = i +1
+
+Depends(delete_bin, install_bin)
+
+default_targets = install_bin + delete_bin
+
+env_linux.Default(default_targets)
diff --git a/test/build/linux/SConscriptCA b/test/build/linux/SConscriptCA
new file mode 100755 (executable)
index 0000000..2bc1e82
--- /dev/null
@@ -0,0 +1,220 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+print '\n---------------Started Building CA Module for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+env_linux['CC'] = 'g++'
+
+iotivity_root = env_linux.get('IOTIVITY_ROOT')
+iotivity_lib_path = env_linux.get('IOTIVITY_LIB_PATH')
+iotivity_test_root = env_linux.get('IOTIVITY_TEST_ROOT')
+variant_dir = env_linux.get('VARIANT_DIR')
+install_dir = env_linux.get('INSTALL_DIR')
+test_src_root = iotivity_test_root + '/' + variant_dir
+target_transport = env_linux.get('TARGET_TRANSPORT')
+test = env_linux.get('TEST')
+common_linux_cppflags = env_linux.get('COMMON_LINUX_CPPFLAGS')
+
+if env_linux.get('SECURED') == '1':
+    secured = True
+else:
+    secured = False
+
+install_targets = []
+default_targets = []
+
+transport_list = [ '', 'IP', 'TCP' ]
+transport_bin_name = [ 'iotivity_ca_test', 'iotivity_ca_ip_test', 'iotivity_ca_tcp_test' ]
+
+transport_cppdefines = [
+    [''],
+    ['__IP__', '__ALL_TRANSPORT__'],
+    ['__TCP__', '__ALL_TRANSPORT__', 'TCP_ADAPTER']
+]
+
+iotivity_include_paths = [
+    iotivity_root + '/resource/csdk/stack/include',
+    iotivity_root + '/resource/csdk/connectivity/api',
+    iotivity_root + '/resource/csdk/connectivity/inc',
+    iotivity_root + '/resource/csdk/connectivity/common/inc',
+    iotivity_root + '/resource/csdk/connectivity/external/inc',
+    iotivity_root + '/resource/c_common/oic_malloc/include',
+    iotivity_root + '/resource/c_common/oic_string/include',
+    iotivity_root + '/resource/c_common/ocrandom/include',
+    iotivity_root + '/extlibs/mbedtls/mbedtls/include',
+    iotivity_root + '/extlibs/mbedtls/mbedtls/include/mbedtls',
+    iotivity_root + '/resource/c_common',
+    iotivity_root + '/resource/csdk/include',
+    iotivity_root + '/resource/csdk/logger/include',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include',
+    iotivity_lib_path + '/resource/c_common'
+]
+
+tc_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/tc/ca/gtest/include',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/include',
+    test_src_root + '/tc/ca/gtest/include/testcase/ca'
+]
+simulator_include_paths = [ test_src_root + '/testapp/ca/c_cpp/include' ]
+
+lib_paths = [
+    iotivity_lib_path,
+    iotivity_lib_path + '/resource/csdk/logger',
+    iotivity_lib_path + '/resource/c_common/',
+    iotivity_lib_path + '/resource/csdk/routing/',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/bin/linux'
+]
+
+common_cppflags = Split('-s -pthread -march=native -std=gnu++0x') + common_linux_cppflags
+
+common_cppdefines = []
+
+gtest_unspecified_network_src = [
+    test_src_root + '/tc/ca/gtest/src/btc/CATest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CACommonTest.cpp'
+]
+
+gtest_ip_network_src = [
+    test_src_root + '/tc/ca/gtest/src/btc/CANetworkTest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CANetworkCommonTest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CAClientTest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CAMulticastTest.cpp'
+]
+
+gtest_tcp_network_src = [
+    test_src_root + '/tc/ca/gtest/src/btc/CANetworkTest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CANetworkCommonTest.cpp',
+    test_src_root + '/tc/ca/gtest/src/stc/CAClientTest.cpp'
+]
+
+gtest_src = [ gtest_unspecified_network_src, gtest_ip_network_src, gtest_tcp_network_src ]
+
+tc_common_src = [ test_src_root + '/tc/ca/gtest/src/helper/CAHelper.cpp' ]
+
+lib_list = Split('libboost_system libboost_filesystem libboost_thread rt gio-2.0 gobject-2.0 glib-2.0 uuid libdl libexpat pthread gcov coap octbstack connectivity_abstraction ocsrm c_common')
+
+if secured:
+    lib_list.append('mbedtls')
+    lib_list.append('mbedx509')
+    lib_list.append('mbedcrypto')
+    common_cppdefines.append('__WITH_DTLS__')
+
+if 'tc' in test:
+    i = -1
+
+    for transport in transport_list:
+
+        i = i + 1
+        if transport and transport not in target_transport:
+            continue
+
+        temp_source_list = []
+
+        cpp_defines = common_cppdefines + transport_cppdefines[i]
+
+        for single_cpp in tc_common_src + gtest_src[i]:
+            temp_single_cpp = str(single_cpp)
+
+            if not (temp_single_cpp.endswith('.cpp') or temp_single_cpp.endswith('.c') ):
+                continue
+
+            single_object = temp_single_cpp.replace('.cpp', '.o').replace('.c', '.o').replace('/', '_').replace('..', '')
+            single_object = 'ca' + '/' + transport_list[i] + '/' + single_object
+
+            temp_object = env_linux.Object(source = single_cpp,
+                            target = single_object,
+                            CPPPATH = iotivity_include_paths + tc_include_paths,
+                            LIBS = lib_list,
+                            LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                            CPPFLAGS = common_cppflags,
+                            CPPDEFINES = cpp_defines,
+                            RPATH = iotivity_lib_path)
+            temp_source_list.append(single_object)
+
+        ca_tc = env_linux.Program(source = temp_source_list,
+                            target = transport_bin_name[i],
+                            CPPPATH = iotivity_include_paths + tc_include_paths,
+                            LIBS = ['common_util', 'tc_util', 'gtest', 'dl', 'pthread'] + lib_list,
+                            LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                            CPPFLAGS = common_cppflags,
+                            CPPDEFINES = cpp_defines,
+                            RPATH = iotivity_lib_path)
+        install_targets += ca_tc
+
+
+if 'simulator' in test or 'tc' in test:
+    simulator_cpp_defines = common_cppdefines
+
+    if 'TCP' in target_transport:
+        simulator_cpp_defines.append('WITH_TCP')
+        simulator_cpp_defines.append('TCP_ADAPTER')
+
+    ca_simulator = env_linux.Program(source = [test_src_root + '/testapp/ca/c_cpp/src/ca_simulator.c'],
+                        target = 'iotivity_ca_simulator',
+                        CPPPATH = iotivity_include_paths + simulator_include_paths,
+                        LIBS = lib_list,
+                        LIBPATH = lib_paths,
+                        CPPFLAGS = common_cppflags,
+                        CPPDEFINES = simulator_cpp_defines,
+                        RPATH = iotivity_lib_path
+                        )
+    install_targets += ca_simulator
+
+    ca_server = env_linux.Program(source = [test_src_root + '/testapp/ca/c_cpp/src/sample_server.c'],
+                        target = 'iotivity_ca_server',
+                        CPPPATH = iotivity_include_paths + simulator_include_paths,
+                        LIBS = lib_list,
+                        LIBPATH = lib_paths,
+                        CPPFLAGS = common_cppflags,
+                        CPPDEFINES = simulator_cpp_defines,
+                        RPATH = iotivity_lib_path
+                        )
+    install_targets += ca_server
+
+    ca_client = env_linux.Program(source = [test_src_root + '/testapp/ca/c_cpp/src/sample_client.c'],
+                        target = 'iotivity_ca_client',
+                        CPPPATH = iotivity_include_paths + simulator_include_paths,
+                        LIBS = lib_list,
+                        LIBPATH = lib_paths,
+                        CPPFLAGS = common_cppflags,
+                        CPPDEFINES = simulator_cpp_defines,
+                        RPATH = iotivity_lib_path
+                        )
+    install_targets += ca_client
+
+    default_targets += env_linux.Command('config_file', [], Copy(test_src_root, iotivity_test_root + '/res/ca_resource/config.ini'))
+
+install_bin = env_linux.Install(iotivity_test_root + '/' + install_dir, install_targets)
+
+delete_bin = []
+i = 0
+for delete_target in install_targets:
+    delete_bin.append(Command(str(i), [], Delete(delete_target)))
+    i = i +1
+
+default_targets = install_bin + delete_bin
+
+env_linux.Default(default_targets)
diff --git a/test/build/linux/SConscriptCHP b/test/build/linux/SConscriptCHP
new file mode 100644 (file)
index 0000000..44d1577
--- /dev/null
@@ -0,0 +1,128 @@
+'''
+/******************************************************************
+*
+* Copyright 2017 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+
+##
+# Build script for Linux
+#
+##
+
+print '\n---------------Started Building Resource Container Module for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+
+Import('env_linux')
+import os
+
+env_linux['CC'] = 'g++'
+
+iotivity_root = env_linux.get('IOTIVITY_ROOT')
+iotivity_lib_path = env_linux.get('IOTIVITY_LIB_PATH')
+iotivity_test_root = env_linux.get('IOTIVITY_TEST_ROOT')
+variant_dir = env_linux.get('VARIANT_DIR')
+install_dir = env_linux.get('INSTALL_DIR')
+test_src_root = iotivity_test_root + '/' + variant_dir
+test = env_linux.get('TEST')
+common_linux_cppflags = env_linux.get('COMMON_LINUX_CPPFLAGS')
+
+install_targets = []
+default_targets = []
+
+iotivity_include_paths = [
+    iotivity_root + '/resource/include',
+    iotivity_root + '/resource/csdk/include',
+    iotivity_root + '/resource/c_common',
+    iotivity_root + '/resource/csdk/stack/include',
+    iotivity_root + '/resource/csdk/ocsocket/include',
+    iotivity_root + '/resource/csdk/ocrandom/include',
+    iotivity_root + '/resource/oc_logger/include',
+    iotivity_root + '/resource/csdk/connectivity/common/inc/',
+    iotivity_root + '/resource/csdk/connectivity/lib/libcoap-4.1.1',
+    iotivity_root + '/extlibs/cereal/include',
+    iotivity_root + '/extlibs/timer',
+    iotivity_root + '/extlibs/cjson',
+    iotivity_root + '/extlibs/hippomocks-master',
+    iotivity_root + '/extlibs/tinycbor/tinycbor/src',
+    iotivity_root + '/resource/c_common/oic_string/include',
+    iotivity_root + '/resource/csdk/logger/include',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/csdk/security/include',
+    iotivity_root + '/service/coap-http-proxy/include',
+    iotivity_root + '/service/resource-encapsulation/include',
+    iotivity_root + '/service/resource-encapsulation/src/common/primitiveResource/include',
+    iotivity_root + '/service/resource-encapsulation/src/common/utils/include',
+    iotivity_lib_path + '/resource/c_common'
+]
+
+tc_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/tc/chp/gtest/include',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/include'
+]
+
+tc_src = [
+    Glob(test_src_root + '/tc/chp/gtest/src/btc/*.cpp'),
+    Glob(test_src_root + '/tc/chp/gtest/src/stc/*.cpp'),
+    Glob(test_src_root + '/tc/chp/gtest/src/helper/*.cpp')
+]
+
+testapp_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/iBtestapp/common/include',
+    test_src_root + '/iBtestapp/modules/chp/c_cpp/include'
+]
+
+testapp_src = [ 
+    Glob(test_src_root + '/iBtestapp/modules/chp/c_cpp/src/*.cpp'),
+    test_src_root + '/iBtestapp/common/src/IBtestappCommonUtil.cpp'
+]
+
+cppflags = Split('-s -pthread -march=native -std=gnu++0x -pthread -Wall -fpermissive')
+
+libs = Split('coap_http_proxy connectivity_abstraction octbstack coap dl expat oc oc_logger oc_logger_core glib-2.0 uuid gcov ocsrm HueBundle common_util curl cjson pthread boost_system boost_filesystem boost_thread')
+
+env_linux.ParseConfig("pkg-config --cflags --libs uuid")
+
+if 'tc' in test:
+    chp_tc = env_linux.Program(source = tc_src,
+                target = 'iotivity_chp_test',
+                CPPPATH = iotivity_include_paths + tc_include_paths,
+                LIBS = ['tc_util', 'gtest'] + libs,
+                RPATH = iotivity_lib_path,
+                LIBPATH = [iotivity_lib_path, iotivity_test_root + '/extlibs/gtest-1.7.0/bin/linux', '.'],
+                CPPFLAGS = cppflags + common_linux_cppflags)
+    install_targets += chp_tc
+
+
+
+install_bin = env_linux.Install(iotivity_test_root + '/' + install_dir, install_targets)
+
+delete_bin = []
+i = 0
+for delete_target in install_targets:
+    delete_bin.append(Command(str(i), [], Delete(delete_target)))
+    i = i +1
+
+default_targets = install_bin + delete_bin
+
+env_linux.Default(default_targets)
diff --git a/test/build/linux/SConscriptCS b/test/build/linux/SConscriptCS
new file mode 100644 (file)
index 0000000..3aa119f
--- /dev/null
@@ -0,0 +1,243 @@
+'''
+/******************************************************************
+*
+* Copyright 2018 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+print '\n---------------Started Building CS Module for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+env_linux['CC'] = 'g++'
+
+iotivity_root = env_linux.get('IOTIVITY_ROOT')
+iotivity_lib_path = env_linux.get('IOTIVITY_LIB_PATH')
+iotivity_test_root = env_linux.get('IOTIVITY_TEST_ROOT')
+variant_dir = env_linux.get('VARIANT_DIR')
+install_dir = env_linux.get('INSTALL_DIR')
+test_src_root = iotivity_test_root + '/' + variant_dir
+test = env_linux.get('TEST')
+sdk = env_linux.get('SDK')
+tls_mode = env_linux.get('TLS_MODE')
+cloud_service_build = env_linux.get('CLOUD_SERVICE')
+kafka_root = env_linux.get('KAFKA_ROOT')
+common_linux_cppflags = env_linux.get('COMMON_LINUX_CPPFLAGS')
+common_rpath = [iotivity_lib_path, '.', '/usr/local/lib']
+
+install_targets = []
+default_targets = []
+
+# Features Configuration
+CERT_ENABLED = 1
+CLOUD_ENABLED = 1
+
+iotivity_include_paths = [
+    iotivity_root + '/resource/csdk',
+    iotivity_root + '/resource/csdk/include',
+    iotivity_root + '/resource/csdk/security/include',
+    iotivity_root + '/resource/csdk/security/include/internal',
+    iotivity_root + '/resource/csdk/security/provisioning/include',
+    iotivity_root + '/resource/csdk/security/provisioning/include/internal',
+    iotivity_root + '/resource/csdk/security/provisioning/include/oxm',
+    iotivity_root + '/resource/csdk/security/provisioning/include/cloud',
+    iotivity_root + '/resource/include',
+    iotivity_root + '/resource/csdk/stack/include',
+    iotivity_root + '/resource/csdk/ocrandom/include',
+    iotivity_root + '/resource/csdk/logger/include',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/csdk/connectivity/inc',
+    iotivity_root + '/resource/csdk/connectivity/inc/pkix',
+    iotivity_root + '/resource/csdk/connectivity/common/inc',
+    iotivity_root + '/resource/csdk/connectivity/lib/libcoap-4.1.1',
+    iotivity_root + '/resource/csdk/connectivity/api',
+    iotivity_root + '/resource/c_common/oic_malloc/include',
+    iotivity_root + '/resource/c_common',
+    iotivity_root + '/resource/c_common/octhread/include',
+    iotivity_root + '/resource/c_common/oic_string/include',
+    iotivity_root + '/resource/c_common/oic_string/include',
+    iotivity_root + '/resource/c_common/ocrandom/include',
+    iotivity_root + '/resource/csdk/stack/include/experimental',
+    iotivity_root + '/resource/csdk/logger/include/experimental',
+    iotivity_root + '/resource/oc_logger/include',
+    iotivity_root + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include/',
+    iotivity_root + '/resource/csdk/resource-directory/include',
+    iotivity_root + '/extlibs/cjson',
+    iotivity_root + '/extlibs/base64',
+    iotivity_root + '/extlibs/tinycbor/tinycbor/src',
+    iotivity_root + '/extlibs/mbedtls/mbedtls/include',
+    iotivity_root + '/extlibs/mbedtls/mbedtls/include/mbedtls',
+    iotivity_root + '/extlibs/tinydtls',
+    iotivity_lib_path + '/resource/c_common'
+]
+
+csdk_tc_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/tc/cs/gtest/csdk/include',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/include',
+]
+
+cpp_tc_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/tc/cs/gtest/cpp/include',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/include',
+]
+
+csdk_tc_src = [
+    Glob(test_src_root + '/tc/cs/gtest/csdk/src/helper/*.cpp'),
+    Glob(test_src_root + '/tc/cs/gtest/csdk/src/btc/*.cpp'),
+    Glob(test_src_root + '/tc/cs/gtest/csdk/src/stc/*.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/ResourceServer.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/SampleResource.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/ResourceHelper.cpp')
+]
+
+csdk_app_include_paths = [
+    iotivity_test_root + '/include',
+    test_src_root + '/tc/cs/gtest/csdk/include',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/include',
+]
+
+csdk_app_src = [
+    Glob(test_src_root + '/iBtestapp/modules/cs/c_cpp/csdk/*.cpp'),
+    Glob(test_src_root + '/tc/cs/gtest/csdk/src/helper/*.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/ResourceServer.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/SampleResource.cpp'),
+    Glob(test_src_root + '/common/commonutil/c_cpp/ResourceHelper.cpp')
+]
+
+cpp_tc_src = [
+    Glob(test_src_root + '/tc/cs/gtest/cpp/src/helper/*.cpp'),
+    Glob(test_src_root + '/tc/cs/gtest/cpp/src/btc/*.cpp'),
+    Glob(test_src_root + '/tc/cs/gtest/cpp/src/stc/*.cpp')
+]
+
+lib_paths = [
+    '.',
+    iotivity_lib_path,
+    iotivity_lib_path + '/resource/csdk/logger',
+    iotivity_lib_path + '/resource/csdk/security/provisioning/ck_manager',
+    iotivity_lib_path + '/resource/csdk/security',
+    iotivity_lib_path + '/resource/c_common/',
+    iotivity_lib_path + '/resource/csdk/routing/',
+    iotivity_test_root + '/extlibs/gtest-1.7.0/bin/linux/',
+    iotivity_root + '/extlibs/mbedtls/'
+]
+
+simulator_src = [
+    test_src_root + '/testapp/cs/iotivity_cs_server.cpp'
+]
+
+cppflags = Split('-s -pthread -march=native -std=gnu++0x -pthread -D__SECURED__ -D__CLOUD__ -DCA_DBUS_GATT_SERVICE_NAME -DROUTING_EP -DGLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_2_32 -DWITH_BWT -DTB_LOG -DIP_ADAPTER -DLE_ADAPTER -DNO_EDR_ADAPTER -DHAVE_SYS_TIME_H -DDTLSV12 -DRD_CLIENT -DWITH_CLOUD -D_ENABLE_MULTIPLE_OWNER_ -DWITH_POSIX -DNDEBUG -DTCP_ADAPTER -fpermissive -D__WITH_DTLS__ -D__WITH_TLS__ -DWITH_TCP')
+cxxflags = ['-c', '-Os', '-Wall', '-Wextra', '-fPIC', '-pthread',
+               '-DWITH_SHA256', '-DDTLS_CHECK_CONTENTTYPE', '-DSHA2_USE_INTTYPES_H', '-DROUTING_EP', '-DWITH_BWT',
+               '-D__WITH_DTLS__', '-DTB_LOG', '-ftest-coverage', '-fprofile-arcs' , '-D__SECURED__']
+lib_list = Split('boost_system boost_filesystem boost_thread c_common coap connectivity_abstraction dl expat gcov gio-2.0 gobject-2.0 glib-2.0 m oc cloud oc_logger logger octbstack ocpmapi ocprovision ocsrm octbstack rt uuid  mbedtls mbedcrypto mbedx509 resource_directory cloud_util common_util dl curl boost_system boost_filesystem boost_thread pthread')
+
+if 'tc' in test:
+
+    csdk_target_binary = 'iotivity_cs_csdk_tlsoff_test'
+    cpp_target_binary = 'iotivity_cs_cpp_tlsoff_test'
+    if tls_mode:
+        cppflags.append(['-D__TLS_ON__'])
+        csdk_target_binary = 'iotivity_cs_csdk_tlson_test'
+        cpp_target_binary = 'iotivity_cs_cpp_tlson_test'
+
+    if 'csdk' in sdk:
+        csdk_tc = env_linux.Program(source = csdk_tc_src,
+                                 target = csdk_target_binary,
+                                 CPPPATH = iotivity_include_paths + csdk_tc_include_paths,
+                                 LIBS = lib_list + ['gtest', 'tc_util', 'dl'],
+                                 LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                                 RPATH = common_rpath,
+                                 CPPFLAGS = cppflags + common_linux_cppflags,
+                                 CXXFLAGS = cxxflags)
+        install_targets += csdk_tc
+
+    if 'cpp' in sdk:
+        cpp_tc = env_linux.Program(source = cpp_tc_src,
+                            target = cpp_target_binary,
+                            CPPPATH = iotivity_include_paths + cpp_tc_include_paths,
+                            LIBS=lib_list + ['gtest', 'tc_util', 'dl'],
+                            LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                            RPATH = common_rpath,
+                            CPPFLAGS = cppflags + common_linux_cppflags,
+                            CXXFLAGS = cxxflags)
+        install_targets += cpp_tc
+
+if 'app' in test:
+    csdk_target_binary = 'iotivity_cs_csdk_tlsoff_app'
+    cpp_target_binary = 'iotivity_cs_cpp_tlsoff_app'
+    if tls_mode:
+        cppflags.append(['-D__TLS_ON__'])
+        csdk_target_binary = 'iotivity_cs_csdk_tlson_app'
+        cpp_target_binary = 'iotivity_cs_cpp_tlson_app'
+
+    if 'csdk' in sdk:
+        csdk_tc = env_linux.Program(source = csdk_app_src,
+                                 target = csdk_target_binary,
+                                 CPPPATH = iotivity_include_paths + csdk_app_include_paths,
+                                 LIBS = lib_list,
+                                 LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                                 RPATH = common_rpath,
+                                 CPPFLAGS = cppflags + common_linux_cppflags,
+                                 CXXFLAGS = cxxflags)
+        install_targets += csdk_tc
+
+if 'tc' in test or 'simulator' in test:
+    csc_simulator = env_linux.Program(source = simulator_src,
+                                      target = 'iotivity_cs_server',
+                                      CPPPATH = iotivity_include_paths + csdk_tc_include_paths,
+                                      LIBS = lib_list,
+                                      LIBPATH = lib_paths + ['.', '/usr/local/lib'],
+                                      RPATH = common_rpath,
+                                      CPPFLAGS = cppflags + common_linux_cppflags,
+                                      CXXFLAGS = cxxflags)
+    install_targets += csc_simulator
+
+if 'tc' in test or 'app' in test:
+    cs_resource_path = iotivity_test_root + '/res/cloud_resource'
+    cs_resource_list = Glob(cs_resource_path + '/*.*')
+    common_resource_list = Glob(iotivity_test_root + '/res/common/*.*')
+    cs_dat_file = iotivity_root + '/resource/provisioning/examples/cloud.dat'
+    cs_crt_file = iotivity_root + '/resource/provisioning/examples/rootca.crt'
+
+install_bin = env_linux.Install(iotivity_test_root + '/' + install_dir, install_targets)
+install_res = env_linux.Install(iotivity_test_root + '/' + install_dir, cs_dat_file)
+install_res += env_linux.Install(iotivity_test_root + '/bin', cs_dat_file)
+install_res += env_linux.Install(iotivity_test_root + '/' + install_dir + '/rootca.crt', cs_crt_file)
+install_res += env_linux.Install(iotivity_test_root + '/bin/rootca.crt', cs_crt_file)
+install_res += env_linux.Install(iotivity_test_root + '/' + install_dir, common_resource_list)
+install_res += env_linux.Install(iotivity_test_root + '/bin', common_resource_list)
+install_res += env_linux.Install(iotivity_test_root + '/' + install_dir, cs_resource_list)
+install_res += env_linux.Install(iotivity_test_root + '/bin', cs_resource_list)
+
+if cloud_service_build:
+    build_command = 'bash ' + iotivity_test_root + '/res/cloud_resource/cloud_build.sh ' + kafka_root + ' ' + iotivity_root
+    cloud_build = env_linux.Command('cloud_build', None, build_command)
+    default_targets += [cloud_build]
+
+delete_bin = []
+i = 0
+for delete_target in install_targets:
+    delete_bin.append(Command(str(i), [], Delete(delete_target)))
+    i = i +1
+
+default_targets += install_bin + install_res + delete_bin
+
+env_linux.Default(default_targets)
diff --git a/test/build/linux/SConscriptCSC b/test/build/linux/SConscriptCSC
new file mode 100644 (file)
index 0000000..3882aab
--- /dev/null
@@ -0,0 +1,187 @@
+'''
+/******************************************************************
+*
+* Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+print '\n---------------Started Building CSC Module for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+env_linux['CC'] = 'g++'
+
+PROJECT_HOME = '../../'
+
+VARIANT_DIR = env_linux['VARIANT_DIR']
+IOTIVITY_ROOT = env_linux['ORG_SRC']
+TARGET_ARCH = env_linux.get('TARGET_ARCH')
+TARGET_SERVICE = env_linux.get('TARGET_SERVICE')
+TARGET_TRANSPORT = env_linux.get('TARGET_TRANSPORT')
+TARGET_TEST = env_linux.get('TARGET_TEST')
+SECURED = env_linux.get('SECURED')
+
+if 'cscpp' in TARGET_SERVICE:
+    Return()
+
+create_target_dir = env_linux.Command('target.out', [], Mkdir(VARIANT_DIR))
+pre_job = [create_target_dir]
+default_targets = [pre_job]
+install_targets = []
+
+if env_linux.get('RELEASE'):
+    RELEASE_DIR = 'release'
+else:
+    RELEASE_DIR = 'debug'
+
+IOTIVITY_LIB_PATH = IOTIVITY_ROOT + '/out/linux/' + TARGET_ARCH + '/' + RELEASE_DIR
+
+# Features Configuration
+CERT_ENABLED = 1
+MOT_ENABLED = 1
+CLOUD_ENABLED = 1
+DP_ENABLED = 0
+TLS_MODE = env_linux.get('TLS_MODE')
+
+arch_flag = ''
+if TARGET_ARCH in ['x86']:
+    env_linux.AppendUnique(CCFLAGS=['-m32'])
+    env_linux.AppendUnique(LINKFLAGS=['-m32'])
+    arch_flag = '-m32'
+elif TARGET_ARCH in ['x86_64']:
+    env_linux.AppendUnique(CCFLAGS=['-m64'])
+    env_linux.AppendUnique(LINKFLAGS=['-m64'])
+    arch_flag = '-m64'
+
+IOTIVITY_INCLUDE_PATH = [
+    IOTIVITY_ROOT + '/resource/csdk',
+    IOTIVITY_ROOT + '/resource/csdk/security/include',
+    IOTIVITY_ROOT + '/resource/csdk/security/include/internal',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/internal',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/oxm',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/cloud',
+    IOTIVITY_ROOT + '/resource/include',
+    IOTIVITY_ROOT + '/resource/csdk/stack/include',
+    IOTIVITY_ROOT + '/resource/csdk/ocrandom/include',
+    IOTIVITY_ROOT + '/resource/csdk/logger/include',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/inc',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/inc/pkix',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/common/inc',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/lib/libcoap-4.1.1',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/api',
+    IOTIVITY_ROOT + '/resource/c_common/oic_malloc/include',
+    IOTIVITY_ROOT + '/resource/c_common',
+    IOTIVITY_ROOT + '/resource/c_common/oic_string/include',
+    IOTIVITY_ROOT + '/resource/c_common/oic_string/include',
+    IOTIVITY_ROOT + '/resource/oc_logger/include',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include/',
+    IOTIVITY_ROOT + '/resource/csdk/resource-directory/include',
+    IOTIVITY_ROOT + '/extlibs/tinydtls',
+    IOTIVITY_ROOT + '/extlibs/cjson',
+    IOTIVITY_ROOT + '/extlibs/base64',
+    IOTIVITY_ROOT + '/extlibs/tinycbor/tinycbor/src',
+    IOTIVITY_ROOT + '/extlibs/mbedtls/mbedtls/include/mbedtls',
+    iotivity_lib_path + '/resource/c_common'
+]
+
+TC_INCLUDE_PATH = [
+       PROJECT_HOME + '/include',
+       PROJECT_HOME + '/src/tc/cs/gtest/cscsdk/include',
+       PROJECT_HOME + '/extlibs/gtest-1.7.0/include',
+]
+
+LIB_PATH_LIST = [
+    IOTIVITY_LIB_PATH,
+    IOTIVITY_LIB_PATH + '/resource/csdk/logger',
+    IOTIVITY_LIB_PATH + '/resource/csdk/security/provisioning/ck_manager',
+    IOTIVITY_LIB_PATH + '/resource/csdk/security',
+    IOTIVITY_LIB_PATH + '/resource/c_common/',
+    IOTIVITY_LIB_PATH + '/resource/csdk/routing/',
+    PROJECT_HOME + '/extlibs/gtest-1.7.0/bin/linux/',
+    IOTIVITY_ROOT + '/extlibs/mbedtls/'
+]
+
+TC_SRC_LIST = [
+    Glob(IOTIVITY_LIB_PATH + '/resource/csdk/security/src/*.o'),
+    Glob(IOTIVITY_ROOT + '/extlibs/asn1cert/*.o'),
+    Glob(IOTIVITY_LIB_PATH + '/resource/csdk/connectivity/src/adapter_util/pkix/*.o'),
+    Glob(PROJECT_HOME + '/src/common/commonutil/c_cpp/CommonUtil.cpp'),
+    Glob(PROJECT_HOME + '/src/common/commonutil/c_cpp/CloudCommon.cpp'),
+    Glob(PROJECT_HOME + '/src/common/commonutil/c_cpp/trace.c'),
+    Glob(PROJECT_HOME + '/src/common/testcase/gtest/IotivitySECTestMain.cpp'),
+    Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscsdk/src/helper/*.cpp'),
+    Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscsdk/src/btc/*.cpp'),
+    Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscsdk/src/stc/*.cpp')
+]
+
+CS_CPPFLAGS = Split(
+    '-s -pthread -march=native -std=gnu++0x -pthread -D__CLOUD__ -DCA_DBUS_GATT_SERVICE_NAME -DROUTING_EP -DGLIB_VERSION_MIN_REQUIRED -DGLIB_VERSION_2_32 -DWITH_BWT -DTB_LOG -DIP_ADAPTER -DLE_ADAPTER -DNO_EDR_ADAPTER -DHAVE_SYS_TIME_H -DDTLSV12 -DRD_CLIENT -DWITH_CLOUD -D_ENABLE_MULTIPLE_OWNER_ -DWITH_POSIX -DNDEBUG -DTCP_ADAPTER -DLINUX -fpermissive -D__TC_PLATFORM_LINUUX__ -D__LINUX__ -D__WITH_DTLS__ -D__WITH_TLS__ -DWITH_TCP')
+CS_CXXFLAGS = ['-c', '-Os', '-Wall', '-Wextra', '-fPIC', arch_flag, '-pthread',
+               '-DWITH_SHA256', '-DDTLS_CHECK_CONTENTTYPE', '-DSHA2_USE_INTTYPES_H', '-DROUTING_EP', '-DWITH_BWT',
+               '-D__WITH_DTLS__', '-DTB_LOG', '-ftest-coverage', '-fprofile-arcs']
+
+lib_list = Split(
+    'boost_system boost_filesystem boost_thread c_common curl coap connectivity_abstraction dl expat gcov gio-2.0 gobject-2.0 glib-2.0 m oc oc_logger logger octbstack ocpmapi ocprovision ocsrm octbstack pthread rt uuid tinydtls resource_directory mbedtls mbedcrypto mbedx509')
+
+csc_env = env_linux.Clone()
+
+if TARGET_TEST == None or 'tc' in TARGET_TEST or 'all' in TARGET_TEST:
+
+    target_binary = 'iotivity_csc_tlsoff_test'
+    if TLS_MODE == 1:
+        CS_CPPFLAGS.append(['-D__TLS_ON__'])
+        target_binary = 'iotivity_csc_tlson_test'
+
+    csc_tc = csc_env.Program(source=TC_SRC_LIST + [PROJECT_HOME + '/extlibs/gtest-1.7.0/bin/linux/libgtest.a'],
+                           target=target_binary,
+                           CPPPATH=IOTIVITY_INCLUDE_PATH + TC_INCLUDE_PATH,
+                           LIBS=lib_list,
+                           LIBPATH=LIB_PATH_LIST,
+                           RPATH=IOTIVITY_LIB_PATH,
+                           CPPFLAGS=CS_CPPFLAGS,
+                           CXXFLAGS=CS_CXXFLAGS)
+
+    install_targets += csc_tc
+
+if TARGET_TEST == None or 'tc' in TARGET_TEST or 'all' in TARGET_TEST:
+
+    cs_resource_path = PROJECT_HOME + '/res/cs_resource'
+    cs_resource_list = Glob(cs_resource_path + '/*.*')
+
+    default_targets += [create_target_dir]
+
+    i = 0
+    for cs_resource in cs_resource_list:
+        cs_resource_backup = env_linux.Command('cs_resource_backup' + str(i), [], Copy(VARIANT_DIR, cs_resource))
+        cs_bin_dir = env_linux.Command('cs_bin_dir' + str(i), [], Copy(VARIANT_DIR + '../', cs_resource))
+        i = i + 1
+        default_targets += [cs_resource_backup, cs_bin_dir]
+
+install = env_linux.Install(PROJECT_HOME + VARIANT_DIR, install_targets)
+
+delete_bin = []
+i = 0
+for delete_target in install_targets:
+    delete_bin += '0'
+    delete_bin[i] = Command(str(i), [], Delete(delete_target))
+    i = i + 1
+
+default_targets += install_targets + install + delete_bin
+
+env_linux.Default(default_targets)
diff --git a/test/build/linux/SConscriptCSCPP b/test/build/linux/SConscriptCSCPP
new file mode 100644 (file)
index 0000000..07697d0
--- /dev/null
@@ -0,0 +1,170 @@
+'''
+/******************************************************************
+*
+* Copyright 2016 Samsung Electronics All Rights Reserved.
+*
+*
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+******************************************************************/
+'''
+print '\n---------------Started Building CS CPP Module for Linux---------------\n'
+
+Import('env_linux')
+import os
+
+env_linux['CC'] = 'g++'
+
+PROJECT_HOME = '../../'
+
+VARIANT_DIR = env_linux['VARIANT_DIR']
+IOTIVITY_ROOT = env_linux['ORG_SRC']
+TARGET_ARCH = env_linux.get('TARGET_ARCH')
+TARGET_TRANSPORT = env_linux.get('TARGET_TRANSPORT')
+TARGET_TEST = env_linux.get('TARGET_TEST')
+SECURED = env_linux.get('SECURED')
+
+create_target_dir = env_linux.Command('target.out', [], Mkdir(VARIANT_DIR))
+pre_job = [create_target_dir]
+default_targets = [pre_job]
+install_targets = []
+
+if env_linux.get('RELEASE'):
+    RELEASE_DIR = 'release'
+else:
+    RELEASE_DIR = 'debug'
+
+IOTIVITY_LIB_PATH = IOTIVITY_ROOT + '/out/linux/' + TARGET_ARCH + '/' + RELEASE_DIR
+
+#Features Configuration
+TLS_MODE = env_linux.get('TLS_MODE')
+
+arch_flag = ''
+if TARGET_ARCH in ['x86']:
+    env_linux.AppendUnique(CCFLAGS = ['-m32'])
+    env_linux.AppendUnique(LINKFLAGS = ['-m32'])
+    arch_flag = '-m32'
+elif TARGET_ARCH in ['x86_64']:
+    env_linux.AppendUnique(CCFLAGS = ['-m64'])
+    env_linux.AppendUnique(LINKFLAGS = ['-m64'])
+    arch_flag = '-m64'
+
+IOTIVITY_INCLUDE_PATH = [
+    IOTIVITY_ROOT + '/resource/csdk',
+    IOTIVITY_ROOT + '/resource/csdk/security/include',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/internal',
+    IOTIVITY_ROOT + '/resource/csdk/security/include/internal',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/oxm',
+    IOTIVITY_ROOT + '/resource/include',
+    IOTIVITY_ROOT + '/resource/csdk/stack/include',
+    IOTIVITY_ROOT + '/resource/csdk/ocrandom/include',
+    IOTIVITY_ROOT + '/resource/csdk/logger/include',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/inc',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/common/inc',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/lib/libcoap-4.1.1',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/api',
+    IOTIVITY_ROOT + '/resource/c_common/oic_malloc/include',
+    IOTIVITY_ROOT + '/resource/c_common',
+    IOTIVITY_ROOT + '/resource/c_common/oic_string/include',
+    IOTIVITY_ROOT + '/resource/c_common/oic_string/include',
+    IOTIVITY_ROOT + '/extlibs/tinydtls',
+    IOTIVITY_ROOT + '/extlibs/cjson',
+    IOTIVITY_ROOT + '/extlibs/base64',
+    IOTIVITY_ROOT + '/extlibs/tinycbor/tinycbor/src',
+    IOTIVITY_ROOT + '/resource/oc_logger/include',
+    IOTIVITY_ROOT + '/resource/provisioning/examples',
+    IOTIVITY_ROOT + '/resource/csdk/security/provisioning/include/cloud',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/lib/libcoap-4.1.1/include/',
+    IOTIVITY_ROOT + '/resource/csdk/connectivity/inc/pkix',
+    IOTIVITY_ROOT + '/resource/csdk/resource-directory/include',
+    IOTIVITY_ROOT + '/extlibs/mbedtls/mbedtls/include/mbedtls',
+    iotivity_lib_path + '/resource/c_common'
+]
+
+TC_INCLUDE_PATH = [
+    PROJECT_HOME + '/include',
+    PROJECT_HOME + '/src/tc/cs/gtest/cscpp/include',
+    PROJECT_HOME + '/extlibs/gtest-1.7.0/include',
+]
+
+LIB_PATH_LIST = [
+    IOTIVITY_LIB_PATH,
+    IOTIVITY_LIB_PATH + '/resource/csdk/logger',
+    IOTIVITY_LIB_PATH + '/resource/csdk/security',
+    IOTIVITY_LIB_PATH + '/resource/c_common/',
+    IOTIVITY_LIB_PATH + '/resource/csdk/routing/',
+    PROJECT_HOME + '/extlibs/gtest-1.7.0/bin/linux'
+]
+
+TC_SRC_LIST = [
+       Glob( IOTIVITY_LIB_PATH + '/resource/csdk/security/src/*.o'),
+       Glob(IOTIVITY_ROOT + '/extlibs/asn1cert/*.o'),
+       Glob(IOTIVITY_LIB_PATH + '/resource/csdk/connectivity/src/adapter_util/pkix/*.o'),
+       Glob(PROJECT_HOME + '/src/common/commonutil/c_cpp/CommonUtil.cpp'),
+       Glob(PROJECT_HOME + '/src/common/commonutil/c_cpp/trace.c'),
+       Glob(PROJECT_HOME + '/src/common/testcase/gtest/IotivitySECTestMain.cpp'),
+       Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscpp/src/helper/*.cpp'),
+       Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscpp/src/btc/*.cpp'),
+       Glob(PROJECT_HOME + '/src/tc/cs/gtest/cscpp/src/stc/*.cpp')
+]
+
+lib_list = Split('boost_system boost_filesystem boost_thread c_common coap connectivity_abstraction dl expat gcov gio-2.0 gobject-2.0 glib-2.0 m logger oc oc_logger octbstack ocpmapi ocprovision ocsrm octbstack pthread rt uuid mbedtls mbedx509 mbedcrypto routingmanager resource_directory')
+CPPDEFINES1 = ['__CLOUD__', 'CA_DBUS_GATT_SERVICE_NAME', 'GLIB_VERSION_2_32', 'GLIB_VERSION_MIN_REQUIRED', 'IP_ADAPTER', 'LE_ADAPTER', 'LINUX ', 'MQ_PUBLISHER', 'MQ_SUBSCRIBER', 'NDEBUG', 'NO_EDR_ADAPTER', 'RD_CLIENT', 'ROUTING_EP', 'SHA2_USE_INTTYPES_H', 'TCP_ADAPTER', 'WITH_BWT', 'WITH_CLOUD', 'WITH_MQ', 'WITH_POSIX', 'WITH_TCP', '_ENABLE_MULTIPLE_OWNER_', '__LINUX__', '__WITH_DTLS__', '__WITH_TLS__', '__linux__']
+CPPFLAGS1 = ['-s', '-pthread', '-march=native', '-pthread', '-fpermissive', '-ftest-coverage', '-fprofile-arcs']
+CXXFLAGS1 = ['-std=c++11']
+
+if TARGET_TEST == None or 'tc' in TARGET_TEST or 'all' in TARGET_TEST:
+
+    target_binary = 'iotivity_cscpp_tlsoff_test'
+    if TLS_MODE == 1:
+        CPPDEFINES1.append(['-D__TLS_ON__'])
+        target_binary = 'iotivity_cscpp_tlson_test'
+
+    cscpp_tc = env_linux.Program(source = TC_SRC_LIST +&