Seperate Android x86 and Armeabi Builds
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 9 Aug 2016 18:33:53 +0000 (11:33 -0700)
committerDave Thaler <dthaler@microsoft.com>
Thu, 15 Sep 2016 19:50:20 +0000 (19:50 +0000)
- Does not change current builds
- Adds ability to run individual android builds in the matrix:
    - x86
    - Armeabi
    - IP Transport
    - Routing Manager
    - Bluetooth
    - Bluetooth Low Energy

Change-Id: I5fa2efc144f28ab74ed9d3e116cfa39d4f6d9d6a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Reviewed-on: https://gerrit.iotivity.org/gerrit/10239
Reviewed-by: Rick Bell <richard.s.bell@intel.com>
Reviewed-by: George Nash <george.nash@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
auto_build.py

index c048dce..49056c2 100644 (file)
@@ -162,6 +162,12 @@ def build_android(flag, extra_option_str):
     build_android_armeabi_with_rm(flag, extra_option_str)
 
 def build_android_x86(flag, extra_option_str):
+    """ Build Android x86 Suite """
+    build_android_x86_with_ip(flag, extra_option_str)
+    build_android_x86_with_bt(flag, extra_option_str)
+    build_android_x86_with_ble(flag, extra_option_str)
+
+def build_android_x86_with_ip(flag, extra_option_str):
     print ("*********** Build for android x86 *************")
     build_options = {
                         'TARGET_OS':'android',
@@ -171,13 +177,33 @@ def build_android_x86(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BT'
+def build_android_x86_with_bt(flag, extra_option_str):
+    print ("*********** Build for android x86 with Bluetooth *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'x86',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BT',
+                    }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BLE'
+def build_android_x86_with_ble(flag, extra_option_str):
+    print ("*********** Build for android x86 with Bluetooth Low Energy *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'x86',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BLE',
+                    }
     call_scons(build_options, extra_option_str)
 
 def build_android_x86_with_rm(flag, extra_option_str):
+    """ Build Android x86 Routing Manager Suite """
+    build_android_x86_with_rm_and_ip(flag, extra_option_str)
+    build_android_x86_with_rm_and_bt(flag, extra_option_str)
+    build_android_x86_with_rm_and_ble(flag, extra_option_str)
+
+def build_android_x86_with_rm_and_ip(flag, extra_option_str):
     print ("*********** Build for android x86 with Routing Manager *************")
     build_options = {
                         'TARGET_OS':'android',
@@ -188,13 +214,35 @@ def build_android_x86_with_rm(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BT'
+def build_android_x86_with_rm_and_bt(flag, extra_option_str):
+    print ("*********** Build for android x86 with Routing Manager and Bluetooth *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'x86',
+                        'ROUTING':'GW',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BT',
+                    }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BLE'
+def build_android_x86_with_rm_and_ble(flag, extra_option_str):
+    print ("*********** Build for android x86 with Routing Manager and Bluetooth Low Energy *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'x86',
+                        'ROUTING':'GW',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BLE',
+                    }
     call_scons(build_options, extra_option_str)
 
 def build_android_armeabi(flag, extra_option_str):
+    """ Build Android Armeabi Suite """
+    build_android_armeabi_with_ip(flag, extra_option_str)
+    build_android_armeabi_with_bt(flag, extra_option_str)
+    build_android_armeabi_with_ble(flag, extra_option_str)
+
+def build_android_armeabi_with_ip(flag, extra_option_str):
     print ("*********** Build for android armeabi *************")
     build_options = {
                         'TARGET_OS':'android',
@@ -204,14 +252,34 @@ def build_android_armeabi(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BT'
+def build_android_armeabi_with_bt(flag, extra_option_str):
+    print ("*********** Build for android armeabi with Bluetooth *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'armeabi',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BT',
+                    }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BLE'
+def build_android_armeabi_with_ble(flag, extra_option_str):
+    print ("*********** Build for android armeabi with Bluetooth Low Energy *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'armeabi',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BLE',
+                    }
     call_scons(build_options, extra_option_str)
 
 def build_android_armeabi_with_rm(flag, extra_option_str):
-    print ("*********** Build for android armeabi with Routing Manager*************")
+    """ Build Android Armeabi Routing Manager Suite """
+    build_android_armeabi_with_rm_and_ip(flag, extra_option_str)
+    build_android_armeabi_with_rm_and_bt(flag, extra_option_str)
+    build_android_armeabi_with_rm_and_ble(flag, extra_option_str)
+
+def build_android_armeabi_with_rm_and_ip(flag, extra_option_str):
+    print ("*********** Build for android armeabi with Routing Manager *************")
     build_options = {
                         'TARGET_OS':'android',
                         'TARGET_ARCH':'armeabi',
@@ -221,10 +289,26 @@ def build_android_armeabi_with_rm(flag, extra_option_str):
                     }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BT'
+def build_android_armeabi_with_rm_and_bt(flag, extra_option_str):
+    print ("*********** Build for android armeabi with Routing Manager and Bluetooth *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'armeabi',
+                        'ROUTING':'GW',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BT',
+                    }
     call_scons(build_options, extra_option_str)
 
-    build_options['TARGET_TRANSPORT'] = 'BLE'
+def build_android_armeabi_with_rm_and_ble(flag, extra_option_str):
+    print ("*********** Build for android armeabi with Routing Manager and Bluetooth Low Energy *************")
+    build_options = {
+                        'TARGET_OS':'android',
+                        'TARGET_ARCH':'armeabi',
+                        'ROUTING':'GW',
+                        'RELEASE':flag,
+                        'TARGET_TRANSPORT':'BLE',
+                    }
     call_scons(build_options, extra_option_str)
 
 def build_arduino(flag, extra_option_str):
@@ -463,12 +547,60 @@ elif arg_num == 2:
         build_android_x86_with_rm("true", "")
         build_android_x86_with_rm("false", "")
 
+    elif str(sys.argv[1]) == "android_x86_with_ip":
+        build_android_x86_with_ip("true", "")
+        build_android_x86_with_ip("false", "")
+
+    elif str(sys.argv[1]) == "android_x86_with_bt":
+        build_android_x86_with_bt("true", "")
+        build_android_x86_with_bt("false", "")
+
+    elif str(sys.argv[1]) == "android_x86_with_ble":
+        build_android_x86_with_ble("true", "")
+        build_android_x86_with_ble("false", "")
+
+    elif str(sys.argv[1]) == "android_x86_with_rm_and_ip":
+        build_android_x86_with_rm_and_ip("true", "")
+        build_android_x86_with_rm_and_ip("false", "")
+
+    elif str(sys.argv[1]) == "android_x86_with_rm_and_bt":
+        build_android_x86_with_rm_and_bt("true", "")
+        build_android_x86_with_rm_and_bt("false", "")
+
+    elif str(sys.argv[1]) == "android_x86_with_rm_and_ble":
+        build_android_x86_with_rm_and_ble("true", "")
+        build_android_x86_with_rm_and_ble("false", "")
+
     elif str(sys.argv[1]) == "android_armeabi":
         build_android_armeabi("true", "")
         build_android_armeabi("false", "")
         build_android_armeabi_with_rm("true", "")
         build_android_armeabi_with_rm("false", "")
 
+    elif str(sys.argv[1]) == "android_armeabi_with_ip":
+        build_android_armeabi_with_ip("true", "")
+        build_android_armeabi_with_ip("false", "")
+
+    elif str(sys.argv[1]) == "android_armeabi_with_bt":
+        build_android_armeabi_with_bt("true", "")
+        build_android_armeabi_with_bt("false", "")
+
+    elif str(sys.argv[1]) == "android_armeabi_with_ble":
+        build_android_armeabi_with_ble("true", "")
+        build_android_armeabi_with_ble("false", "")
+
+    elif str(sys.argv[1]) == "android_armeabi_with_rm_and_ip":
+        build_android_armeabi_with_rm_and_ip("true", "")
+        build_android_armeabi_with_rm_and_ip("false", "")
+
+    elif str(sys.argv[1]) == "android_armeabi_with_rm_and_bt":
+        build_android_armeabi_with_rm_and_bt("true", "")
+        build_android_armeabi_with_rm_and_bt("false", "")
+
+    elif str(sys.argv[1]) == "android_armeabi_with_rm_and_ble":
+        build_android_armeabi_with_rm_and_ble("true", "")
+        build_android_armeabi_with_rm_and_ble("false", "")
+
     elif str(sys.argv[1]) == "arduino":
         build_arduino("true", "")
         build_arduino("false", "")