diff options
| author | Nabih Estefan <nabihestefan@google.com> | 2025-02-27 18:04:54 +0000 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-06 12:44:46 +0100 |
| commit | cff666a3aee566889fcc1ab7167ca0a727af7167 (patch) | |
| tree | 32d6649a69abf2bbdd4c2d88175f434509a82b3d /scripts/meson-buildoptions.py | |
| parent | 41494da7df8d28eb75eac4799f4b49061fbbf64c (diff) | |
| download | focaccia-qemu-cff666a3aee566889fcc1ab7167ca0a727af7167.tar.gz focaccia-qemu-cff666a3aee566889fcc1ab7167ca0a727af7167.zip | |
scripts: dump stdin on meson-buildoptions error
Dump sys.stdin when it errors on meson-buildoptions.py, letting us debug the build errors instead of just saying "Couldn't parse" Signed-off-by: Nabih Estefan <nabihestefan@google.com> Signed-off-by: Patrick Venture <venture@google.com> Link: https://lore.kernel.org/r/20250227180454.2006757-1-venture@google.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts/meson-buildoptions.py')
| -rw-r--r-- | scripts/meson-buildoptions.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/meson-buildoptions.py b/scripts/meson-buildoptions.py index 4814a8ff61..a3e22471b2 100644 --- a/scripts/meson-buildoptions.py +++ b/scripts/meson-buildoptions.py @@ -241,8 +241,14 @@ def print_parse(options): print(" esac") print("}") - -options = load_options(json.load(sys.stdin)) +json_data = sys.stdin.read() +try: + options = load_options(json.loads(json_data)) +except: + print("Failure in scripts/meson-buildoptions.py parsing stdin as json", + file=sys.stderr) + print(json_data, file=sys.stderr) + sys.exit(1) print("# This file is generated by meson-buildoptions.py, do not edit!") print_help(options) print_parse(options) |