[PATCH v5 lkp-tests] tests/cci-makepkg: update gcc for centos7 when use initramfs os

Signed-off-by: Lin Jiaxin <ljx.joe@qq.com> --- tests/cci-makepkg | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 530c9fef..865b2a9d 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -88,13 +88,22 @@ update_shared_pkg() echo "update shared pkg link ${benchmark}.cgz -> ${bm_name}/${cgz_name}" } +centos_update_gcc() +{ + if $(grep -sqF "CentOS Linux release 7" /etc/centos-release ); then + [ "$os_mount" = "initramfs" ] && { + yum install -y centos-release-scl-rh + yum install -y "devtoolset-8-gcc*" + } + source /opt/rh/devtoolset-8/enable + fi +} + [ -n "$PKGBUILD_TAG" ] && download_pkgfile distro_install_depends lkp-dev -[ $os = "centos" ] && -grep -sqF "CentOS Linux release 7" /etc/centos-release && -source /opt/rh/devtoolset-8/enable +[ "$os" = "centos" ] && centos_update_gcc distro_install_depends ${benchmark}-dev -- 2.23.0

On Wed, Nov 18, 2020 at 03:35:48PM +0800, Lin Jiaxin wrote:
Signed-off-by: Lin Jiaxin <ljx.joe@qq.com> --- tests/cci-makepkg | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/tests/cci-makepkg b/tests/cci-makepkg index 530c9fef..865b2a9d 100755 --- a/tests/cci-makepkg +++ b/tests/cci-makepkg @@ -88,13 +88,22 @@ update_shared_pkg() echo "update shared pkg link ${benchmark}.cgz -> ${bm_name}/${cgz_name}" }
+centos_update_gcc() +{ + if $(grep -sqF "CentOS Linux release 7" /etc/centos-release ); then + [ "$os_mount" = "initramfs" ] && { + yum install -y centos-release-scl-rh + yum install -y "devtoolset-8-gcc*" + } + source /opt/rh/devtoolset-8/enable + fi +} +
i found this install_gcc7 function is $LKP_SRC/distro/aliyun can fix this problem in $LKP_SRC/distro/aliyun? Thanks, Wang Yong
participants (2)
-
Lin Jiaxin
-
Wang Yong