Skip to content

Commit

Permalink
tests: don't mix up stdout and the xml log
Browse files Browse the repository at this point in the history
Can result in corrupted xml.
  • Loading branch information
avikivity committed Jun 24, 2015
1 parent 14a8110 commit 27b0200
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ def alarm_handler(signum, frame):
print_status('%s RUNNING %s' % (prefix, path))
signal.signal(signal.SIGALRM, alarm_handler)
if args.jenkins and test[1] == 'boost':
path = path + " --output_format=XML --log_level=all --report_level=no"
mode = 'release'
if test[0].startswith(os.path.join('build','debug')):
mode = 'debug'
xmlout = args.jenkins+"."+mode+"."+os.path.basename(test[0])+".boost.xml"
path = path + " --output_format=XML --log_level=all --report_level=no --log_sink=" + xmlout
print(path)
if os.path.isfile('tmp.out'):
os.remove('tmp.out')
outf=open('tmp.out','w')
Expand Down Expand Up @@ -146,11 +151,6 @@ def alarm_handler(signum, frame):
all_ok = False
else:
print_status('%s PASSED %s' % (prefix, path))
if args.jenkins and test[1] == 'boost':
mode = 'release'
if test[0].startswith(os.path.join('build','debug')):
mode = 'debug'
os.rename('tmp.out',args.jenkins+"."+mode+"."+os.path.basename(test[0])+".boost.xml")

if all_ok:
print('\nOK.')
Expand Down

0 comments on commit 27b0200

Please sign in to comment.