Commit a9964053 authored by Mushfiqul Islam Antu's avatar Mushfiqul Islam Antu Committed by Mushfiqul Islam

Merge test folder of test branch

This patch enables all test activities and commits to be
maintained from master branch, instead of test branch.

Change-Id: I2d9123dbd605f0e91eb6d91282057de8735b20a7
Signed-off-by: default avatarMushfiqul Islam Antu <i.mushfiq@samsung.com>
parent d0a9a6c5
<?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>
https://wiki.iotivity.org/iut_simulator_guide
'''
/******************************************************************
*
* 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)
#!/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
#!/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
'''
/******************************************************************
*
* 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,