summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-04-14 05:44:27 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-04-14 05:44:27 -0400
commitb9bc530ad20bceeed6e43ea459d271046f43e70c (patch)
tree8ff4ae20d6d05f4ca7267b0f5339e56c2b5e92a7 /SConstruct
parentb6aa6d55eb856f99a06c400b5dcda118c46dacfa (diff)
downloadgem5-b9bc530ad20bceeed6e43ea459d271046f43e70c.tar.xz
Regression: Add ANSI colours to highlight test status
This patch adds a very basic pretty-printing of the test status (passed or failed) to highlight failing tests even more: green for passed, and red for failed. The printing only uses ANSI it the target output is a tty and supports ANSI colours. Hence, any regression scripts that are outputting to files or sending e-mails etc should still be fine.
Diffstat (limited to 'SConstruct')
-rwxr-xr-xSConstruct12
1 files changed, 4 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index baf95724a..a45a6e63f 100755
--- a/SConstruct
+++ b/SConstruct
@@ -120,6 +120,7 @@ extra_python_paths = [
sys.path[1:1] = extra_python_paths
from m5.util import compareVersions, readCommand
+from m5.util.terminal import get_termcap
help_texts = {
"options" : "",
@@ -169,14 +170,7 @@ AddLocalOption('--update-ref', dest='update_ref', action='store_true',
AddLocalOption('--verbose', dest='verbose', action='store_true',
help='Print full tool command lines')
-use_colors = GetOption('use_colors')
-if use_colors:
- from m5.util.terminal import termcap
-elif use_colors is None:
- # option unspecified; default behavior is to use colors iff isatty
- from m5.util.terminal import tty_termcap as termcap
-else:
- from m5.util.terminal import no_termcap as termcap
+termcap = get_termcap(GetOption('use_colors'))
########################################################################
#
@@ -462,6 +456,8 @@ class Transform(object):
Export('Transform')
+# enable the regression script to use the termcap
+main['TERMCAP'] = termcap
if GetOption('verbose'):
def MakeAction(action, string, *args, **kwargs):