From f64ad24d3a86d4d093aea6b3974baecd0adc10ae Mon Sep 17 00:00:00 2001 From: Dimitry Date: Tue, 25 Sep 2018 19:01:16 +0300 Subject: change filler hash calculation for travis --- test.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index 1938c06c9..ff4bbdd38 100755 --- a/test.py +++ b/test.py @@ -133,7 +133,8 @@ def validateTestFile(testFile): def hashFile(fname): with open(fname ,"rb") as f: k = sha3.keccak_256() - k.update(f.read()) + s = json.dumps(json.load(f), separators=(',', ':')) + k.update(s.encode('utf-8')) return k.hexdigest() def checkFilled(jsonFile): @@ -152,7 +153,7 @@ def checkFilled(jsonFile): fillerSource = jsonTest[test]["_info"]["source"] fillerHash = jsonTest[test]["_info"]["sourceHash"] if fillerHash != hashFile(fillerSource): - _logerror("Test must be filled:", jsonFile) + _logerror("Filler hash is different:", jsonFile) # Main # ==== -- cgit v1.2.3