Commit 726957c8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Store Live Tests log in INSTANCEHOME/var rather than in a StringIO.

This avoids copying/pasting the content of the form and also keep records for
later inspection.
parent 3e38d592
...@@ -38,7 +38,6 @@ from Products.CMFCore.utils import UniqueObject ...@@ -38,7 +38,6 @@ from Products.CMFCore.utils import UniqueObject
import OFS import OFS
import transaction import transaction
from cStringIO import StringIO
from zExceptions import BadRequest from zExceptions import BadRequest
from zExceptions import Unauthorized from zExceptions import Unauthorized
from Acquisition import Implicit from Acquisition import Implicit
...@@ -1223,8 +1222,14 @@ def initialize( context ): ...@@ -1223,8 +1222,14 @@ def initialize( context ):
return '' return ''
path = os.path.join(getConfiguration().instancehome, 'tests') path = os.path.join(getConfiguration().instancehome, 'tests')
verbosity = verbose and 2 or 1 verbosity = verbose and 2 or 1
from datetime import datetime
log_filename = 'live-test-%s.log' % datetime.now().strftime('%Y%m%d-%H%M%S')
global global_stream global global_stream
global_stream = StringIO() global_stream = open(os.path.join(getConfiguration().instancehome,
'var', log_filename), 'w+')
from Products.ERP5Type.tests.ERP5TypeLiveTestCase import runLiveTest from Products.ERP5Type.tests.ERP5TypeLiveTestCase import runLiveTest
try: try:
result = runLiveTest(test_list, result = runLiveTest(test_list,
......
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