tizen: Also build without security all configs 55/19955/12
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Wed, 17 May 2017 10:33:49 +0000 (12:33 +0200)
committerC.J. Collier <cjcollier@linuxfoundation.org>
Wed, 14 Jun 2017 17:14:18 +0000 (17:14 +0000)
Introduce tizen_{secured,unsecured} for jenkins
For smooth transition tizen builder is preserved.

Also use bash for advanced tests (to parse options args)

Bug: https://jira.iotivity.org/browse/IOT-2237
Change-Id: Ib0a648b889d7d9956d6b26a9dc2111e7b9623b02
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19955
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: C.J. Collier <cjcollier@linuxfoundation.org>
auto_build.py

index 7b77114..c46db40 100644 (file)
@@ -383,14 +383,14 @@ def build_arduino(flag, extra_option_str):
     # BLE support for the Arduino Due is currently unavailable.
 
 def build_tizen(flag, extra_option_str):
-    print ("*********** Build for Tizen *************")
-    cmd_line = "/bin/sh " + os.getcwd() + "/gbsbuild.sh"
+    print ("*********** Build for Tizen with options *************")
+    cmd_line = os.getcwd() + "/gbsbuild.sh" + " " + extra_option_str
     print ("Running : " + cmd_line)
     exit_code = subprocess.Popen([cmd_line], shell=True).wait()
     if exit_code != 0:
         exit(exit_code)
 
-    print ("*********** Build for Tizen octbstack lib and sample with security *************")
+    print ("*********** Build for Tizen octbstack lib and sample *************")
     build_extra_options = "-f resource/csdk/stack/samples/tizen/build/SConscript " + extra_option_str
     build_options = {
                         'TARGET_OS':'tizen',
@@ -400,10 +400,6 @@ def build_tizen(flag, extra_option_str):
                     }
     call_scons(build_options, build_extra_options)
 
-    print ("*********** Build for Tizen octbstack lib and sample *************")
-    build_options['SECURED'] = 0
-    call_scons(build_options, build_extra_options)
-
     print ("*********** Build for Tizen octbstack lib and sample with Routing Manager*************")
     build_options['ROUTING'] = 'GW'
     call_scons(build_options, build_extra_options)
@@ -414,6 +410,12 @@ def build_tizen(flag, extra_option_str):
     build_extra_options = "-f service/easy-setup/sampleapp/enrollee/tizen-sdb/EnrolleeSample/build/tizen/SConscript " + extra_option_str
     call_scons(build_options, build_extra_options)
 
+def build_tizen_secured(flag, extra_option_str):
+    build_tizen(flag, extra_option_str + " SECURED=1")
+
+def build_tizen_unsecured(flag, extra_option_str):
+    build_tizen(flag, extra_option_str + " SECURED=0")
+
 # Mac OS and iOS
 def build_darwin(flag, extra_option_str):
     print ("*********** Build for OSX *************")
@@ -673,6 +675,14 @@ elif arg_num == 2:
         build_tizen("true", "")
         build_tizen("false", "")
 
+    elif str(sys.argv[1]) == "tizen_unsecured":
+        build_tizen_unsecured("true", "")
+        build_tizen_unsecured("false", "")
+
+    elif str(sys.argv[1]) == "tizen_secured":
+        build_tizen_secured("true", "")
+        build_tizen_secured("false", "")
+
     elif str(sys.argv[1]) == "simulator":
         build_simulator("true", "")
         build_simulator("false", "")