tests: Remove working dir assumption in tgen tests
authorAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 2 Jun 2016 14:20:24 +0000 (15:20 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 2 Jun 2016 14:20:24 +0000 (15:20 +0100)
The traffic generator tests currently assume that they are run from
the root of the source directory. This sometimes breaks tests when
they are run using the new test framework.

Change-Id: I6538a7902694c5d2c980295e076ea1c09acc4291
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
tests/configs/tgen-dram-ctrl.py
tests/configs/tgen-simple-mem.py

index cd6721e6dd613bd1592bc2cf2d999aeb41ef1f3b..292c7e5b9b428e53df8e24af6226c18d4dbff6ea 100644 (file)
@@ -45,7 +45,8 @@ require_sim_object("CommMonitor")
 
 # even if this is only a traffic generator, call it cpu to make sure
 # the scripts are happy
-cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-dram-ctrl.cfg")
+cpu = TrafficGen(
+    config_file=srcpath("tests/quick/se/70.tgen/tgen-dram-ctrl.cfg"))
 
 # system simulated
 system = System(cpu = cpu, physmem = DDR3_1600_x64(),
index d128eb37d9cfafa1c17760efb97af913686f159c..815bc490ca50836f9152f6c9e63e2ad1b1da564e 100644 (file)
@@ -45,7 +45,8 @@ require_sim_object("CommMonitor")
 
 # even if this is only a traffic generator, call it cpu to make sure
 # the scripts are happy
-cpu = TrafficGen(config_file = "tests/quick/se/70.tgen/tgen-simple-mem.cfg")
+cpu = TrafficGen(
+    config_file=srcpath("tests/quick/se/70.tgen/tgen-simple-mem.cfg"))
 
 # system simulated
 system = System(cpu = cpu, physmem = SimpleMemory(),