On Fri, Nov 27, 2020 at 10:36:49AM +0800, Wang Yong wrote:
docker can not use mount operation, so now use curl to upload cci-depends/cci-makepkg cgz file
no use curl => no need to use curl
Thanks, Xijian
Signed-off-by: Wang Yong wangyong0117@qq.com
distro/common | 10 ++++++++++ tests/cci-depends | 9 +++++++-- tests/cci-makepkg | 18 ++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/distro/common b/distro/common index b48dfe5f1..cdb531403 100755 --- a/distro/common +++ b/distro/common @@ -81,3 +81,13 @@ share_debian_package()
exit 0 }
+upload_to_target_dir() +{
- . $LKP_SRC/lib/upload.sh
- local dir="$1"
- local file="$(ls -F ${dir} | grep -v "@")"
- upload_one_curl "${dir}/${file}" "${dir}" >/dev/null
+} diff --git a/tests/cci-depends b/tests/cci-depends index d5c21541d..ffa585b8c 100755 --- a/tests/cci-depends +++ b/tests/cci-depends @@ -29,8 +29,10 @@ pack_arch=$os_arch
. $LKP_SRC/distro/$DISTRO
-is_mount_point ${DEPS_MNT} && umount ${DEPS_MNT} -mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr,port=446 //$LKP_SERVER$DEPS_MNT $DEPS_MNT || die "Failed to run mount" +is_docker || {
- is_mount_point ${DEPS_MNT} && umount ${DEPS_MNT}
- mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr,port=446 //$LKP_SERVER$DEPS_MNT $DEPS_MNT || die "Failed to run mount"
+}
umask 002
@@ -59,3 +61,6 @@ fixup_preinstall fixup_arch_install $pack_arch
pack_benchmark_deps
+is_docker || exit 0 +upload_to_target_dir ${pack_to} diff --git a/tests/cci-makepkg b/tests/cci-makepkg index d08f23718..a7a990a59 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -34,11 +34,17 @@ pack_to=${os_mount}/${os}/${os_arch}/${os_version}/${benchmark}
cd $LKP_SRC/pkg/$benchmark || die "pkg is empty"
-[ -n "$LKP_SERVER" ] && {
- is_mount_point ${PKG_MNT} && umount ${PKG_MNT}
- mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr,port=446 //$LKP_SERVER$PKG_MNT $PKG_MNT || die "Failed to run mount"
+mount_pkg_mnt() +{
is_mount_point ${PKG_MNT} && umount ${PKG_MNT}
mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr,port=446 //$LKP_SERVER$PKG_MNT $PKG_MNT || die "Failed to run mount"
+}
+is_docker || {
[ -n "$LKP_SERVER" ] && mount_pkg_mnt
}
curl_pkgfile() { curl -sS -H 'Content-Type: Application/json' -XPOST "$LKP_SERVER"':8100/git_command' \ @@ -140,7 +146,11 @@ build_source_pkg()
PACMAN=true BUILDDIR=$TMP CARCH=$arch PKGEXT=.cgz CGZDEST="$sync_dest/$cgz_name" $makepkg
- [ "$?" == 0 ] && update_softlink
- [ "$?" == 0 ] || exit 1
- update_softlink
- is_docker || exit 0
- upload_to_target_dir ${sync_dest}
}
build_source_pkg
2.23.0