Chromium Code Reviews| Index: tools/bots/fletch.py |
| diff --git a/tools/bots/fletch.py b/tools/bots/fletch.py |
| index abc361de0e09119f91790319d7e026e17baefc51..ef4142729c4a75fbfb59a1d68c0ae3e51af5ce79 100644 |
| --- a/tools/bots/fletch.py |
| +++ b/tools/bots/fletch.py |
| @@ -222,6 +222,7 @@ def StepsTargetRunner(debug_log, system, mode, arch): |
| for snapshot_run in [True, False]: |
| for configuration in configurations: |
| if not ShouldSkipConfiguration(snapshot_run, configuration): |
| + build_conf = configuration['build_conf'] |
| build_dir = configuration['build_dir'] |
| # Sanity check we got build artifacts which we expect. |
| @@ -234,15 +235,18 @@ def StepsTargetRunner(debug_log, system, mode, arch): |
| shutil.copyfile(dart_arm, destination) |
| shutil.copymode(dart_arm, destination) |
| - StepTest( |
| - configuration['build_conf'], |
| - configuration['mode'], |
| - configuration['arch'], |
| - clang=configuration['clang'], |
| - asan=configuration['asan'], |
| - snapshot_run=snapshot_run, |
| - debug_log=debug_log, |
| - configuration=configuration) |
| + def run(): |
| + StepTest( |
| + build_conf, |
| + configuration['mode'], |
| + configuration['arch'], |
| + clang=configuration['clang'], |
| + asan=configuration['asan'], |
| + snapshot_run=snapshot_run, |
| + debug_log=debug_log, |
| + configuration=configuration) |
| + |
| + RunWithCoreDumpArchiving(run, build_dir, build_conf) |
| finally: |
| if os.path.exists(tarball): |
| os.remove(tarball) |
| @@ -407,9 +411,12 @@ class CoredumpArchiver(object): |
| self._conf = conf |
| def __enter__(self): |
| - # TODO(kustermann): Assert that the core pattern is correctly set (at least |
| - # on linux) |
| - pass |
| + if utils.GuessOS() == 'linux': |
| + core_pattern = open('/proc/sys/kernel/core_pattern').read() |
| + core_pattern_uses_pid = open('/proc/sys/kernel/core_uses_pid').read() |
| + |
| + assert core_pattern == 'core' |
|
kustermann
2015/08/25 09:08:25
I'm aware that the pattern could be made to includ
kustermann
2015/08/25 11:14:48
Also account for the newline in the file now.
|
| + assert core_pattern_uses_pid == '1' |
|
ricow1
2015/08/25 09:10:09
should we gracefully fail here, and just tell peop
kustermann
2015/08/25 11:14:48
I thought about it as well, but
* users are not ru
|
| def __exit__(self, *_): |
| coredumps = self._find_coredumps() |