[libvirt] [PATCH 01/26] cputest: Make sure generated files pass syntax-check

Jiri Denemark posted 26 patches 6 years, 11 months ago
There is a newer version of this series
[libvirt] [PATCH 01/26] cputest: Make sure generated files pass syntax-check
Posted by Jiri Denemark 6 years, 11 months ago
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>
---
 tests/cputestdata/cpu-reformat.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/cputestdata/cpu-reformat.py b/tests/cputestdata/cpu-reformat.py
index 2c7bbde262..fcc6b8ab41 100755
--- a/tests/cputestdata/cpu-reformat.py
+++ b/tests/cputestdata/cpu-reformat.py
@@ -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("")
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 01/26] cputest: Make sure generated files pass syntax-check
Posted by Ján Tomko 6 years, 11 months ago
On Wed, Feb 27, 2019 at 02:28:51PM +0100, Jiri Denemark wrote:
>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>
>---
> tests/cputestdata/cpu-reformat.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list