diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/scripts/with_crash_on_timeout.py | |
parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) | |
download | ydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/scripts/with_crash_on_timeout.py')
-rw-r--r-- | build/scripts/with_crash_on_timeout.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/scripts/with_crash_on_timeout.py b/build/scripts/with_crash_on_timeout.py new file mode 100644 index 0000000000..bde864ed29 --- /dev/null +++ b/build/scripts/with_crash_on_timeout.py @@ -0,0 +1,22 @@ +# TODO prettyboy remove after ya-bin release + +import os +import sys +import subprocess +import json + + +def main(args): + meta_path = os.path.abspath(args[0]) + timeout_code = int(args[1]) + subprocess.check_call(args[2:]) + with open(meta_path) as f: + meta_info = json.loads(f.read()) + if meta_info["exit_code"] == timeout_code: + print >> sys.stderr, meta_info["project"], 'crashed by timeout, use --test-disable-timeout option' + return 1 + return 0 + + +if __name__ == '__main__': + main(sys.argv[1:]) |