configs: Fix relative import in non-package in configs
Fix "ValueError: Attempted relative import in non-package"
Python "compilation" fails when running, among other configs:
./build/X86/gem5.fast ./configs/example/ruby_random_test.py
The files in the configs/folder_name folder that are not named
"folder_name.py" are not packages, and thus Python does not allow
relative imports in them.
This fixes the bug reported in
https://gem5.atlassian.net/projects/GEM5/issues/GEM5-188
Change-Id: Ic8befc30e4cff1d6e8d2f5db1b7f9b89b0fc1395
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24163
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
10833b50fe
commit
61cfc6d4ce
@@ -45,7 +45,7 @@ from os import getcwd
|
||||
from os.path import join as joinpath
|
||||
|
||||
from common import CpuConfig
|
||||
from . import ObjectList
|
||||
from common import ObjectList
|
||||
|
||||
import m5
|
||||
from m5.defines import buildEnv
|
||||
|
||||
Reference in New Issue
Block a user