~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testbzr

  • Committer: Martin Pool
  • Date: 2005-05-16 05:32:24 UTC
  • Revision ID: mbp@sourcefrog.net-20050516053224-02970fda0ced9bb2
- show some log output if the tests fail

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
if os.path.exists(TESTDIR):
137
137
    shutil.rmtree(TESTDIR)
138
138
 
 
139
start_dir = os.getcwd()
 
140
 
139
141
 
140
142
logfile = open(LOGFILENAME, 'wt', buffering=1)
141
143
 
379
381
                     + '*' * 50 + '\n')
380
382
    logfile.write('tests failed!\n')
381
383
    traceback.print_exc(None, logfile)
 
384
    logfile.close()
 
385
 
 
386
    sys.stdout.writelines(file(os.path.join(start_dir, LOGFILENAME), 'rt').readlines()[-50:])
 
387
    
382
388
    sys.exit(1)
 
389