提交 0f0ea7f9 编写于 作者: H huzhiqiang 提交者: xiebaiyuan

modify the test of adb deveices num test=develop (#2596)

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