From bbdb19deaf291b2334d8954ab8360c41bf1f053d Mon Sep 17 00:00:00 2001
From: Neta Zmora <neta.zmora@intel.com>
Date: Thu, 8 Aug 2019 00:56:32 +0300
Subject: [PATCH] full_flow_tests.py: relax verification of sensitivity.png

---
 tests/full_flow_tests.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/full_flow_tests.py b/tests/full_flow_tests.py
index 20d19df..0a5d2da 100755
--- a/tests/full_flow_tests.py
+++ b/tests/full_flow_tests.py
@@ -102,10 +102,13 @@ def collateral_checker(log, run_dir, *collateral_list):
         0: file name
         1: expected file size
     """
+    def relaxed_size_equal(a, b, relaxation):
+        return True if abs(a-b) <= relaxation else False
+
     for collateral in collateral_list:
         file_path = os.path.join(run_dir, collateral[0])
         statinfo = os.stat(file_path)
-        if statinfo.st_size != collateral[1]:
+        if not relaxed_size_equal(statinfo.st_size, collateral[1], 2):
             return False
     return True
 
-- 
GitLab