From eca133a9de0030d1be81885d6359d51146bea0e4 Mon Sep 17 00:00:00 2001
From: Nicolas Delaby <nicolas@nexedi.com>
Date: Wed, 24 Aug 2011 17:07:39 +0200
Subject: [PATCH] Ease debugging

Use absolute path, and display useful log when sql dump is not found
---
 product/ERP5Type/tests/custom_zodb.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/product/ERP5Type/tests/custom_zodb.py b/product/ERP5Type/tests/custom_zodb.py
index 1d6f0adc12..76ff4ca671 100644
--- a/product/ERP5Type/tests/custom_zodb.py
+++ b/product/ERP5Type/tests/custom_zodb.py
@@ -43,7 +43,7 @@ if save_mysql:
     # The output of mysqldump needs to merge many lines at a time
     # for performance reasons (merging lines is at most 10 times
     # faster, so this produce somewhat not nice to read sql
-    command = 'mysqldump %s > dump.sql' % getMySQLArguments()
+    command = 'mysqldump %s > %s' % (getMySQLArguments(), os.path.abspath('dump.sql'),)
     if verbosity:
       _print('Dumping MySQL database with %s...' % command)
     os.system(command)
@@ -64,7 +64,7 @@ if load:
       ret = os.system("mysql %s < %s" % (getMySQLArguments(), dump_sql))
       assert not ret
     else:
-      _print("Could not find MySQL dump, will recreate catalog ... ")
+      _print("Could not find MySQL dump (%r), will recreate catalog ... " % dump_sql)
       os.environ['erp5_tests_recreate_catalog'] = '1'
   _print("Restoring static files ... ")
   live_instance_path = os.environ.get('live_instance_path')
-- 
2.30.9