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 |
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." |
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] |
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 --- |