[Erp5-report] r35490 jerome - /erp5/trunk/products/ERP5Type/tests/custom_zodb.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu May 20 15:30:09 CEST 2010


Author: jerome
Date: Thu May 20 15:30:09 2010
New Revision: 35490

URL: http://svn.erp5.org?rev=35490&view=rev
Log:
use INSTANCE_HOME environment variable, which is always set by either runUnitTest.py or zopectl. Also warn when previous dump is not found

Modified:
    erp5/trunk/products/ERP5Type/tests/custom_zodb.py

Modified: erp5/trunk/products/ERP5Type/tests/custom_zodb.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/tests/custom_zodb.py?rev=35490&r1=35489&r2=35490&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/tests/custom_zodb.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/tests/custom_zodb.py [utf8] Thu May 20 15:30:09 2010
@@ -9,11 +9,12 @@
 from ZODB.DemoStorage import DemoStorage
 from ZODB.FileStorage import FileStorage
 from Products.ERP5Type.tests.utils import getMySQLArguments, instance_random
-from Products.ERP5Type.tests.runUnitTest import instance_home, static_dir_list
+from Products.ERP5Type.tests.runUnitTest import static_dir_list
 
 def _print(message):
   sys.stderr.write(message + "\n")
 
+instance_home = os.environ['INSTANCE_HOME']
 zserver_list = os.environ.get('zserver', '').split(',')
 os.environ['zserver'] = zserver_list[0]
 
@@ -56,6 +57,7 @@
       ret = os.system("mysql %s < %s" % (getMySQLArguments(), dump_sql))
       assert not ret
     else:
+      _print("Could not find MySQL dump, will recreate catalog ... ")
       os.environ['erp5_tests_recreate_catalog'] = '1'
   _print("Restoring static files ... ")
   for dir in static_dir_list:




More information about the Erp5-report mailing list