From 10cff577d673ba0aaf60db9b5b64e8a13449a930 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Mar 2024 16:25:52 +0530 Subject: [PATCH] Also get a backtrace when generating go code segfaults on CI --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index e66fe7580..6d35b96cd 100755 --- a/setup.py +++ b/setup.py @@ -1069,6 +1069,8 @@ def update_go_generated_files(args: Options, kitty_exe: str) -> None: env['ASAN_OPTIONS'] = 'detect_leaks=0' cp = subprocess.run([kitty_exe, '+launch', os.path.join(src_base, 'gen/go_code.py')], stdout=subprocess.DEVNULL, env=env) if cp.returncode != 0: + if os.environ.get('CI') == 'true' and cp.returncode < 0 and shutil.which('coredumpctl'): + subprocess.run(['sh', '-c', 'echo bt | coredumpctl debug']) raise SystemExit(f'Generating go code failed with exit code: {cp.returncode}')