Deleted Added
sdiff udiff text old ( 11879:7388b21d7eac ) new ( 12142:f6ccdb328a23 )
full compact
1#!/usr/bin/env python2
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

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

265 """Test unit comparing two gem5 stat files."""
266
267 def __init__(self, **kwargs):
268 super(DiffStatFile, self).__init__("stat_diff", **kwargs)
269
270 self.stat_diff = os.path.join(_test_base, "diff-out")
271
272 def _run(self):
273 stats = "stats.txt"
274
275 cmd = [
276 self.stat_diff,
277 self.ref_file(stats), self.out_file(stats),
278 ]
279 with ProcessHelper(cmd,
280 stdout=subprocess.PIPE,
281 stderr=subprocess.PIPE) as p:
282 status, stdout, stderr = p.call()
283
284 if status == 0:
285 return self.ok(stdout=stdout, stderr=stderr)
286 if status == 1:
287 return self.failure("Statistics mismatch",
288 stdout=stdout, stderr=stderr)
289 else:
290 return self.error("diff-out returned an error: %i" % status,
291 stdout=stdout, stderr=stderr)