aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry <dimitry@ethereum.org>2018-09-26 00:01:16 +0800
committerDimitry <dimitry@ethereum.org>2018-09-26 00:01:16 +0800
commitf64ad24d3a86d4d093aea6b3974baecd0adc10ae (patch)
tree0660574ac17111ac27262a2d11851a1091df5757
parent7b4c4347eaefafc40a9b85b055a02e94b9bb5681 (diff)
downloaddexon-tests-f64ad24d3a86d4d093aea6b3974baecd0adc10ae.tar.gz
dexon-tests-f64ad24d3a86d4d093aea6b3974baecd0adc10ae.tar.zst
dexon-tests-f64ad24d3a86d4d093aea6b3974baecd0adc10ae.zip
change filler hash calculation for travis
-rwxr-xr-xtest.py5
1 files 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
# ====