Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: client/site_tests/factory_Review/factory_Review.py

Issue 3119043: Provide detail error messages for automated sequence tests (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/factory_Review/factory_Review.py
diff --git a/client/site_tests/factory_Review/factory_Review.py b/client/site_tests/factory_Review/factory_Review.py
index 0cbb191caa748466e841c1ad91c041336f5cf5a5..e4effe45ed3dfff6781b79d7a402da3787688419 100644
--- a/client/site_tests/factory_Review/factory_Review.py
+++ b/client/site_tests/factory_Review/factory_Review.py
@@ -55,9 +55,22 @@ class factory_Review(test.test):
'PASSED=%d\t' % len(passed) +
'FAILED=%d' % len(failed))
- failed_msgs_map = [(t, status_map.lookup_error_msg(t)) for t in failed]
- failure_report_list = ['%s : %s' % (t.label_en, e)
- for t, e in failed_msgs_map]
+ # decompose automated sequence tests
+ failure_report_list =[]
+ for t in failed:
+ t_name = t.label_en
+ if not isinstance(t, factory.AutomatedSequence):
+ # Simple Test
+ err_msg = status_map.lookup_error_msg(t)
+ failure_report_list.append('%s: %s' % (t_name, err_msg))
+ continue
+ # Complex Test
+ for subtest in t.subtest_list:
+ if status_map.lookup_status(subtest) != ful.FAILED:
+ continue
+ err_msg = status_map.lookup_error_msg(subtest)
+ failure_report_list.append(
+ '%s: (%s) %s' % (t_name, subtest.label_en, err_msg))
failure_report = ful.make_label('\n'.join(failure_report_list))
vbox = gtk.VBox()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698