[Erp5-report] r30488 - in /experimental/erp5.buildout-zope-2.12/trunk: ./ src/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Nov 10 18:47:09 CET 2009


Author: leonardo
Date: Tue Nov 10 18:47:06 2009
New Revision: 30488

URL: http://svn.erp5.org?rev=30488&view=rev
Log:
This buildout is now build-bot slave also

Added:
    experimental/erp5.buildout-zope-2.12/trunk/Makefile   (with props)
    experimental/erp5.buildout-zope-2.12/trunk/erp5.cfg
    experimental/erp5.buildout-zope-2.12/trunk/src/generate_erp5_xml.py
Modified:
    experimental/erp5.buildout-zope-2.12/trunk/   (props changed)

Propchange: experimental/erp5.buildout-zope-2.12/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Nov 10 18:47:06 2009
@@ -12,3 +12,5 @@
 lib
 local.cfg
 *~
+erp5.xml
+ERP5-*

Added: experimental/erp5.buildout-zope-2.12/trunk/Makefile
URL: http://svn.erp5.org/experimental/erp5.buildout-zope-2.12/trunk/Makefile?rev=30488&view=auto
==============================================================================
--- experimental/erp5.buildout-zope-2.12/trunk/Makefile (added)
+++ experimental/erp5.buildout-zope-2.12/trunk/Makefile [utf8] Tue Nov 10 18:47:06 2009
@@ -1,0 +1,38 @@
+SUITE_NAME=ERP5
+LOCAL_MAKEFILE=$(wildcard ../Makefile*)
+
+include $(LOCAL_MAKEFILE)
+
+run_unit_test: clean_previous update_svn run_buildout
+
+actual_run_unit_test: erp5_xml 
+	edos-runtest --test-directory=`pwd` --file=erp5.xml -c erp5.cfg
+
+clean_previous:
+	# XXX when the runUnitTest infrastructure is fixed, parts/unit_test
+	# below will probably change, either to the instance part location or to the
+	# runUnitTest part location
+	rm -rf $(SUITE_NAME)* parts/unit_test
+
+clean_all:
+	# When you need to force a full rebuild
+	rm -rf parts
+
+update_svn: bin/develop
+	bin/develop update
+	svn update parts/products-erp5/*
+	svn update parts/products-deps-svn/*
+
+run_buildout bin/runUnitTest bin/zopepy: bin/buildout
+	bin/buildout -v
+
+bin/develop: bin/buildout
+	bin/buildout -v install develop
+
+bin/buildout: 
+	python2.6 bootstrap/bootstrap.py
+
+# do not use erp5.xml as the target here to force make to always generate it
+erp5_xml: bin/zopepy
+	bin/zopepy src/generate_erp5_xml.py $(SUITE_NAME) > erp5.xml
+

Propchange: experimental/erp5.buildout-zope-2.12/trunk/Makefile
------------------------------------------------------------------------------
    svn:eol-style = native

Added: experimental/erp5.buildout-zope-2.12/trunk/erp5.cfg
URL: http://svn.erp5.org/experimental/erp5.buildout-zope-2.12/trunk/erp5.cfg?rev=30488&view=auto
==============================================================================
--- experimental/erp5.buildout-zope-2.12/trunk/erp5.cfg (added)
+++ experimental/erp5.buildout-zope-2.12/trunk/erp5.cfg [utf8] Tue Nov 10 18:47:06 2009
@@ -1,0 +1,28 @@
+[Testing]
+# Base directory where tests will be run
+#localstatedir=/var/lib
+#testdir=%(localstatedir)s/edos-testrunner/test
+
+[Reporting]
+# The list, separated by ',', of test reporters
+reporter=erp5,stdout1
+#reporter=StdoutTestReporter
+#reporter=XwikiTestReporter
+
+[stdout1]
+class=StdoutTestReporter
+
+[erp5]
+class=ERP5TestReporter
+host=erp5.nexedi.com
+port=80
+test_report_service_url=/test_result_module
+login_url=/
+#username= (set in ~/.edos-testrunner.cfg )
+#password= (set in ~/.edos-testrunner.cfg )
+ 
+
+[Identification]
+# Registered username for the reporting service
+username=noname
+

Added: experimental/erp5.buildout-zope-2.12/trunk/src/generate_erp5_xml.py
URL: http://svn.erp5.org/experimental/erp5.buildout-zope-2.12/trunk/src/generate_erp5_xml.py?rev=30488&view=auto
==============================================================================
--- experimental/erp5.buildout-zope-2.12/trunk/src/generate_erp5_xml.py (added)
+++ experimental/erp5.buildout-zope-2.12/trunk/src/generate_erp5_xml.py [utf8] Tue Nov 10 18:47:06 2009
@@ -1,0 +1,71 @@
+""" 
+  This Python script is used to generate edos test runner compatible
+  XMl format.
+  Usually it's invoked by 'make gen_erp5_xml'
+  See Makefile
+"""
+
+import glob
+import os
+import sys
+import lxml.etree as ET
+
+PROJECT_NAME = sys.argv[1]
+TEST_SUITE = sys.argv[1]
+TEST_ERP5_SQL_CONNECTION_STRING = 'test test'
+
+TEST_GLOBS = """
+parts/products-erp5/*/tests/test*.py
+parts/business_templates/*/TestTemplateItem/test*.py
+""".strip().split('\n')
+
+# build a tree structure
+root = ET.Element("test-case")
+description = ET.SubElement(root, "description",
+                            name=PROJECT_NAME, suite=TEST_SUITE)
+description.text = 'Test Case for ERP5 tests on Zope 2.12 with CMF 2.2'
+
+# XXX edos test runner will not work if "package" and "condition"
+# tags are omitted.
+package = ET.SubElement(root, "package",
+                        name="erp5")
+
+condition = ET.SubElement(root, "condition")
+and_ = ET.SubElement(condition, "and")
+isset = ET.SubElement(and_, "isset", property="")
+# /XXX
+
+def Argument(shell_command, value):
+  arg = ET.SubElement(shell_command, 'arg', value=value)
+  return arg
+
+test_runner = ET.SubElement(root, "test-runner")
+
+for test_path in [path
+                  for pattern in TEST_GLOBS
+                  for path in glob.glob(pattern)
+                 ]:
+  test_case = test_path.split(os.sep)[-1][:-3] # remove .py
+  product = test_path.split(os.sep)[-3]
+
+  # don't test 3rd party products and ERP5Banking, which is tested in another
+  # environment
+  if product in ('MimetypesRegistry', 'PortalTransforms', 'MailTemplates',
+                 'ERP5Banking'):
+    continue
+
+  # skip some tests
+  if test_case in ('testPerformance', ):
+    continue
+
+  shell = ET.SubElement(test_runner, 'shell', script='../../bin/runUnitTest')
+  Argument(shell, "--erp5_sql_connection_string %r"
+            % TEST_ERP5_SQL_CONNECTION_STRING)
+  Argument(shell, "--verbose")
+  Argument(shell, test_case)
+
+# the hack to know revision number in ERP5
+shell = ET.SubElement(test_runner, 'shell', script='LANGUAGE=C svn info')
+Argument(shell, "parts/products-erp5/ERP5")
+
+print ET.tostring(root,  pretty_print=True)




More information about the Erp5-report mailing list