Enabled Jenkins build check for Tizen CA
authorAbhishek Pandey <abhi.siso@samsung.com>
Thu, 16 Jul 2015 14:51:05 +0000 (20:21 +0530)
committerErich Keane <erich.keane@intel.com>
Fri, 17 Jul 2015 14:44:41 +0000 (14:44 +0000)
- Added Tizen scons for CA libs and sample for IP transport
  in auto build.
- Both secured and non secured build is added.
- Updated  Tizen build script to return error on failure.
- Updated auto_build help menu as well.

Change-Id: I5766b37cd2263068eff050127178d80eb2340308
Signed-off-by: Abhishek Pandey <abhi.siso@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1697
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Erich Keane <erich.keane@intel.com>
auto_build.sh
resource/csdk/connectivity/build/How_To_Build.txt
resource/csdk/connectivity/build/tizen/gbsbuild.sh

index 19c3440..3b73da1 100755 (executable)
@@ -8,6 +8,7 @@ function clean()
 {
        echo "*********** Clean build *************"
        scons -c
+       scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen -c
        rm -rf out
 }
 
@@ -46,6 +47,11 @@ function build()
        scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=ETH RELEASE=$3
        scons resource TARGET_OS=arduino UPLOAD=false BOARD=arduino_due_x TARGET_ARCH=arm TARGET_TRANSPORT=IP SHIELD=WIFI RELEASE=$3
 
+       echo "*********** Build for Tizen CA lib and sample *************"
+       scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true RELEASE=$3
+
+       echo "*********** Build for Tizen CA lib and sample with Security *************"
+       scons -f resource/csdk/connectivity/build/tizen/SConscript TARGET_OS=tizen TARGET_TRANSPORT=IP LOGGING=true SECURED=1 RELEASE=$3
 
        if [ $(uname -s) = "Darwin" ]
        then
@@ -73,7 +79,7 @@ function  help()
 {
        echo "Usage:"
         echo "  build:"
-        echo "     `basename $0` <path-to-android-ndk>"
+        echo "     `basename $0` <path-to-android-ndk> <path-to-arduino-sdk>"
         echo "  clean:"
         echo "     `basename $0` -c"
 }
index 2725deb..dcacc9a 100644 (file)
@@ -62,6 +62,8 @@ Note :- Upon successful execution of above command(s) CA library will be generat
 Tizen Build:
 
 1) If you are building first time, then delete GBS-ROOT folder from home directory.
+   Note: Default build server URL for Tizen is set in gbs configuration file @ iotivity/tools/tizen/.gbs.conf.
+         If need be, same can be modified as per appropriate target.
 
 2) Go to "iotivity/" folder.
 
index 48743d9..15a5b21 100755 (executable)
@@ -25,7 +25,6 @@ export RELEASE=$4
 echo $5
 export LOGGING=$5
 
-
 echo $TARGET_TRANSPORT
 echo $BUILD_SAMPLE
 
@@ -55,9 +54,14 @@ cp -R ./extlibs/tinydtls/ $sourcedir/tmp/con/extlibs/
 mkdir -p $sourcedir/tmp/con/c_common
 cp -R ./resource/c_common/* $sourcedir/tmp/con/c_common/
 
+# copy dependency RPMs and conf files for tizen build
+cp ./tools/tizen/*.rpm $sourcedir/tmp
+cp ./tools/tizen/*.rpm $sourcedir/tmp/con/sample
+cp ./tools/tizen/.gbs.conf ./tmp
+cp ./tools/tizen/.gbs.conf ./tmp/con/sample
+
 cd $sourcedir
 cd $cur_dir/build/tizen
-
 cp -R ./* $sourcedir/tmp/
 rm -f $sourcedir/tmp/SConscript
 cp SConstruct $sourcedir/tmp/
@@ -83,15 +87,15 @@ if [ ! -d .git ]; then
 fi
 
 echo "Calling core gbs build command"
-gbscommand="gbs build -A armv7l --include-all --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5' --repository ./"
+gbscommand="gbs build -A armv7l --include-all  --repository ./ --define 'TARGET_TRANSPORT $1' --define 'SECURED $2' --define 'RELEASE $4' --define 'LOGGING $5'"
 echo $gbscommand
 if eval $gbscommand; then
    echo "Core build is successful"
 else
-   echo "Core build failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
+   echo "Core build failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
    cd $sourcedir
    rm -rf $sourcedir/tmp
-   exit
+   exit 1
 fi
 
 if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
@@ -111,13 +115,14 @@ if echo $BUILD_SAMPLE|grep -qi '^ON$'; then
    if eval $gbscommand; then
       echo "Sample build is successful"
    else
-      echo "Sample build is failed. Try 'sudo find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
+      echo "Sample build is failed. Try 'find . -type f -exec dos2unix {} \;' in the 'connectivity/' folder"
+      exit 1
    fi
 else
        echo "Sample build is not enabled"
 fi
 
-
 cd $sourcedir
 rm -rf $sourcedir/tmp
 
+exit 0