[KERNEL][TEST][API] Implement image comparsion

git-svn-id: svn://kolibrios.org@9257 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-11-05 12:25:50 +00:00
parent b3fb622ac5
commit 41f68b6632

View File

@ -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")