From 0a3b83222bfff7e44ecb60c89ce682a58a0ee762 Mon Sep 17 00:00:00 2001 From: Trevor Bramwell Date: Tue, 9 Aug 2016 11:33:53 -0700 Subject: [PATCH] Seperate Android x86 and Armeabi Builds - 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 Reviewed-on: https://gerrit.iotivity.org/gerrit/10239 Reviewed-by: Rick Bell Reviewed-by: George Nash Tested-by: jenkins-iotivity Reviewed-by: Dave Thaler --- auto_build.py | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 141 insertions(+), 9 deletions(-) diff --git a/auto_build.py b/auto_build.py index c048dce..49056c2 100644 --- a/auto_build.py +++ b/auto_build.py @@ -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", "") -- 2.7.4