mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
41494da7df
commit
cff666a3ae
1 changed files with 8 additions and 2 deletions
|
@ -241,8 +241,14 @@ def print_parse(options):
|
||||||
print(" esac")
|
print(" esac")
|
||||||
print("}")
|
print("}")
|
||||||
|
|
||||||
|
json_data = sys.stdin.read()
|
||||||
options = load_options(json.load(sys.stdin))
|
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("# This file is generated by meson-buildoptions.py, do not edit!")
|
||||||
print_help(options)
|
print_help(options)
|
||||||
print_parse(options)
|
print_parse(options)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue