SConscript (9244:4672c12307a7) SConscript (9401:9f0918fbb07f)
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

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

145 # M5 did not terminate properly, so no need to check the output
146 if signaled(status):
147 print 'M5 terminated with signal', signum(status)
148 if signum(status) in retry_signals:
149 # Consider the test incomplete; don't create a 'status' output.
150 # Hand the return status to scons and let scons decide what
151 # to do about it (typically terminate unless run with -k).
152 return status
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

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

145 # M5 did not terminate properly, so no need to check the output
146 if signaled(status):
147 print 'M5 terminated with signal', signum(status)
148 if signum(status) in retry_signals:
149 # Consider the test incomplete; don't create a 'status' output.
150 # Hand the return status to scons and let scons decide what
151 # to do about it (typically terminate unless run with -k).
152 return status
153 elif status == 2:
154 # The test was skipped
155 pass
153 else:
154 print 'M5 exited with non-zero status', status
155 # complete but failed execution (call to exit() with non-zero
156 # status, SIGABORT due to assertion failure, etc.)... fall through
157 # and generate FAILED status as if output comparison had failed
158
159 # Generate status file contents based on exit status of m5 or diff-out
160 if status == 0:
161 status_str = "passed."
156 else:
157 print 'M5 exited with non-zero status', status
158 # complete but failed execution (call to exit() with non-zero
159 # status, SIGABORT due to assertion failure, etc.)... fall through
160 # and generate FAILED status as if output comparison had failed
161
162 # Generate status file contents based on exit status of m5 or diff-out
163 if status == 0:
164 status_str = "passed."
165 elif status == 2:
166 status_str = "skipped."
162 else:
163 status_str = "FAILED!"
164 f = file(str(target[0]), 'w')
165 print >>f, tgt_dir, status_str
166 f.close()
167 # done
168 return 0
169

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

183 status = words[-1]
184
185 # if the test failed make it red, if it passed make it green, and
186 # skip the punctuation
187 if status == "FAILED!":
188 status = termcap.Red + status[:-1] + termcap.Normal + status[-1]
189 elif status == "passed.":
190 status = termcap.Green + status[:-1] + termcap.Normal + status[-1]
167 else:
168 status_str = "FAILED!"
169 f = file(str(target[0]), 'w')
170 print >>f, tgt_dir, status_str
171 f.close()
172 # done
173 return 0
174

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

188 status = words[-1]
189
190 # if the test failed make it red, if it passed make it green, and
191 # skip the punctuation
192 if status == "FAILED!":
193 status = termcap.Red + status[:-1] + termcap.Normal + status[-1]
194 elif status == "passed.":
195 status = termcap.Green + status[:-1] + termcap.Normal + status[-1]
196 elif status == "skipped.":
197 status = termcap.Yellow + status[:-1] + termcap.Normal + status[-1]
191
192 # put it back in the list and join with space
193 words[-1] = status
194 line = " ".join(words)
195
196 print '***** ' + line
197 return 0
198

--- 136 unchanged lines hidden ---
198
199 # put it back in the list and join with space
200 words[-1] = status
201 line = " ".join(words)
202
203 print '***** ' + line
204 return 0
205

--- 136 unchanged lines hidden ---