SConscript (8599:30d0e4c249b5) SConscript (8802:ef66a9083bc4)
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
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, name, _ref, isa, opsys, config) = ref_dir.split('/')
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
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, name, isa, opsys, config)
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 = []
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['FULL_SYSTEM']:
269 if env['TARGET_ISA'] == 'alpha':
270 configs += ['tsunami-simple-atomic',
271 'tsunami-simple-timing',
272 'tsunami-simple-atomic-dual',
273 'tsunami-simple-timing-dual',
274 'twosys-tsunami-simple-atomic',
275 'tsunami-o3', 'tsunami-o3-dual',
276 'tsunami-inorder']
277 if env['TARGET_ISA'] == 'sparc':
278 configs += ['t1000-simple-atomic',
279 't1000-simple-timing']
280 if env['TARGET_ISA'] == 'arm':
281 configs += ['realview-simple-atomic',
282 'realview-simple-atomic-dual',
283 'realview-simple-timing',
284 'realview-simple-timing-dual',
285 'realview-o3',
286 'realview-o3-dual']
287 if env['TARGET_ISA'] == 'x86':
288 configs += ['pc-simple-atomic',
289 'pc-simple-timing',
290 'pc-o3-timing']
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']
291
290
292else:
293 configs += ['simple-atomic', 'simple-timing', 'o3-timing', 'memtest',
294 'simple-atomic-mp', 'simple-timing-mp', 'o3-timing-mp',
295 'inorder-timing', 'rubytest']
291configs += ['simple-atomic', 'simple-timing', 'o3-timing', 'memtest',
292 'simple-atomic-mp', 'simple-timing-mp', 'o3-timing-mp',
293 'inorder-timing', 'rubytest']
296
297if env['PROTOCOL'] != 'None':
298 if env['PROTOCOL'] == 'MI_example':
299 configs += [c + "-ruby" for c in configs]
300 else:
301 configs = [c + "-ruby-" + env['PROTOCOL'] for c in configs]
302
303cwd = os.getcwd()
304os.chdir(str(Dir('.').srcdir))
305for config in configs:
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:
306 dirs = glob.glob('*/*/ref/%s/*/%s' % (env['TARGET_ISA'], config))
304 dirs = glob.glob('*/*/*/ref/%s/*/%s' % (env['TARGET_ISA'], config))
307 for d in dirs:
308 if not os.path.exists(os.path.join(d, 'skip')):
309 test_builder(env, d)
310os.chdir(cwd)
305 for d in dirs:
306 if not os.path.exists(os.path.join(d, 'skip')):
307 test_builder(env, d)
308os.chdir(cwd)