SConscript (7685:9782e93eeb63) SConscript (7735:a1a85250e897)
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

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

25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Steve Reinhardt
30# Kevin Lim
31
32import os, signal
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

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

25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Steve Reinhardt
30# Kevin Lim
31
32import os, signal
33import sys
33import sys, time
34import glob
35from SCons.Script.SConscript import SConsEnvironment
36
37Import('env')
38
39env['DIFFOUT'] = File('diff-out')
40
41# Dict that accumulates lists of tests by category (quick, medium, long)

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

97 cmd = '${SOURCES[0]} -d %s -re ${SOURCES[1]} %s' % (tgt_dir, tgt_dir)
98
99 # Prefix test run with batch job submission command if appropriate.
100 # Batch command also supports timeout arg (in seconds, not minutes).
101 timeout = 15 * 60 # used to be a param, probably should be again
102 if env['BATCH']:
103 cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd)
104
34import glob
35from SCons.Script.SConscript import SConsEnvironment
36
37Import('env')
38
39env['DIFFOUT'] = File('diff-out')
40
41# Dict that accumulates lists of tests by category (quick, medium, long)

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

97 cmd = '${SOURCES[0]} -d %s -re ${SOURCES[1]} %s' % (tgt_dir, tgt_dir)
98
99 # Prefix test run with batch job submission command if appropriate.
100 # Batch command also supports timeout arg (in seconds, not minutes).
101 timeout = 15 * 60 # used to be a param, probably should be again
102 if env['BATCH']:
103 cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd)
104
105 pre_exec_time = time.time()
105 status = env.Execute(env.subst(cmd, target=target, source=source))
106 if status == 0:
107 # M5 terminated normally.
108 # Run diff on output & ref directories to find differences.
109 # Exclude the stats file since we will use diff-out on that.
106 status = env.Execute(env.subst(cmd, target=target, source=source))
107 if status == 0:
108 # M5 terminated normally.
109 # Run diff on output & ref directories to find differences.
110 # Exclude the stats file since we will use diff-out on that.
111
112 # NFS file systems can be annoying and not have updated yet
113 # wait until we see the file modified
114 statsdiff = os.path.join(tgt_dir, 'statsdiff')
115 m_time = 0
116 nap = 0
117 while m_time < pre_exec_time and nap < 10:
118 try:
119 m_time = os.stat(statsdiff).st_mtime
120 except OSError:
121 pass
122 time.sleep(1)
123 nap += 1
124
110 outdiff = os.path.join(tgt_dir, 'outdiff')
111 diffcmd = 'diff -ubrs %s ${SOURCES[2].dir} %s > %s' \
112 % (output_ignore_args, tgt_dir, outdiff)
113 env.Execute(env.subst(diffcmd, target=target, source=source))
114 print "===== Output differences ====="
115 print contents(outdiff)
116 # Run diff-out on stats.txt file
125 outdiff = os.path.join(tgt_dir, 'outdiff')
126 diffcmd = 'diff -ubrs %s ${SOURCES[2].dir} %s > %s' \
127 % (output_ignore_args, tgt_dir, outdiff)
128 env.Execute(env.subst(diffcmd, target=target, source=source))
129 print "===== Output differences ====="
130 print contents(outdiff)
131 # Run diff-out on stats.txt file
117 statsdiff = os.path.join(tgt_dir, 'statsdiff')
118 diffcmd = '$DIFFOUT ${SOURCES[2]} %s > %s' \
119 % (os.path.join(tgt_dir, 'stats.txt'), statsdiff)
120 diffcmd = env.subst(diffcmd, target=target, source=source)
121 status = env.Execute(diffcmd, strfunction=None)
122 print "===== Statistics differences ====="
123 print contents(statsdiff)
124
125 else: # m5 exit status != 0

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

255 'tsunami-simple-timing',
256 'tsunami-simple-atomic-dual',
257 'tsunami-simple-timing-dual',
258 'twosys-tsunami-simple-atomic',
259 'tsunami-o3', 'tsunami-o3-dual']
260 if env['TARGET_ISA'] == 'sparc':
261 configs += ['t1000-simple-atomic',
262 't1000-simple-timing']
132 diffcmd = '$DIFFOUT ${SOURCES[2]} %s > %s' \
133 % (os.path.join(tgt_dir, 'stats.txt'), statsdiff)
134 diffcmd = env.subst(diffcmd, target=target, source=source)
135 status = env.Execute(diffcmd, strfunction=None)
136 print "===== Statistics differences ====="
137 print contents(statsdiff)
138
139 else: # m5 exit status != 0

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

269 'tsunami-simple-timing',
270 'tsunami-simple-atomic-dual',
271 'tsunami-simple-timing-dual',
272 'twosys-tsunami-simple-atomic',
273 'tsunami-o3', 'tsunami-o3-dual']
274 if env['TARGET_ISA'] == 'sparc':
275 configs += ['t1000-simple-atomic',
276 't1000-simple-timing']
277 if env['TARGET_ISA'] == 'arm':
278 configs += ['realview-simple-atomic',
279 'realview-simple-timing']
263
264else:
265 configs += ['simple-atomic', 'simple-timing', 'o3-timing', 'memtest',
266 'simple-atomic-mp', 'simple-timing-mp', 'o3-timing-mp',
267 'inorder-timing', 'rubytest']
268
269if env['RUBY']:
270 # With Ruby, A protocol must be specified in the environment

--- 22 unchanged lines hidden ---
280
281else:
282 configs += ['simple-atomic', 'simple-timing', 'o3-timing', 'memtest',
283 'simple-atomic-mp', 'simple-timing-mp', 'o3-timing-mp',
284 'inorder-timing', 'rubytest']
285
286if env['RUBY']:
287 # With Ruby, A protocol must be specified in the environment

--- 22 unchanged lines hidden ---