Deleted Added
sdiff udiff text old ( 11504:f3184dd8257f ) new ( 11542:ecd058e3dcbe )
full compact
1# -*- mode:python -*-
2#
3# Copyright (c) 2016 ARM Limited
4# All rights reserved
5#
6# The license below extends only to copyright in the software and shall
7# not be construed as granting a license to any other intellectual
8# property including but not limited to intellectual property relating

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

115
116 """
117 with open(source[0].abspath, "rb") as fin:
118 result = pickle.load(fin)
119
120 assert len(result) == 1
121 result = result[0]
122
123 run = result.results[0]
124 assert run.name == "gem5"
125
126 formatter = None
127 if not run:
128 status = color_message(termcap.Red, "FAILED!")
129 formatter = results.Text()
130 elif run.skipped():
131 status = color_message(termcap.Cyan, "skipped.")
132 elif result:
133 status = color_message(termcap.Green, "passed.")
134 else:
135 status = color_message(termcap.Yellow, "CHANGED!")
136 formatter = results.Text()
137
138 if formatter:
139 formatter.dump_suites([result])
140
141 print "***** %s: %s" % (source[0].dir, status)
142 return 0
143

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

159 ref_dir = test.ref_dir
160
161 with open(source[0].abspath, "rb") as fin:
162 result = pickle.load(fin)
163
164 assert len(result) == 1
165 result = result[0]
166
167 run = result.results[0]
168 assert run.name == "gem5"
169
170 if run.skipped():
171 print "*** %s: %s: Test skipped, not updating." % (
172 source[0].dir, color_message(termcap.Yellow, "WARNING"), )
173 return 0
174 elif result:
175 print "*** %s: %s: Test successful, not updating." % (
176 source[0].dir, color_message(termcap.Green, "skipped"), )
177 return 0
178 elif not run.success():
179 print "*** %s: %s: Test failed, not updating." % (
180 source[0].dir, color_message(termcap.Red, "ERROR"), )
181 return 1
182
183 print "** Updating %s" % (test, )
184 test.update_ref()
185
186 return 0

--- 68 unchanged lines hidden ---