提交 ead74728 编写于 作者: H huzhiqiang 提交者: GitHub

modify ci_build.sh to ensure the num of adb devices on mac ci (#2597)

上级 06e754c9
...@@ -47,10 +47,10 @@ function prepare_adb_devices { ...@@ -47,10 +47,10 @@ function prepare_adb_devices {
device_armv8=emulator-$port_armv8 device_armv8=emulator-$port_armv8
device_armv7=emulator-$port_armv7 device_armv7=emulator-$port_armv7
else else
adb_devices_num=($(adb devices |grep -v devices |grep device | awk -F " " '{print $1}')) adb_devices=($(adb devices |grep -v devices |grep device | awk -F " " '{print $1}'))
# adbindex is the env variable registered in ci agent to tell which mobile is to used as adb # adbindex is the env variable registered in ci agent to tell which mobile is to used as adb
adbindex_pos=`expr ${adbindex} + 1` adbindex_pos=`expr ${adbindex} + 1`
if [ ${adbindex_pos} -gt ${adb_devices_num} ]; then if [ ${adbindex_pos} -gt ${#adb_devices[@]} ]; then
echo -e "Error: the adb devices on ci agent are not enough, at least ${adbindex_pos} adb devices are needed." echo -e "Error: the adb devices on ci agent are not enough, at least ${adbindex_pos} adb devices are needed."
exit 1 exit 1
fi fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册