From 9593c02d8f1ee47556183c9dd7cbab1685a5cc6e Mon Sep 17 00:00:00 2001 From: Praveen K Pandey Date: Tue, 3 Oct 2023 15:09:23 +0530 Subject: [PATCH] Moved testcase logic to use generic kernel path Moved testcase logic to use generic kernel path which can help user to not have diffrent path Signed-off-by: Praveen K Pandey --- testcases/GcovSetup.py | 2 ++ testcases/Lcov.py | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/testcases/GcovSetup.py b/testcases/GcovSetup.py index aeecb7e8c..3904ad5b6 100755 --- a/testcases/GcovSetup.py +++ b/testcases/GcovSetup.py @@ -75,6 +75,8 @@ def runTest(self): src_path = os.path.join(src_path, line) break log.info("\n\nsource path = %s" %src_path) + self.cv_HOST.host_run_command('mv %s /root/kernel/linux' %src_path) + src_path = '/root/kernel/linux' log.info("\nadding gcov_param....") self.kernel_config(src_path) log.info("Building the new kernel...") diff --git a/testcases/Lcov.py b/testcases/Lcov.py index c9e3f19c2..91fdf8dea 100644 --- a/testcases/Lcov.py +++ b/testcases/Lcov.py @@ -53,7 +53,6 @@ def setUp(self): self.util = OpTestUtil(OpTestConfiguration.conf) self.c = self.cv_SYSTEM.cv_HOST.get_ssh_connection() self.distro = self.util.distro_name() - self.k_version = "".join(self.cv_HOST.host_run_command("uname -r")) def runTest(self): ''' @@ -102,8 +101,7 @@ def runTest(self): Running the test ''' self.c = self.cv_SYSTEM.cv_HOST.get_ssh_connection() - self.k_version = "".join(self.cv_HOST.host_run_command("uname -r")) - src_path = f'/root/kernel-{self.k_version}*/linux-{self.k_version}*' + src_path = f'/root/kernel/linux' self.cv_HOST.host_run_command(f"cd {src_path}") src_path = "".join(self.cv_HOST.host_run_command("pwd")) temp_dir = tempfile.mkdtemp(prefix="Lcov_result_")