From 54133684b419973da5a740fa3dec91cfda186041 Mon Sep 17 00:00:00 2001 From: Praveen K Pandey Date: Tue, 16 Apr 2024 10:23:18 +0530 Subject: [PATCH] added support in get kernel source in suse case Signed-off-by: Praveen K Pandey --- testcases/GcovSetup.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/testcases/GcovSetup.py b/testcases/GcovSetup.py index 5f1832a8b..1d0b8d703 100755 --- a/testcases/GcovSetup.py +++ b/testcases/GcovSetup.py @@ -60,15 +60,19 @@ def runTest(self): self.installer = "yum install" elif self.distro_name == 'sles': self.installer = "zypper install" - dep_packages = ["rpm-build", "yum-utils", "gcc*", "perl*", "tiny*"] + dep_packages = ["rpm-build", "gcc*", "perl*", "tiny*"] log.info(f"\nInstalling following dependency packages\n {dep_packages}") for pkg in dep_packages: - self.cv_HOST.host_run_command(f"{self.installer} {pkg} -y") + if self.distro_name == 'rhel': + dep_packages.append("yum-utils") + self.cv_HOST.host_run_command(f"{self.installer} {pkg} -y") + elif self.distro_name == 'sles': + self.cv_HOST.host_run_command(f"{self.installer} -y {pkg}") log.info("\nInstalling the ditro src...") if self.distro_name == 'rhel': src_path = self.util.get_distro_src('kernel', '/root', "-bp") elif self.distro_name == 'sles': - src_path = self.util.get_distro_src('kernel-default', '/root', "-bp") + src_path = self.util.get_distro_src('kernel-default', '/root', "-bp", "linux") src_path_base = src_path out = self.cv_HOST.host_run_command(f"ls {src_path}") for line in out: