SConscript (10350:35241e33c38f) | SConscript (10384:fa66d9c5e180) |
---|---|
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 --- 90 unchanged lines hidden (view full) --- 99 # with paths all it wants to and we still get the right files. 100 cmd = '${SOURCES[0]} -d %s -re ${SOURCES[1]} %s' % (tgt_dir, tgt_dir) 101 102 # Prefix test run with batch job submission command if appropriate. 103 # Batch command also supports timeout arg (in seconds, not minutes). 104 timeout = 15 * 60 # used to be a param, probably should be again 105 if env['BATCH']: 106 cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd) | 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 --- 90 unchanged lines hidden (view full) --- 99 # with paths all it wants to and we still get the right files. 100 cmd = '${SOURCES[0]} -d %s -re ${SOURCES[1]} %s' % (tgt_dir, tgt_dir) 101 102 # Prefix test run with batch job submission command if appropriate. 103 # Batch command also supports timeout arg (in seconds, not minutes). 104 timeout = 15 * 60 # used to be a param, probably should be again 105 if env['BATCH']: 106 cmd = '%s -t %d %s' % (env['BATCH_CMD'], timeout, cmd) |
107 # The slowest regression (bzip2) requires ~2.8 hours; 108 # 4 hours was chosen to be conservative. 109 elif env['TIMEOUT']: 110 cmd = 'timeout 4h %s' % cmd |
|
107 108 # Create a default value for the status string, changed as needed 109 # based on the status. 110 status_str = "passed." 111 112 pre_exec_time = time.time() 113 status = env.Execute(env.subst(cmd, target=target, source=source)) 114 if status == 0: --- 32 unchanged lines hidden (view full) --- 147 status_str = "CHANGED!" 148 print "===== Statistics differences =====" 149 print contents(statsdiff) 150 151 else: # gem5 exit status != 0 152 # Consider it a failed test unless the exit status is 2 153 status_str = "FAILED!" 154 # gem5 did not terminate properly, so no need to check the output | 111 112 # Create a default value for the status string, changed as needed 113 # based on the status. 114 status_str = "passed." 115 116 pre_exec_time = time.time() 117 status = env.Execute(env.subst(cmd, target=target, source=source)) 118 if status == 0: --- 32 unchanged lines hidden (view full) --- 151 status_str = "CHANGED!" 152 print "===== Statistics differences =====" 153 print contents(statsdiff) 154 155 else: # gem5 exit status != 0 156 # Consider it a failed test unless the exit status is 2 157 status_str = "FAILED!" 158 # gem5 did not terminate properly, so no need to check the output |
155 if signaled(status): | 159 if env['TIMEOUT'] and status == 124: 160 status_str = "TIMED-OUT!" 161 elif signaled(status): |
156 print 'gem5 terminated with signal', signum(status) 157 if signum(status) in retry_signals: 158 # Consider the test incomplete; don't create a 'status' output. 159 # Hand the return status to scons and let scons decide what 160 # to do about it (typically terminate unless run with -k). 161 return status 162 elif status == 2: 163 # The test was skipped, change the status string to say so --- 23 unchanged lines hidden (view full) --- 187 line = contents(source[0]) 188 189 # split the line to words and get the last one 190 words = line.split() 191 status = words[-1] 192 193 # if the test failed make it red, if it passed make it green, and 194 # skip the punctuation | 162 print 'gem5 terminated with signal', signum(status) 163 if signum(status) in retry_signals: 164 # Consider the test incomplete; don't create a 'status' output. 165 # Hand the return status to scons and let scons decide what 166 # to do about it (typically terminate unless run with -k). 167 return status 168 elif status == 2: 169 # The test was skipped, change the status string to say so --- 23 unchanged lines hidden (view full) --- 193 line = contents(source[0]) 194 195 # split the line to words and get the last one 196 words = line.split() 197 status = words[-1] 198 199 # if the test failed make it red, if it passed make it green, and 200 # skip the punctuation |
195 if status == "FAILED!": | 201 if status == "FAILED!" or status == "TIMED-OUT!": |
196 status = termcap.Red + status[:-1] + termcap.Normal + status[-1] 197 elif status == "CHANGED!": 198 status = termcap.Yellow + status[:-1] + termcap.Normal + status[-1] 199 elif status == "passed.": 200 status = termcap.Green + status[:-1] + termcap.Normal + status[-1] 201 elif status == "skipped.": 202 status = termcap.Cyan + status[:-1] + termcap.Normal + status[-1] 203 --- 153 unchanged lines hidden --- | 202 status = termcap.Red + status[:-1] + termcap.Normal + status[-1] 203 elif status == "CHANGED!": 204 status = termcap.Yellow + status[:-1] + termcap.Normal + status[-1] 205 elif status == "passed.": 206 status = termcap.Green + status[:-1] + termcap.Normal + status[-1] 207 elif status == "skipped.": 208 status = termcap.Cyan + status[:-1] + termcap.Normal + status[-1] 209 --- 153 unchanged lines hidden --- |