[zorg] r307006 - [sanitizer] Prepare Android test for parallel execution
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 01:28:52 PDT 2017
Author: vitalybuka
Date: Mon Jul 3 01:28:52 2017
New Revision: 307006
URL: http://llvm.org/viewvc/llvm-project?rev=307006&view=rev
Log:
[sanitizer] Prepare Android test for parallel execution
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh?rev=307006&r1=307005&r2=307006&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh Mon Jul 3 01:28:52 2017
@@ -73,11 +73,6 @@ build_android aarch64
build_android arm
build_android i686
-restart_adb_server
-
-test_android i686 x86
-test_android aarch64 arm64-v8a
# Testing armv7 instead of plain arm to work around
# https://code.google.com/p/android/issues/detail?id=68779
-test_android arm armeabi-v7a
-
+test_android i686:x86 aarch64:arm64-v8a arm:armeabi-v7a
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh?rev=307006&r1=307005&r2=307006&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh Mon Jul 3 01:28:52 2017
@@ -113,27 +113,38 @@ function restart_adb_server {
}
function test_android {
- local _arch=$1
- local _abi=$2
+ restart_adb_server
+
+ declare -A tested
+ for _arg in "$@"; do
+ tested["$_arg"]=0
+ done
+
ADB=adb
- echo @@@BUILD_STEP find device for android/$_arch@@@
+ echo @@@BUILD_STEP find devices@@@
ANDROID_DEVICES=$(${ADB} devices | grep 'device$' | awk '{print $1}')
- local FOUND=0
+
for SERIAL in $ANDROID_DEVICES; do
ABILIST=$(${ADB} -s $SERIAL shell getprop ro.product.cpu.abilist)
patch_abilist $ABILIST ABILIST
- if [[ $ABILIST == *"$_abi"* ]]; then
- BUILD_ID=$(${ADB} -s $SERIAL shell getprop ro.build.id | tr -d '\r')
- BUILD_FLAVOR=$(${ADB} -s $SERIAL shell getprop ro.build.flavor | tr -d '\r')
- test_android_on_device "$_arch" "$SERIAL" "$BUILD_ID" "$BUILD_FLAVOR"
- FOUND=1
- fi
+ for _arg in "$@"; do
+ local _arch=${_arg%:*}
+ local _abi=${_arg#*:}
+ if [[ $ABILIST == *"$_abi"* ]]; then
+ BUILD_ID=$(${ADB} -s $SERIAL shell getprop ro.build.id | tr -d '\r')
+ BUILD_FLAVOR=$(${ADB} -s $SERIAL shell getprop ro.build.flavor | tr -d '\r')
+ test_android_on_device "$_arch" "$SERIAL" "$BUILD_ID" "$BUILD_FLAVOR"
+ tested["$_arg"]=1
+ fi
+ done
done
- if [[ $FOUND != "1" ]]; then
- echo @@@BUILD_STEP unavailable device android/$_arch@@@
- echo @@@STEP_WARNINGS@@@
- fi
+ for _arg in "$@"; do
+ if [[ ${tested["$_arg"]} != 1 ]]; then
+ echo @@@BUILD_STEP unavailable device android/$_arg@@@
+ echo @@@STEP_WARNINGS@@@
+ fi
+ done
}
function run_command_on_device {
More information about the llvm-commits
mailing list