Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
erp5
Commits
0db8d0b5
Commit
0db8d0b5
authored
10 years ago
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_result: a test cannot be successful if there are unknown test result lines
parent
a463bc45
master
allow_login_change
allow_login_change_differentiate_id_and_login
allow_login_change_wip
arnau
arnau-kns
arnau-kns-without-property-mapping
auto_extend_select_list
autoflake
bk_erp5ish_actions_tool
bk_sqlcatalog
bt5_config
cedriclen-eos
cherry-pick-4a8e045d
cleanup_acquisition_base_category
compact_title_no_reference
datetimefield
delivery_item_barcode
douglas_forum
dream_distributor
dsn-phase3
eos-dev
erp5-component
erp5-data-notebook
erp5-forum
erp5-preference
erp5-vifib
erp5-vifib-cleanup
erp5_catalog
erp5_catalog_final
erp5_free_subscription
erp5_workflow
erp5testnode_max_timeout
experiment/coding_style_test_suite
feat/accounting_balance_sheet_profit_and_loss_cleanups
feat/accounting_stop_using_getObject
feat/accounting_translate_gap
feat/no_useless_records_in_predicate_table
feat/olapy
feat/test_inventory_api_domain_selection
feat/trade_shipment_report
feat/wendelin-py-data
feature/renderjs-matrixbox
feature/renderjs-ui-no-header
fix/full_text_script_conflict
fix/login_validate_check_consistency
fix/repair_graph_editor
fix/xvfb_all_displays_locked
for_testrunner_1
for_testrunner_2
for_testrunner_3
gabriel-fix-rounding-in-accounting-generation
gabriel-fix-rounding-in-accounting-generation2
gadget-json-value
improve_default_caching_policy_manager
initsite
isDeletable
item_tracking_graph_editor
jerome-test
jerome_graph_editor_renderjs
jerome_user_preference_time_zone
jm/form-action-guard
joblib-activity
kns
kns-kr
maste_copy
master_calendar_wip_patches
master_calendar_wip_patches_extend_security
master_no_guard_on_workflow_transition
master_no_guard_on_workflow_transition_plus_calendar_wip_patchs
monitoring
monitoring-graph
nexedi-erp5-jp
no_longer_simulated_state
officejs
officejs_clean
officejs_zip
portal_callables
portal_solver_process_security_configuration
refactor/base_edit
refactor/renderjs
reindex_calendar_after_change_calendar_exception
reverse_logistics
rewrite_test_21_AcquiredPortalType
romain-fulltext
scalability-roque
scalability-roque-2
shop-box
sms_more_than_140_characters
strict_catalog
sws_fix
taskdistribution-xmlrpc-binary
testnode_software_link
timezones
tmp/getInstalledBusinessTemplate_never_installed_bt
tristan
tristan-merge
view-aggregated-amounts
vivekpab_erp5webrenderjs_layoutconfig
vivekpab_jabberclient
vivekpab_renderjs_interfaces
erp5.util-0.4.49
erp5.util-0.4.46
erp5.util-0.4.44
erp5.util-0.4.43
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_result_workflow/scripts/TestResult_complete.xml
...flow/test_result_workflow/scripts/TestResult_complete.xml
+15
-14
No files found.
bt5/erp5_test_result/WorkflowTemplateItem/portal_workflow/test_result_workflow/scripts/TestResult_complete.xml
View file @
0db8d0b5
...
...
@@ -55,20 +55,21 @@ kw = sci[\'kwargs\']\n
stop_date = kw.get(\'date\') or DateTime()\n
test_result.setStopDate(stop_date)\n
if test_result.getPortalType() == \'Test Result\':\n
if test_result:\n
edit_kw = dict(duration=0,\n
all_tests=0,\n
errors=0,\n
failures=0,\n
skips=0)\n
for line in test_result.objectValues(portal_type=\'Test Result Line\'):\n
for prop in edit_kw:\n
edit_kw[prop] = edit_kw[prop] + line.getProperty(prop, 0)\n
if edit_kw[\'errors\'] or edit_kw[\'failures\']:\n
status = \'FAIL\'\n
else:\n
status = \'PASS\'\n
test_result.edit(string_index=status, **edit_kw)\n
has_unknown_result = False\n
edit_kw = dict(duration=0,\n
all_tests=0,\n
errors=0,\n
failures=0,\n
skips=0)\n
for line in test_result.objectValues(portal_type=\'Test Result Line\'):\n
for prop in edit_kw:\n
edit_kw[prop] = edit_kw[prop] + line.getProperty(prop, 0)\n
has_unknown_result = has_unknown_result or line.getStringIndex() == 'UNKNOWN'\n
if has_unknown_result or edit_kw[\'errors\'] or edit_kw[\'failures\']:\n
status = \'FAIL\'\n
else:\n
status = \'PASS\'\n
test_result.edit(string_index=status, **edit_kw)\n
test_result.activate().TestResult_afterComplete()\n
elif test_result.getPortalType() == \'Test Result Line\':\n
all_tests = kw.get(\'test_count\')\n
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment