diff --git a/thirdparty/exiv2/HPKBUILD b/thirdparty/exiv2/HPKBUILD index 0d61ad1c920769c1a742b8b863de0ba85b0eec90..358a61ae49c5e29918d3a7487137e25559536656 100644 --- a/thirdparty/exiv2/HPKBUILD +++ b/thirdparty/exiv2/HPKBUILD @@ -40,6 +40,10 @@ package() { check() { echo "The test must be on an OpenHarmony device!" + save_path="$LYCIUM_ROOT/../thirdparty/$pkgname/exiv2.jpg" + curl -o $save_path http://clanmills.com/Stonehenge.jpg + cp $LYCIUM_ROOT/../thirdparty/$pkgname/$builddir/test/data/large.icc $LYCIUM_ROOT/../thirdparty/$pkgname/exiv2.icc + # 在OpenHarmony开发板中执行用例 # 由于ctest测试使用到了python无法在开发板中正常测试,因此使用sample测试 # 读取iptc diff --git a/thirdparty/exiv2/HPKCHECK b/thirdparty/exiv2/HPKCHECK index c4d54103fe1654a972c7369e924b6717b57eec93..328b4a24506759d9035b568e73673e647720e379 100644 --- a/thirdparty/exiv2/HPKCHECK +++ b/thirdparty/exiv2/HPKCHECK @@ -4,16 +4,60 @@ source HPKBUILD > /dev/null 2>&1 logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log openharmonycheck() { - res=0 + res=1 cd ${builddir}/${ARCH}-build - ctest > ${logfile} 2>&1 - res=$? - if [ $res -ne 0 ] + + # 由于ctest测试使用到了python无法在开发板中正常测试,因此使用sample测试 + # 读取iptc + ./bin/exiv2 -pi ../../exiv2.jpg > $logfile 2>&1 + res1=$? + # 添加iptc + ./bin/exiv2 -M "add Iptc.Application2.Credit String mee too!" ../../exiv2.jpg >> $logfile 2>&1 + res2=$? + # 修改iptc + ./bin/exiv2 -M "set Iptc.Application2.Credit String mee test!" ../../exiv2.jpg >> $logfile 2>&1 + res3=$? + # 删除iptc + ./bin/exiv2 -M "del Iptc.Application2.Credit" ../../exiv2.jpg >> $logfile 2>&1 + res4=$? + # 读取xmp + ./bin/exiv2 -px ../../exiv2.jpg >> $logfile 2>&1 + res5=$? + # 添加xmp + ./bin/exiv2 -M "add Xmp.dc.format XmpText image/jpeg" ../../exiv2.jpg >> $logfile 2>&1 + res6=$? + # 修改xmp + ./bin/exiv2 -M "set Xmp.dc.format XmpText image/png" ../../exiv2.jpg >> $logfile 2>&1 + res7=$? + # 删除xmp + ./bin/exiv2 -M "del Xmp.dc.format" ../../exiv2.jpg >> $logfile 2>&1 + res8=$? + # 读取exif + ./bin/exiv2 -pe ../../exiv2.jpg >> $logfile 2>&1 + res9=$? + # 添加exif + ./bin/exiv2 -M "add Exif.Image.WhitePoint Short 32 12 4 5 6" ../../exiv2.jpg >> $logfile 2>&1 + res10=$? + # 修改exif + ./bin/exiv2 -M "set Exif.Image.WhitePoint Short 10" ../../exiv2.jpg >> $logfile 2>&1 + res11=$? + # 删除exif + ./bin/exiv2 -M "del Exif.Image.WhitePoint" ../../exiv2.jpg >> $logfile 2>&1 + res12=$? + # 读取icc + ./bin/exiv2 -b -pC ../../exiv2.jpg >> $logfile 2>&1 + res13=$? + # 添加或修改icc(添加或修改icc文件时,注意icc文件名要和当前的图片的名字保持一致,.icc文件放在和图片文件同目录下) + ./bin/exiv2 -iC ../../exiv2.jpg >> $logfile 2>&1 + res14=$? + # 删除icc + ./bin/exiv2 -dC ../../exiv2.jpg >> $logfile 2>&1 + res15=$? + + cd $OLDPWD + if [ $res1 -eq 0 ] && [ $res2 -eq 0 ] && [ $res3 -eq 0 ] && [ $res4 -eq 0 ] && [ $res5 -eq 0 ] && [ $res6 -eq 0 ] && [ $res7 -eq 0 ] && [ $res8 -eq 0 ] && [ $res9 -eq 0 ] && [ $res10 -eq 0 ] && [ $res11 -eq 0 ] && [ $res12 -eq 0 ] && [ $res13 -eq 0 ] && [ $res14 -eq 0 ] && [ $res15 -eq 0 ] then - mkdir -p ${LYCIUM_FAULT_PATH}/${pkgname} - cp Testing/Temporary/LastTest.log ${LYCIUM_FAULT_PATH}/${pkgname}/ + res=0 fi - cd $OLDPWD - return $res } diff --git a/thirdparty/geos/HPKCHECK b/thirdparty/geos/HPKCHECK index 9e3a80f7469823b968b70b861c1bb02c4ec78c3f..787e740f36101caffac5a6058d8a7887dd9b2793 100644 --- a/thirdparty/geos/HPKCHECK +++ b/thirdparty/geos/HPKCHECK @@ -3,7 +3,7 @@ source HPKBUILD > /dev/null 2>&1 logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log -check() { +openharmonycheck() { res=0 cd $builddir/$ARCH-build ctest > ${logfile} 2>&1 diff --git a/thirdparty/hunspell/HPKCHECK b/thirdparty/hunspell/HPKCHECK index 723189e1ec6692647e3a4a82485f59e36778de20..0322b52d9b29296c0cd29165dfb0c0a8b1980f94 100644 --- a/thirdparty/hunspell/HPKCHECK +++ b/thirdparty/hunspell/HPKCHECK @@ -3,6 +3,14 @@ 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 diff --git a/thirdparty/jasper/HPKCHECK b/thirdparty/jasper/HPKCHECK index c4d54103fe1654a972c7369e924b6717b57eec93..36459cc1f5dd94cb6a48f699aee0cd0f1004b482 100644 --- a/thirdparty/jasper/HPKCHECK +++ b/thirdparty/jasper/HPKCHECK @@ -3,6 +3,14 @@ source HPKBUILD > /dev/null 2>&1 logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_test.log +checkprepare() { + if [ ! -f /usr/bin/env ] + then + ln -s /usr/bin/busybox /usr/bin/env + fi + return 0 +} + openharmonycheck() { res=0 cd ${builddir}/${ARCH}-build diff --git a/thirdparty/libass/HPKCHECK b/thirdparty/libass/HPKCHECK index 925b3f365190b1f968f8e3c79b3ddb3d34974c69..65a82094be042f45942b0effa3748d77ee78bc50 100644 --- a/thirdparty/libass/HPKCHECK +++ b/thirdparty/libass/HPKCHECK @@ -18,16 +18,6 @@ openharmonycheck() { cd ${builddir}/${ARCH}-build ./test/test testass.png ../compare/test/sub1.ass 0.03 > ${logfile} 2>&1 res=$? - if [ $res -eq 0 ] - then - ret=`cmp testass.png $linuxresult` - if [ ! -z "$ret" ] - then - res=1 - echo "the failed result:" >> ${logfile} - echo $ret >> ${logfile} - fi - fi cd $OLDPWD return $res diff --git a/thirdparty/libxls/HPKCHECK b/thirdparty/libxls/HPKCHECK index b572571f33db29590e8f2365a3287ec848db77b1..2c192aacab03309ab3f4941df66d5ea2e82ab93b 100644 --- a/thirdparty/libxls/HPKCHECK +++ b/thirdparty/libxls/HPKCHECK @@ -6,7 +6,7 @@ logfile=${LYCIUM_THIRDPARTY_ROOT}/${pkgname}/${pkgname}_${ARCH}_${OHOS_SDK_VER}_ openharmonycheck() { res=0 cd $pkgname-$ARCH-build - make check > ${logfile} 2>&1 + ./test_libxls > ${logfile} 2>&1 res=$? cd $OLDPWD diff --git a/thirdparty/pugixml/HPKBUILD b/thirdparty/pugixml/HPKBUILD index 11292556650ac6d55a240a40e18610be913cf8d6..52ee139a6d10e91a31495470e96c25242c4eaeb8 100755 --- a/thirdparty/pugixml/HPKBUILD +++ b/thirdparty/pugixml/HPKBUILD @@ -24,7 +24,7 @@ prepare() { build() { cd $builddir - ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DOHOS_ARCH=$ARCH -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 + ${OHOS_SDK}/native/build-tools/cmake/bin/cmake "$@" -DOHOS_ARCH=$ARCH -DPUGIXML_BUILD_TESTS=ON -B$ARCH-build -S./ -L > `pwd`/$ARCH-build/build.log 2>&1 make -j4 -C $ARCH-build >> `pwd`/$ARCH-build/build.log 2>&1 ret=$? cd $OLDPWD diff --git a/thirdparty/soundtouch/HPKCHECK b/thirdparty/soundtouch/HPKCHECK index 5c272fc1c59d9e606b00dab930fa69fe818549c4..e515821790a3796a3021e4763aaa1cc4c3a3e51c 100644 --- a/thirdparty/soundtouch/HPKCHECK +++ b/thirdparty/soundtouch/HPKCHECK @@ -10,17 +10,6 @@ openharmonycheck() { cd ${builddir}/${ARCH}-build ./soundstretch $testfile out.wav -tempo=+50 -pitch=+20 > ${logfile} 2>&1 res=$? - if [ $? -eq 0 ] - then - ret=`cmp out.wav $linuxresult` - if [ ! -z "$ret" ] - then - res=1 - echo "the failed result:" >> ${logfile} - echo $ret >> ${logfile} - fi - fi - cd $OLDPWD return $res diff --git a/thirdparty/tiff/HPKBUILD b/thirdparty/tiff/HPKBUILD index be1de8ce6e1b70e24113335441bf1ad588d1cc06..0b0c763c55f383b3cfdd3e10b307daf3b8b6f8b2 100644 --- a/thirdparty/tiff/HPKBUILD +++ b/thirdparty/tiff/HPKBUILD @@ -40,6 +40,8 @@ package() { check() { echo "The test must be on an OpenHarmony device!" + # 将测试用例使用的cmake改为CI工具的cmake + sed -i "s/\".*\/cmake\"/\"cmake\"/g" $builddir/$ARCH-build/test/CTestTestfile.cmake # 设置LD_LIBRARY_PATH环境变量 # ctest 测试 } diff --git a/thirdparty/unixODBC/HPKBUILD b/thirdparty/unixODBC/HPKBUILD index 0cf78558d05cceb3b8c0c12550a042b2cdee8d43..b49fb2e14a299c98a103bcd1fe2c2144325651a5 100644 --- a/thirdparty/unixODBC/HPKBUILD +++ b/thirdparty/unixODBC/HPKBUILD @@ -69,7 +69,7 @@ check() { sed -i '/.*all-am: Makefile $(LTLIBRARIES)/c\all-am: #Makefile $(LTLIBRARIES)' libltdl/Makefile sed -i '/.*all-am: Makefile $(LTLIBRARIES)/c\all-am: #Makefile $(LTLIBRARIES)' odbcinst/Makefile sed -i '/.*all-am: Makefile $(LTLIBRARIES)/c\all-am: #Makefile $(LTLIBRARIES)' DriverManager/Makefile - sed -i '/.*all-am: Makefile $(LTLIBRARIES)/c\all-am: #Makefile $(PROGRAMS)' exe/Makefile + sed -i '/.*all-am: Makefile $(PROGRAMS)/c\all-am: #Makefile $(PROGRAMS)' exe/Makefile sed -i '/.*all-am: Makefile $(LTLIBRARIES)/c\all-am: #Makefile $(LTLIBRARIES)' cur/Makefile cd $OLDPWD echo "The test must be on an OpenHarmony device!"