From 54e06f88c25a2284e4cd053a27bb868b1260fe19 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 8 Mar 2023 09:19:14 +0000 Subject: [PATCH] tests: Fix import path in simple_binary_run.py We should be using gem5.components instead of python.gem5.components. In https://gem5-review.git.corp.google.com/c/public/gem5/+/68518 I was seeing the RISC-V tests fail with `ModuleNotFoundError: No module named 'python.gem5.components.processors.base_cpu_core'`. This fixes the issue for me with the RISC-V tests. I also searched for other similar imports and I've removed a similar (unused) one in x86_boot_exit_run.py. Change-Id: I61a0c4c27724854956f778f14e1fcfafea927ffd Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/68757 Reviewed-by: Bobby Bruce Maintainer: Bobby Bruce Tested-by: kokoro --- tests/gem5/configs/simple_binary_run.py | 3 +-- tests/gem5/configs/x86_boot_exit_run.py | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/gem5/configs/simple_binary_run.py b/tests/gem5/configs/simple_binary_run.py index fbb0313f93..5540e806ba 100644 --- a/tests/gem5/configs/simple_binary_run.py +++ b/tests/gem5/configs/simple_binary_run.py @@ -40,6 +40,7 @@ from gem5.components.memory import SingleChannelDDR3_1600 from gem5.components.boards.simple_board import SimpleBoard from gem5.components.cachehierarchies.classic.no_cache import NoCache from gem5.components.processors.simple_processor import SimpleProcessor +from gem5.components.processors.base_cpu_core import BaseCPUCore from gem5.components.processors.base_cpu_processor import BaseCPUProcessor from gem5.components.processors.simple_core import SimpleCore from gem5.components.boards.mem_mode import MemMode @@ -52,8 +53,6 @@ from m5.util import fatal import argparse import importlib -from python.gem5.components.processors.base_cpu_core import BaseCPUCore - cpu_types_string_map = { CPUTypes.ATOMIC: "AtomicSimpleCPU", CPUTypes.O3: "O3CPU", diff --git a/tests/gem5/configs/x86_boot_exit_run.py b/tests/gem5/configs/x86_boot_exit_run.py index b1cbc647b2..5458b6db6c 100644 --- a/tests/gem5/configs/x86_boot_exit_run.py +++ b/tests/gem5/configs/x86_boot_exit_run.py @@ -46,9 +46,6 @@ from gem5.resources.workload import Workload import argparse import importlib -from python.gem5.components.boards.kernel_disk_workload import ( - KernelDiskWorkload, -) parser = argparse.ArgumentParser( description="A script to run the gem5 boot test. This test boots the "