1# -*- mode:python -*- 2 3# Copyright (c) 2004-2006 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 219 unchanged lines hidden (view full) --- 228 return env.subst("Updating ${SOURCES[0].dir} from ${SOURCES[1].dir}", 229 target=target, source=source) 230 231updateAction = env.Action(update_test, update_test_string) 232 233def test_builder(env, ref_dir): 234 """Define a test.""" 235 |
236 (category, mode, name, _ref, isa, opsys, config) = ref_dir.split('/') |
237 assert(_ref == 'ref') 238 239 # target path (where test output goes) is the same except without 240 # the 'ref' component |
241 tgt_dir = os.path.join(category, mode, name, isa, opsys, config) |
242 243 # prepend file name with tgt_dir 244 def tgt(f): 245 return os.path.join(tgt_dir, f) 246 247 ref_stats = os.path.join(ref_dir, 'stats.txt') 248 new_stats = tgt('stats.txt') 249 status_file = tgt('status') --- 10 unchanged lines hidden (view full) --- 260 else: 261 p = env.Command(tgt('_print'), [status_file], printAction) 262 263 env.AlwaysBuild(p) 264 265 266# Figure out applicable configs based on build type 267configs = [] |
268if env['TARGET_ISA'] == 'alpha': 269 configs += ['tsunami-simple-atomic', 270 'tsunami-simple-timing', 271 'tsunami-simple-atomic-dual', 272 'tsunami-simple-timing-dual', 273 'twosys-tsunami-simple-atomic', 274 'tsunami-o3', 'tsunami-o3-dual', 275 'tsunami-inorder'] 276if env['TARGET_ISA'] == 'sparc': 277 configs += ['t1000-simple-atomic', 278 't1000-simple-timing'] 279if env['TARGET_ISA'] == 'arm': 280 configs += ['realview-simple-atomic', 281 'realview-simple-atomic-dual', 282 'realview-simple-timing', 283 'realview-simple-timing-dual', 284 'realview-o3', 285 'realview-o3-dual'] 286if env['TARGET_ISA'] == 'x86': 287 configs += ['pc-simple-atomic', 288 'pc-simple-timing', 289 'pc-o3-timing'] |
290 |
291configs += ['simple-atomic', 'simple-timing', 'o3-timing', 'memtest', 292 'simple-atomic-mp', 'simple-timing-mp', 'o3-timing-mp', 293 'inorder-timing', 'rubytest'] |
294 295if env['PROTOCOL'] != 'None': 296 if env['PROTOCOL'] == 'MI_example': 297 configs += [c + "-ruby" for c in configs] 298 else: 299 configs = [c + "-ruby-" + env['PROTOCOL'] for c in configs] 300 301cwd = os.getcwd() 302os.chdir(str(Dir('.').srcdir)) 303for config in configs: |
304 dirs = glob.glob('*/*/*/ref/%s/*/%s' % (env['TARGET_ISA'], config)) |
305 for d in dirs: 306 if not os.path.exists(os.path.join(d, 'skip')): 307 test_builder(env, d) 308os.chdir(cwd) |