SConscript (6007:e0344c15e73b) SConscript (6008:fb50ea61a226)
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

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

119 % (os.path.join(tgt_dir, 'stats.txt'), statsdiff)
120 diffcmd = env.subst(diffcmd, target=target, source=source)
121 status = Execute(diffcmd, strfunction=None)
122 print "===== Statistics differences ====="
123 print contents(statsdiff)
124
125 else: # m5 exit status != 0
126 # M5 did not terminate properly, so no need to check the output
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

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

119 % (os.path.join(tgt_dir, 'stats.txt'), statsdiff)
120 diffcmd = env.subst(diffcmd, target=target, source=source)
121 status = Execute(diffcmd, strfunction=None)
122 print "===== Statistics differences ====="
123 print contents(statsdiff)
124
125 else: # m5 exit status != 0
126 # M5 did not terminate properly, so no need to check the output
127 if signaled(status) and signum(status) in retry_signals:
128 # Consider the test incomplete; don't create a 'status' output.
129 # Hand the return status to scons and let scons decide what
130 # to do about it (typically terminate unless run with -k).
127 if signaled(status):
131 print 'M5 terminated with signal', signum(status)
128 print 'M5 terminated with signal', signum(status)
132 return status
129 if signum(status) in retry_signals:
130 # Consider the test incomplete; don't create a 'status' output.
131 # Hand the return status to scons and let scons decide what
132 # to do about it (typically terminate unless run with -k).
133 return status
134 else:
135 print 'M5 exited with non-zero status', status
133 # complete but failed execution (call to exit() with non-zero
134 # status, SIGABORT due to assertion failure, etc.)... fall through
135 # and generate FAILED status as if output comparison had failed
136 # complete but failed execution (call to exit() with non-zero
137 # status, SIGABORT due to assertion failure, etc.)... fall through
138 # and generate FAILED status as if output comparison had failed
136 print 'M5 exited with non-zero status', status
137
138 # Generate status file contents based on exit status of m5 or diff-out
139 if status == 0:
140 status_str = "passed."
141 else:
142 status_str = "FAILED!"
143 f = file(str(target[0]), 'w')
144 print >>f, tgt_dir, status_str

--- 129 unchanged lines hidden ---
139
140 # Generate status file contents based on exit status of m5 or diff-out
141 if status == 0:
142 status_str = "passed."
143 else:
144 status_str = "FAILED!"
145 f = file(str(target[0]), 'w')
146 print >>f, tgt_dir, status_str

--- 129 unchanged lines hidden ---