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
@@ -43,8 +43,8 @@ from __future__ import absolute_import
|
||||
import m5
|
||||
from m5.objects import *
|
||||
from m5.util import *
|
||||
from .Benchmarks import *
|
||||
from . import ObjectList
|
||||
from common.Benchmarks import *
|
||||
from common import ObjectList
|
||||
|
||||
# Populate to reflect supported os types per target ISA
|
||||
os_types = { 'mips' : [ 'linux' ],
|
||||
|
||||
Reference in New Issue
Block a user