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

Side by Side Diff: client/bin/test.py

Issue 6557003: Modify autotest to support preserving minidumps generated during tests. (Closed) Base URL: http://git.chromium.org/git/autotest.git@master
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | client/cros/crash_test.py » ('j') | client/cros/crash_test.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright Martin J. Bligh, Andy Whitcroft, 2006 1 # Copyright Martin J. Bligh, Andy Whitcroft, 2006
2 # 2 #
3 # Shell class for a test, inherited by all individual tests 3 # Shell class for a test, inherited by all individual tests
4 # 4 #
5 # Methods: 5 # Methods:
6 # __init__ initialise 6 # __init__ initialise
7 # initialize run once for each job 7 # initialize run once for each job
8 # setup run once for each new version of the test installed 8 # setup run once for each new version of the test installed
9 # run run the test (wrapped by job.run_test()) 9 # run run the test (wrapped by job.run_test())
10 # 10 #
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 except EnvironmentError: 100 except EnvironmentError:
101 pass 101 pass
102 # Let the user know if core dumps were generated during the test 102 # Let the user know if core dumps were generated during the test
103 core_dirs = glob.glob('%s/crash.*' % self.debugdir) 103 core_dirs = glob.glob('%s/crash.*' % self.debugdir)
104 if core_dirs: 104 if core_dirs:
105 logging.warning('Programs crashed during test execution') 105 logging.warning('Programs crashed during test execution')
106 for dir in core_dirs: 106 for dir in core_dirs:
107 logging.warning('Please verify %s for more info', dir) 107 logging.warning('Please verify %s for more info', dir)
108 108
109 109
110 def _call_run_once(self, constraints, profile_only,
kmixter1 2011/02/23 02:00:39 Eric should comment on this since it's common code
111 postprocess_profiled_run, args, dargs):
112 """
113 The base class does not execute the after_iteration_hooks if a test
114 raises an exception. We want to override that behavior here since our
115 after_iteration_hooks collect important logs and crash information.
116 """
117 try:
118 common_test.base_test._call_run_once(self, constraints,
119 profile_only,
120 postprocess_profiled_run,
121 args, dargs)
122 except:
123 for hook in self.after_iteration_hooks:
ericli 2011/02/23 04:49:34 common_test.base_test._call_run_once() will also c
thieule 2011/03/03 01:27:41 Done.
124 hook(self)
125 raise
126
127
110 def runtest(job, url, tag, args, dargs): 128 def runtest(job, url, tag, args, dargs):
111 common_test.runtest(job, url, tag, args, dargs, locals(), globals(), 129 common_test.runtest(job, url, tag, args, dargs, locals(), globals(),
112 job.sysinfo.log_before_each_test, 130 job.sysinfo.log_before_each_test,
113 job.sysinfo.log_after_each_test, 131 job.sysinfo.log_after_each_test,
114 job.sysinfo.log_before_each_iteration, 132 job.sysinfo.log_before_each_iteration,
115 job.sysinfo.log_after_each_iteration) 133 job.sysinfo.log_after_each_iteration)
OLDNEW
« no previous file with comments | « no previous file | client/cros/crash_test.py » ('j') | client/cros/crash_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698