[Buildroot] [PATCH 4/6] autobuild-run: make diffoscope output to a JSON-formatted file
Atharva Lele
itsatharva at gmail.com
Tue Aug 6 18:12:49 UTC 2019
Normal diffoscope output is readable by humans but not really
convenient when working with it in code. JSON can be easily
read and extracted information from.
Signed-off-by: Atharva Lele <itsatharva at gmail.com>
---
scripts/autobuild-run | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/autobuild-run b/scripts/autobuild-run
index 69766b2..520cfe2 100755
--- a/scripts/autobuild-run
+++ b/scripts/autobuild-run
@@ -453,7 +453,7 @@ class Builder:
prefix = prefix[13:-1]
log_write(self.log, "INFO: running diffoscope on images")
subprocess.call(["diffoscope", build_1_image, build_2_image,
- "--tool-prefix-binutils", prefix], stdout=diff, stderr=self.log)
+ "--tool-prefix-binutils", prefix, "--json", "-"], stdout=diff, stderr=self.log)
else:
log_write(self.log, "INFO: diffoscope not installed, falling back to cmp")
subprocess.call(["cmp", "-b", build_1_image, build_2_image], stdout=diff, stderr=self.log)
--
2.22.0
More information about the buildroot
mailing list