configs: Fix import path error in learning_gem5 part3
authorJason Lowe-Power <jason@lowepower.com>
Fri, 5 Apr 2019 01:36:42 +0000 (18:36 -0700)
committerJason Lowe-Power <jason@lowepower.com>
Mon, 8 Apr 2019 22:51:38 +0000 (22:51 +0000)
Change-Id: I2c5cd22bded998bae8e7aa77e42e1b042ce1c5f5
Signed-off-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17869
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
configs/learning_gem5/part3/ruby_test.py
configs/learning_gem5/part3/simple_ruby.py
configs/learning_gem5/part3/test_caches.py

index 45c139bdf2cbf611c107f5d11a7da9c42f153763..a7ccbb576b3e1a57c5f41bc7d11fb1eecd7e1273 100644 (file)
@@ -42,7 +42,7 @@ import m5
 # import all of the SimObjects
 from m5.objects import *
 
-from .test_caches import TestCacheSystem
+from test_caches import TestCacheSystem
 
 # create the system we are going to simulate
 system = System()
index dda9e6dc7284b2f60bc40257954bb3fc246f8670..bcd5044a15e1f9ad5528cdfc09b7cba6891b2d15 100644 (file)
@@ -47,7 +47,7 @@ from m5.objects import *
 
 # You can import ruby_caches_MI_example to use the MI_example protocol instead
 # of the MSI protocol
-from .msi_caches import MyCacheSystem
+from msi_caches import MyCacheSystem
 
 # create the system we are going to simulate
 system = System()
@@ -80,7 +80,10 @@ system.caches.setup(system, system.cpu, [system.mem_ctrl])
 isa = str(m5.defines.buildEnv['TARGET_ISA']).lower()
 
 # Run application and use the compiled ISA to find the binary
-binary = 'tests/test-progs/threads/bin/' + isa + '/linux/threads'
+# grab the specific path to the binary
+thispath = os.path.dirname(os.path.realpath(__file__))
+binary = os.path.join(thispath, '../../../', 'tests/test-progs/threads/bin/',
+                      isa, 'linux/threads')
 
 # Create a process for a simple "multi-threaded" application
 process = Process()
index 4b17250ffdabfaaab1624db517079c0fccbd040c..6495dc558a2b04683543c5e3bfe296e34a1c23f9 100644 (file)
@@ -44,7 +44,7 @@ from m5.util import fatal
 
 from m5.objects import *
 
-from .msi_caches import L1Cache, DirController, MyNetwork
+from msi_caches import L1Cache, DirController, MyNetwork
 
 class TestCacheSystem(RubySystem):