Commit cee58353 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Show the full traceback when raising an exception.

parent b0be02a6
......@@ -32,6 +32,7 @@ import os
import csv
import logging
import signal
import traceback
class BenchmarkResultStatistic(object):
def __init__(self, suite, label):
......@@ -165,7 +166,7 @@ class BenchmarkResult(object):
self._all_result_list = []
def __exit__(self, exc_type, exc_value, traceback):
def __exit__(self, exc_type, exc_value, traceback_object):
signal.signal(signal.SIGTERM, signal.SIG_IGN)
return True
......@@ -215,13 +216,15 @@ class CSVBenchmarkResult(BenchmarkResult):
super(CSVBenchmarkResult, self).flush(partial)
def __exit__(self, exc_type, exc_value, traceback):
super(CSVBenchmarkResult, self).__exit__(exc_type, exc_value, traceback)
def __exit__(self, exc_type, exc_value, traceback_object):
super(CSVBenchmarkResult, self).__exit__(exc_type, exc_value,
if exc_type and not issubclass(exc_type, StopIteration):
msg = "An error occured, see: %s" % self._log_filename_path
self.logger.error("%s: %s" % (exc_type, exc_value))
self.logger.error("%s:\n%s" % (exc_value,
raise RuntimeError(msg)
from cStringIO import StringIO
......@@ -260,8 +263,9 @@ class ERP5BenchmarkResult(BenchmarkResult):
super(ERP5BenchmarkResult, self).flush()
def __exit__(self, exc_type, exc_value, traceback):
super(ERP5BenchmarkResult, self).__exit__(exc_type, exc_value, traceback)
def __exit__(self, exc_type, exc_value, traceback_object):
super(ERP5BenchmarkResult, self).__exit__(exc_type, exc_value,
def createResultDocument(publish_url, publish_project, repeat, nb_users):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment