Commit 704eb82a authored by Jérome Perrin's avatar Jérome Perrin

test_result: add "retry_test_pattern" property on test suite

This allows defining a regular expression for tests that can be retried if they
failed. If a test result fail and its title match this regular expression it
will be retried.
parent dd887d99
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Standard Property" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>elementary_type/string</string>
</tuple>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Test results whose title match this (regular expression) pattern will be retried once if they fail.</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>retry_test_pattern_property</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Standard Property</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
"""Returns info about a test result, a mapping containing: """Returns info about a test result, a mapping containing:
test_suite_relative_url: relative url of test suite test_suite_relative_url: relative url of test suite
retry_test_pattern: the pattern for test result lines which can be restarted
repository_dict: for each test suite repository, keyed by buildout section id: repository_dict: for each test suite repository, keyed by buildout section id:
revision: commit sha revision: commit sha
repository_url: git url of the repository repository_url: git url of the repository
...@@ -53,5 +54,6 @@ if REQUEST: ...@@ -53,5 +54,6 @@ if REQUEST:
return { return {
'test_suite_relative_url': test_suite.getRelativeUrl(), 'test_suite_relative_url': test_suite.getRelativeUrl(),
'retry_test_pattern': test_suite.getRetryTestPattern(),
'repository_dict': repository_dict, 'repository_dict': repository_dict,
} }
...@@ -104,6 +104,7 @@ ...@@ -104,6 +104,7 @@
<string>my_additional_bt5_repository_id</string> <string>my_additional_bt5_repository_id</string>
<string>my_source_project_title</string> <string>my_source_project_title</string>
<string>my_specialise_title</string> <string>my_specialise_title</string>
<string>my_retry_test_pattern</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -1579,6 +1579,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase): ...@@ -1579,6 +1579,7 @@ class TestGitlabRESTConnectorInterface(ERP5TypeTestCase):
"test_result_line_pattern": None, "test_result_line_pattern": None,
}, },
}, },
"retry_test_pattern": None,
"test_suite_relative_url": self.test_suite.getRelativeUrl() "test_suite_relative_url": self.test_suite.getRelativeUrl()
}, },
self.test_result.TestResult_getTestSuiteData()) self.test_result.TestResult_getTestSuiteData())
......
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