[Erp5-report] r29667 - in /erp5/trunk/products/ERP5: PropertySheet/ Tool/ bootstrap/erp5_co...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 15 13:55:16 CEST 2009
Author: nicolas.dumazet
Date: Thu Oct 15 13:55:16 2009
New Revision: 29667
URL: http://svn.erp5.org?rev=29667&view=rev
Log:
- add a 'SQL Connection String' field to the UnitTestRun Dialog.
- pass the value of this field to the test runner (--erp5_sql_connection_string)
- add a system preference to set a default value for that field
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog/my_sql_connection_string.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view/my_preferred_unit_test_sql_connection_string.xml
Modified:
erp5/trunk/products/ERP5/PropertySheet/DocumentPreference.py
erp5/trunk/products/ERP5/Tool/TemplateTool.py
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/PropertySheet/DocumentPreference.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/DocumentPreference.py?rev=29667&r1=29666&r2=29667&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/DocumentPreference.py [utf8] (original)
+++ erp5/trunk/products/ERP5/PropertySheet/DocumentPreference.py [utf8] Thu Oct 15 13:55:16 2009
@@ -96,6 +96,12 @@
'write_permission': 'Manage properties',
'preference' : 1,
'mode' : '' },
+ { 'id' : 'preferred_unit_test_sql_connection_string',
+ 'description' : 'Preferred Unit Test SQL Connection String',
+ 'type' : 'string',
+ 'write_permission': 'Manage properties',
+ 'preference' : 1,
+ 'mode' : '' },
)
# vim: shiftwidth=2
Modified: erp5/trunk/products/ERP5/Tool/TemplateTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Tool/TemplateTool.py?rev=29667&r1=29666&r2=29667&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Tool/TemplateTool.py [utf8] Thu Oct 15 13:55:16 2009
@@ -439,6 +439,7 @@
security.declareProtected(Permissions.ManagePortal, 'runUnitTestList')
def runUnitTestList(self, test_list=[],
+ sql_connection_string='',
REQUEST=None, RESPONSE=None, **kwd):
"""Runs Unit Tests related to this Business Template
"""
@@ -454,6 +455,8 @@
if RESPONSE is not None:
RESPONSE.setHeader('Content-type', 'text/plain')
test_cmd_args = [sys.executable, getUnitTestFile()]
+ test_cmd_args.append('--erp5_sql_connection_string="%s"'
+ % sql_connection_string)
test_cmd_args += test_list
process = subprocess.Popen(test_cmd_args,
stdout=subprocess.PIPE,
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog.xml?rev=29667&r1=29666&r2=29667&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog.xml [utf8] Thu Oct 15 13:55:16 2009
@@ -65,6 +65,7 @@
<value>
<list>
<string>my_test_list</string>
+ <string>my_sql_connection_string</string>
</list>
</value>
</item>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog/my_sql_connection_string.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog/my_sql_connection_string.xml?rev=29667&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog/my_sql_connection_string.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_viewUnitTestRunDialog/my_sql_connection_string.xml [utf8] Thu Oct 15 13:55:16 2009
@@ -1,0 +1,281 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="StringField" module="Products.Formulator.StandardFields"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>my_sql_connection_string</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ <item>
+ <key> <string>required_not_found</string> </key>
+ <value> <string>Input is required but no input given.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_long</string> </key>
+ <value> <string>Too much input was given.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <int>20</int> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>SQL Connection String</string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>preferences/getPreferredUnitTestSqlConnectionString</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view.xml?rev=29667&r1=29666&r2=29667&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view.xml [utf8] Thu Oct 15 13:55:16 2009
@@ -76,6 +76,7 @@
<list>
<string>my_title</string>
<string>my_description</string>
+ <string>my_preferred_unit_test_sql_connection_string</string>
</list>
</value>
</item>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view/my_preferred_unit_test_sql_connection_string.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view/my_preferred_unit_test_sql_connection_string.xml?rev=29667&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view/my_preferred_unit_test_sql_connection_string.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/SystemPreference_view/my_preferred_unit_test_sql_connection_string.xml [utf8] Thu Oct 15 13:55:16 2009
@@ -1,0 +1,139 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>delegated_list</string> </key>
+ <value>
+ <list>
+ <string>default</string>
+ <string>description</string>
+ <string>title</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>my_preferred_unit_test_sql_connection_string</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string>Connection String to be used to run Unit Tests</string> </value>
+ </item>
+ <item>
+ <key> <string>field_id</string> </key>
+ <value> <string>my_string_field</string> </value>
+ </item>
+ <item>
+ <key> <string>form_id</string> </key>
+ <value> <string>Base_viewFieldLibrary</string> </value>
+ </item>
+ <item>
+ <key> <string>target</string> </key>
+ <value> <string>Click to edit the target</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Unit Test SQL Connection String</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>python: here.getPreferredUnitTestSqlConnectionString() or preferences.getPreferredUnitTestSqlConnectionString()</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=29667&r1=29666&r2=29667&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Thu Oct 15 13:55:16 2009
@@ -1,1 +1,1 @@
-1333
+1334
More information about the Erp5-report
mailing list