configs: Fix relative import in non-package in configs
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Wed, 8 Jan 2020 08:19:42 +0000 (09:19 +0100)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Mon, 9 Mar 2020 22:28:00 +0000 (22:28 +0000)
commit61cfc6d4ceb0d5b13e039012d3fa0d153d841a24
treefafd3dd5746f95e390e0f000d9e804e0c38df232
parent10833b50fe5c4b21e4cc288578410ce40dc62528
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>
15 files changed:
configs/common/Benchmarks.py
configs/common/CacheConfig.py
configs/common/FSConfig.py
configs/common/MemConfig.py
configs/common/Options.py
configs/common/Simulation.py
configs/ruby/GPU_RfO.py
configs/ruby/MI_example.py
configs/topologies/Cluster.py
configs/topologies/Crossbar.py
configs/topologies/CrossbarGarnet.py
configs/topologies/MeshDirCorners_XY.py
configs/topologies/Mesh_XY.py
configs/topologies/Mesh_westfirst.py
configs/topologies/Pt2Pt.py