[test/subset] Don't hash files without reason

Fixes https://github.com/harfbuzz/harfbuzz/issues/3118#issuecomment-894021518
pull/3431/head
Behdad Esfahbod 3 years ago
parent 42b119edb5
commit b3f8288cca
  1. 7
      test/subset/run-tests.py

@ -11,7 +11,6 @@ import sys
import tempfile
import shutil
import io
import hashlib
from subset_test_suite import SubsetTestSuite
@ -63,11 +62,11 @@ def run_test (test, should_check_ots):
expected_file = os.path.join (test_suite.get_output_directory (), test.get_font_name ())
with open (expected_file, "rb") as fp:
expected_hash = hashlib.sha224(fp.read()).hexdigest()
expected_contents = fp.read()
with open (out_file, "rb") as fp:
actual_hash = hashlib.sha224(fp.read()).hexdigest()
actual_contents = fp.read()
if expected_hash == actual_hash:
if expected_contents == actual_contents:
if should_check_ots:
print ("Checking output with ots-sanitize.")
if not check_ots (out_file):

Loading…
Cancel
Save