1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-05 09:20:04 +00:00
dart-sdk/tools/run_with_coredumps_enabled.py
Martin Kustermann 7abf6bfab7 [gardening] Add coredump archiving support to iso-stress builder.
This is an attempt to enable archiving of coredumps on the
"iso-stress" builder, since we're often unable to reproduce crashes from
that builder.

Issue https://github.com/dart-lang/sdk/issues/46823

TEST=Adds test infra.

Change-Id: I9b7276198db9a6c98a74f55d466bf832b03e24f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214407
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-10-04 08:49:28 +00:00

27 lines
627 B
Python
Executable File

#!/usr/bin/env python3
# Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
from contextlib import ExitStack
import subprocess
import sys
import utils
def Main():
args = sys.argv[1:]
with ExitStack() as stack:
for ctx in utils.CoreDumpArchiver(args):
stack.enter_context(ctx)
exit_code = subprocess.call(args)
utils.DiagnoseExitCode(exit_code, args)
return exit_code
if __name__ == '__main__':
sys.exit(Main())