[WHY] the path of *.cgz file generated by build-pkg script cannot be obtained dring test. So the path of cgz need to be changed.
[HOW]
below is example for openeuler:
/srv/initrd/build-pkg/ => /srv/initrd/build-pkg/initramfs/openeuler/aarch64/20.03/
Signed-off-by: Liu Shaofei liushaofei5@huawei.com --- tests/build-pkg | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/build-pkg b/tests/build-pkg index b10b1497..eca09e64 100755 --- a/tests/build-pkg +++ b/tests/build-pkg @@ -2,6 +2,7 @@ # - os # - os_arch # - os_version +# - os_mount # - pkgbuild_repo # - upstream_repo # - upstream_url @@ -21,10 +22,14 @@ check_vars() [ -n "$os_version" ] || die "os_version is empty" [ -n "$pkgbuild_repo" ] || die "pkgbuild_repo is empty" [ -n "$upstream_commit" ] || die "upstream_commit is empty" + [ -n "$os_mount" ] || die "os_mount is empty" }
mount_dest() { + [[ "$os_mount" = "cifs" ]] && os_mount="nfs" + pack_to=${os_mount}/${os}/${os_arch}/${os_version} + PKG_MNT=/initrd/build-pkg mkdir -p "$PKG_MNT"
@@ -75,7 +80,7 @@ build_source_pkg() sed -i "s|^source=.*|${upstream_source}|g" PKGBUILD }
- cgz_name="$PKG_MNT/${pkgname}/${upstream_commit}.cgz" + cgz_name="$PKG_MNT/${pack_to}/${pkgname}/${upstream_commit}.cgz" PACMAN=true BUILDDIR=$TMP CARCH=$os_arch PKGEXT=.cgz CGZDEST="$cgz_name" \ $LKP_SRC/sbin/makepkg -A --check --config $LKP_SRC/etc/makepkg.conf 2>&1 }