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

Unified Diff: client/common_lib/test.py

Issue 6598041: Merge remote branch 'autotest-upstream/master' into merge-upstream (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: patch Created 9 years, 10 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 | client/common_lib/test_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/common_lib/test.py
diff --git a/client/common_lib/test.py b/client/common_lib/test.py
index 310b45dc17695610dfedef52b7744e1e4262bf42..0527ac0055f4452762b1864074141bc7172f31c9 100644
--- a/client/common_lib/test.py
+++ b/client/common_lib/test.py
@@ -200,22 +200,25 @@ class base_test(object):
for hook in self.before_iteration_hooks:
hook(self)
- if profile_only:
- if not self.job.profilers.present():
- self.job.record('WARN', None, None, 'No profilers have been '
- 'added but profile_only is set - nothing '
- 'will be run')
- self.run_once_profiling(postprocess_profiled_run, *args, **dargs)
- else:
- self.before_run_once()
- self.run_once(*args, **dargs)
- self.after_run_once()
-
- for hook in self.after_iteration_hooks:
- hook(self)
+ try:
+ if profile_only:
+ if not self.job.profilers.present():
+ self.job.record('WARN', None, None,
+ 'No profilers have been added but '
+ 'profile_only is set - nothing '
+ 'will be run')
+ self.run_once_profiling(postprocess_profiled_run,
+ *args, **dargs)
+ else:
+ self.before_run_once()
+ self.run_once(*args, **dargs)
+ self.after_run_once()
- self.postprocess_iteration()
- self.analyze_perf_constraints(constraints)
+ self.postprocess_iteration()
+ self.analyze_perf_constraints(constraints)
+ finally:
+ for hook in self.after_iteration_hooks:
+ hook(self)
def execute(self, iterations=None, test_length=None, profile_only=None,
« no previous file with comments | « no previous file | client/common_lib/test_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698