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 try: |
196 cpu.createThreads() |
197 except: 198 pass |
199 200 # The CPU attribute doesn't exist in some cases, e.g. the Ruby 201 # testers. 202 if not hasattr(sys, "cpu"): 203 return 204 205 # The CPU can either be a list of CPUs or a single object. 206 if isinstance(sys.cpu, list): 207 [ initCPU(cpu) for cpu in sys.cpu ] 208 else: 209 initCPU(sys.cpu) 210 211# We might be creating a single system or a dual system. Try 212# initializing the CPUs in all known system attributes. 213for sysattr in [ "system", "testsys", "drivesys" ]: 214 if hasattr(root, sysattr): 215 initCPUs(getattr(root, sysattr)) 216 217run_test(root) |