# Contributor: lpzhong <278527840@qq.com>
# Maintainer: lpzhong <278527840@qq.com>
source HPKBUILD > /dev/null 2>&1
logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log
checkprepare() {
if [ ! -f /usr/bin/sed ]
then
ln -s /usr/bin/busybox /usr/bin/sed
fi
return 0
}
openharmonycheck() {
res=0
cd $builddir-$ARCH-build
make check-TESTS -C tests > ${logfile} 2>&1
res=$?
if [ $res -ne 0 ]
then
mkdir -p ${LYCIUM_FAULT_PATH}/${pkgname}
cp tests/test-suite.log ${LYCIUM_FAULT_PATH}/${pkgname}/
fi
cd $OLDPWD
return $res
}