未验证 提交 d8750966 编写于 作者: H huzhiqiang 提交者: GitHub

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

上级 e583a55d
......@@ -47,10 +47,10 @@ function prepare_adb_devices {
device_armv8=emulator-$port_armv8
device_armv7=emulator-$port_armv7
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_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."
exit 1
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册