help="Pickled test results")
def _show(args):
+ def _load(f):
+ # Load the pickled status file, sometimes e.g., when a
+ # regression is still running the status file might be
+ # incomplete.
+ try:
+ return pickle.load(f)
+ except EOFError:
+ print >> sys.stderr, 'Could not read file %s' % f.name
+ return []
+
formatter = _create_formatter(args)
- suites = sum([ pickle.load(f) for f in args.result ], [])
+ suites = sum([ _load(f) for f in args.result ], [])
formatter.dump_suites(suites)
def _test_args(subparsers):
help="Pickled test results")
def _test(args):
- suites = sum([ pickle.load(f) for f in args.result ], [])
+ try:
+ suites = sum([ pickle.load(f) for f in args.result ], [])
+ except EOFError:
+ print >> sys.stderr, 'Could not read all files'
+ sys.exit(2)
if all(s for s in suites):
sys.exit(0)