[Why] Support more version's PKGBUILD.
[How] Download the required file through remote-git
Signed-off-by: Lin Jiaxin ljx.joe@qq.com --- tests/cci-makepkg | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 9551ebfe..1faa1e9f 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -37,6 +37,23 @@ cd $LKP_SRC/pkg/$benchmark || die "pkg is empty" mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr //$LKP_SERVER$PKG_MNT $PKG_MNT || die "Failed to run mount" }
+get_pkgfile() +{ + curl -sS -H 'Content-Type: Application/json' -XPOST "$LKP_SERVER"':8100/git_command' \ + -d '{"git_repo": "'$1'", "git_command": ["git-show", "HEAD:'$2'"]}' -o "$2" +} + +check_pkgfile() +{ + PKGBUILD_TAG="-$PKGBUILD_TAG" + PKGBUILD_TAG_FILE="PKGBUILD$PKGBUILD_TAG" + + get_pkgfile "pkg/$benchmark" "$PKGBUILD_TAG_FILE" + + [ -f "$PKGBUILD_TAG_FILE" ] || die "$PKGBUILD_TAG_FILE not exist" + [ -s "$PKGBUILD_TAG_FILE" ] || die "$PKGBUILD_TAG_FILE is empty" +} + get_pkg_info() { var=$1 @@ -69,6 +86,8 @@ update_shared_pkg() echo "update shared pkg link ${benchmark}.cgz -> ${bm_name}/${cgz_name}" }
+[ -n "$PKGBUILD_TAG" ] && check_pkgfile + distro_install_depends lkp-dev
[ $os = "centos" ] &&
On Tue, Nov 10, 2020 at 10:38:03AM +0800, Lin Jiaxin wrote:
[Why] Support more version's PKGBUILD.
[How] Download the required file through remote-git
Signed-off-by: Lin Jiaxin ljx.joe@qq.com
tests/cci-makepkg | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 9551ebfe..1faa1e9f 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -37,6 +37,23 @@ cd $LKP_SRC/pkg/$benchmark || die "pkg is empty" mount -t cifs -o guest,vers=1.0,noacl,nouser_xattr //$LKP_SERVER$PKG_MNT $PKG_MNT || die "Failed to run mount" }
+get_pkgfile() +{
- curl -sS -H 'Content-Type: Application/json' -XPOST "$LKP_SERVER"':8100/git_command' \
- -d '{"git_repo": "'$1'", "git_command": ["git-show", "HEAD:'$2'"]}' -o "$2"
+}
+check_pkgfile() +{
- PKGBUILD_TAG="-$PKGBUILD_TAG"
- PKGBUILD_TAG_FILE="PKGBUILD$PKGBUILD_TAG"
- get_pkgfile "pkg/$benchmark" "$PKGBUILD_TAG_FILE"
- [ -f "$PKGBUILD_TAG_FILE" ] || die "$PKGBUILD_TAG_FILE not exist"
- [ -s "$PKGBUILD_TAG_FILE" ] || die "$PKGBUILD_TAG_FILE is empty"
+}
get_pkg_info() { var=$1 @@ -69,6 +86,8 @@ update_shared_pkg() echo "update shared pkg link ${benchmark}.cgz -> ${bm_name}/${cgz_name}" }
[ -n "$PKGBUILD_TAG" ] && check_pkgfile [ -n "$PKGBUILD_TAG" ] && get_pkgfile 在这里我觉得用这个名字比较好 能够体现出关键性的动作 Thanks sunyukui
distro_install_depends lkp-dev
[ $os = "centos" ] &&
2.23.0