verify.py (13101:d0db2b204d51) verify.py (13134:23ee016d1f54)
1#!/usr/bin/env python2
2#
3# Copyright 2018 Google, Inc.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

73 self.props[key] = val
74
75 def dir(self):
76 return os.path.join(self.build_dir, tests_rel_path, self.path)
77
78 def src_dir(self):
79 return os.path.join(script_dir, self.path)
80
1#!/usr/bin/env python2
2#
3# Copyright 2018 Google, Inc.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions are
7# met: redistributions of source code must retain the above copyright
8# notice, this list of conditions and the following disclaimer;

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

73 self.props[key] = val
74
75 def dir(self):
76 return os.path.join(self.build_dir, tests_rel_path, self.path)
77
78 def src_dir(self):
79 return os.path.join(script_dir, self.path)
80
81 def expected_returncode_file(self):
82 return os.path.join(self.src_dir(), 'expected_returncode')
83
81 def golden_dir(self):
82 return os.path.join(self.src_dir(), 'golden')
83
84 def bin(self):
85 return '.'.join([self.name, self.suffix])
86
87 def full_path(self):
88 return os.path.join(self.dir(), self.bin())

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

378 self.passed(test)
379 else:
380 self.failed(test, 'compile failed')
381
382 for test in runnable:
383 with open(test.returncode_file()) as rc:
384 returncode = int(rc.read())
385
84 def golden_dir(self):
85 return os.path.join(self.src_dir(), 'golden')
86
87 def bin(self):
88 return '.'.join([self.name, self.suffix])
89
90 def full_path(self):
91 return os.path.join(self.dir(), self.bin())

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

381 self.passed(test)
382 else:
383 self.failed(test, 'compile failed')
384
385 for test in runnable:
386 with open(test.returncode_file()) as rc:
387 returncode = int(rc.read())
388
389 expected_returncode = 0
390 if os.path.exists(test.expected_returncode_file()):
391 with open(test.expected_returncode_file()) as erc:
392 expected_returncode = int(erc.read())
393
386 if returncode == 124:
387 self.failed(test, 'time out')
388 continue
394 if returncode == 124:
395 self.failed(test, 'time out')
396 continue
389 elif returncode != 0:
390 self.failed(test, 'abort')
397 elif returncode != expected_returncode:
398 if expected_returncode == 0:
399 self.failed(test, 'abort')
400 else:
401 self.failed(test, 'missed abort')
391 continue
392
393 out_dir = test.m5out_dir()
394
395 Diff = collections.namedtuple(
396 'Diff', 'ref, test, tag, ref_filter')
397
398 diffs = []

--- 134 unchanged lines hidden ---
402 continue
403
404 out_dir = test.m5out_dir()
405
406 Diff = collections.namedtuple(
407 'Diff', 'ref, test, tag, ref_filter')
408
409 diffs = []

--- 134 unchanged lines hidden ---