Deleted Added
sdiff udiff text old ( 9654:64b653b3d72f ) new ( 9851:14e6caa5a1de )
full compact
1# Copyright (c) 2012 ARM Limited
2# All rights reserved
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 178 unchanged lines hidden (view full) ---

187sys.path.append(joinpath(tests_root, category, mode, name))
188execfile(joinpath(tests_root, category, mode, name, 'test.py'))
189
190# Initialize all CPUs in a system
191def initCPUs(sys):
192 def initCPU(cpu):
193 # We might actually have a MemTest object or something similar
194 # here that just pretends to be a CPU.
195 if isinstance(cpu, BaseCPU):
196 cpu.createThreads()
197
198 # The CPU attribute doesn't exist in some cases, e.g. the Ruby
199 # testers.
200 if not hasattr(sys, "cpu"):
201 return
202
203 # The CPU can either be a list of CPUs or a single object.
204 if isinstance(sys.cpu, list):
205 [ initCPU(cpu) for cpu in sys.cpu ]
206 else:
207 initCPU(sys.cpu)
208
209# We might be creating a single system or a dual system. Try
210# initializing the CPUs in all known system attributes.
211for sysattr in [ "system", "testsys", "drivesys" ]:
212 if hasattr(root, sysattr):
213 initCPUs(getattr(root, sysattr))
214
215run_test(root)