Commit 5d3b0c78 authored by Julien Muchembled's avatar Julien Muchembled

Tweak again output on test startup because ZopeLite is always quiet since r30352

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30371 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 38f22d65
......@@ -15,12 +15,12 @@ save = int(os.environ.get('erp5_save_data_fs', 0))
if load:
dump_sql = os.path.join(instance_home, 'dump.sql')
if os.path.exists(dump_sql):
print "Restoring MySQL database ... ",
print "Restoring MySQL database ...",
ret = os.system("mysql %s < %s" % (getMySQLArguments(), dump_sql))
assert not ret
else:
os.environ['erp5_tests_recreate_catalog'] = '1'
print "Restoring static files ... ",
print "Restoring static files ...",
for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'):
if os.path.exists(os.path.join(instance_home, '%s.bak' % dir)):
full_path = os.path.join(instance_home, dir)
......@@ -28,7 +28,7 @@ if load:
shutil.copytree(os.path.join(instance_home, '%s.bak' % dir),
full_path, symlinks=True)
else:
print "Cleaning static files at %s ... " % instance_home,
print "Cleaning static files ...",
for dir in ('Constraint', 'Document', 'PropertySheet', 'Extensions'):
full_path = os.path.join(instance_home, dir)
if os.path.exists(full_path):
......@@ -45,3 +45,4 @@ elif load:
else:
Storage = DemoStorage()
print "Instance at %r loaded ..." % instance_home,
......@@ -3,6 +3,7 @@ import os
import sys
import pdb
import re
import time
import getopt
import unittest
import shutil
......@@ -302,6 +303,9 @@ def runUnitTestList(test_list, verbosity=1, debug=0):
os.environ.setdefault('EVENT_LOG_FILE', os.path.join(tests_home, 'zLOG.log'))
os.environ.setdefault('EVENT_LOG_SEVERITY', '-300')
print "Loading Zope ...",
_start = time.time()
import Testing
# the above import changes cfg.testinghome. Reset it to where our
# custom_zodb.py can be found. This must be done before importing
......@@ -426,6 +430,8 @@ def runUnitTestList(test_list, verbosity=1, debug=0):
# be faster and we could drop most of this code we currently maintain
# ourselves
layer.ZopeLite.setUp()
print 'done (%.3fs)' % (time.time() - _start),
result = TestRunner(verbosity=verbosity).run(suite)
if save:
......
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