testing-script/rtc-script/rtc-script.sh
2025-04-15 14:12:57 +08:00

37 lines
666 B
Bash
Executable File

#/bin/bash
RET=0
sleep 2
echo " "
echo " "
echo " "
echo "######################################################################################"
echo "############################### BPI-RV2 RTC Testing Start ##########################"
date -s 2028-08-08
hwclock -w
date -s 2021-01-01
line=`hwclock -r | grep "2028-08-08" | wc -l`
if [ $line -eq 1 ]; then
echo " "
echo "### BPI-RV2 RTC can work fine ### "
echo " "
else
echo " "
echo "Error Notice: BPI-RV2 RTC can not work fine."
echo " "
RET=1
fi
echo "######################################################################################"
echo " "
echo " "
echo " "
sleep 2
return ${RET}