From 41f68b6632b825792afdcc1c40a6f326855e010e Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Fri, 5 Nov 2021 12:25:50 +0000 Subject: [PATCH] [KERNEL][TEST][API] Implement image comparsion git-svn-id: svn://kolibrios.org@9257 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/test/common/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/trunk/test/common/__init__.py b/kernel/trunk/test/common/__init__.py index e2b2018478..5e75fda6bf 100644 --- a/kernel/trunk/test/common/__init__.py +++ b/kernel/trunk/test/common/__init__.py @@ -74,6 +74,11 @@ class Qemu: self.monitor_in.write(bytes(command + "\n", "utf-8")) self.monitor_in.flush() + def images_diff(self, i0, i1, expect=True): + diff = bool(os.system(f"perceptualdiff {i0} {i1} > /dev/null")) + if diff != expect: + self.failure() + def run(): if os.path.exists("debug.log"): os.remove("debug.log")