build: Also support android_unsecured 15/21215/4
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Mon, 3 Jul 2017 10:16:21 +0000 (12:16 +0200)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Tue, 11 Jul 2017 02:32:43 +0000 (02:32 +0000)
Bug: https://jira.iotivity.org/browse/IOT-2238
Change-Id: I1163c6afcbf656ba4a71f64bb540835641108005
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21215
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
auto_build.py

index 78cf6b1..27c86aa 100755 (executable)
@@ -12,7 +12,8 @@ def helpmsg(script):
 Usage:
     build:
         python %s <targetbuild>
-        Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd, android, arduino, tizen, tizen_unsecured, tizen_secured, simulator, darwin, windows, msys
+        Allowed values for <target_build>: all, linux_unsecured, linux_secured, linux_unsecured_with_ra, linux_secured_with_ra, linux_unsecured_with_rd, linux_secured_with_rd,
+        android, android_unsecured, android_secured, arduino, tizen, tizen_unsecured, tizen_secured, simulator, darwin, windows, msys
         Note: \"linux\" will build \"linux_unsecured\", \"linux_secured\", \"linux_unsecured_with_ra\", \"linux_secured_with_ra\", \"linux_secured_with_rd\", \"linux_unsecured_with_mq\", \"linux_secured_with_tcp\" & \"linux_unsecured_with_tcp\" & \"linux_unsecured_with_rd\".
         Any selection will build both debug and release versions of all available targets in the scope you've selected.
         To choose any specific command, please use the SCons commandline directly. Please refer to [IOTIVITY_REPO]/Readme.scons.txt.
@@ -60,7 +61,8 @@ def build_all(flag, extra_option_str):
         build_linux_secured_with_java(flag, extra_option_str)
         build_simulator(flag, extra_option_str)
 
-        build_android(flag, extra_option_str)
+        build_android_unsecured(flag, extra_option_str)
+        build_android_secured(flag, extra_option_str)
         build_arduino(flag, extra_option_str)
         build_tizen(flag, extra_option_str)
 
@@ -202,6 +204,12 @@ def build_android(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
+def build_android_secured(flag, extra_option_str):
+    build_android(flag, extra_option_str + " SECURED=1")
+
+def build_android_unsecured(flag, extra_option_str):
+    build_android(flag, extra_option_str + " SECURED=0")
+
 def build_android_x86(flag, extra_option_str):
     """ Build Android x86 Suite """
     build_android_x86_with_ip(flag, extra_option_str)
@@ -611,6 +619,14 @@ elif arg_num == 2:
         build_android("true", "")
         build_android("false", "")
 
+    elif str(sys.argv[1]) == "android_unsecured":
+        build_android_unsecured("true", "")
+        build_android_unsecured("false", "")
+
+    elif str(sys.argv[1]) == "android_secured":
+        build_android_secured("true", "")
+        build_android_secured("false", "")
+
     elif str(sys.argv[1]) == "android_x86":
         build_android_x86("true", "")
         build_android_x86("false", "")