android重覆開機reboot測試 讀Linux Kernel LOG

Linux android重覆開機測試:
簡單的shell script可以去讀LOG,
如果沒有讀到xxxx
就會跳出迴圈 判定fail

#!/bin/sh
#sleep 20
i=1
a=adb shell dmesg | grep "xxxx"
while [ “$a” != “” ]
do
echo “Test $i times , Cold boot test”
adb shell reboot
i=$(($i+1))
sleep 40
a=adb shell dmesg | grep "xxxx"
done
echo “Cold boot test fail~”

發表迴響

Copy Protected by Chetan's WP-Copyprotect.