]> xenbits.xensource.com Git - libvirt.git/commitdiff
cputest: Make sure generated files pass syntax-check
authorJiri Denemark <jdenemar@redhat.com>
Wed, 27 Feb 2019 08:43:23 +0000 (09:43 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 5 Mar 2019 13:38:03 +0000 (14:38 +0100)
The tests/cputestdata/cpu-parse.sh would produce JSON files with QEMU
replies which wouldn't pass syntax-check. Let's fix this by not emitting
an extra new line after reformatting the JSON file.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/cputestdata/cpu-reformat.py

index 2c7bbde262648ad58119c63dce2ee78822680c91..fcc6b8ab414e56cff8e52a7e32643ad2bbdccffe 100755 (executable)
@@ -6,4 +6,4 @@ import json
 dec = json.JSONDecoder()
 data, pos = dec.raw_decode(sys.stdin.read())
 json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
-print("\n")
+print("")