Merge pull request #3103 from harfbuzz/test-reference
[test] Remove unused shaping tests reference mode
This commit is contained in:
commit
75f314c471
|
@ -11,11 +11,6 @@ def cmd(command):
|
||||||
|
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
reference = False
|
|
||||||
if len (args) and args[0] == "--reference":
|
|
||||||
reference = True
|
|
||||||
args = args[1:]
|
|
||||||
|
|
||||||
have_freetype = bool(int(os.getenv ('HAVE_FREETYPE', '1')))
|
have_freetype = bool(int(os.getenv ('HAVE_FREETYPE', '1')))
|
||||||
|
|
||||||
if not args or args[0].find('hb-shape') == -1 or not os.path.exists (args[0]):
|
if not args or args[0].find('hb-shape') == -1 or not os.path.exists (args[0]):
|
||||||
|
@ -35,7 +30,6 @@ if not len (args):
|
||||||
args = ['-']
|
args = ['-']
|
||||||
|
|
||||||
for filename in args:
|
for filename in args:
|
||||||
if not reference:
|
|
||||||
if filename == '-':
|
if filename == '-':
|
||||||
print ("Running tests from standard input")
|
print ("Running tests from standard input")
|
||||||
else:
|
else:
|
||||||
|
@ -53,7 +47,6 @@ for filename in args:
|
||||||
line = line[1:]
|
line = line[1:]
|
||||||
|
|
||||||
if line.startswith (' '):
|
if line.startswith (' '):
|
||||||
if not reference:
|
|
||||||
print ("#%s" % line)
|
print ("#%s" % line)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -91,7 +84,6 @@ for filename in args:
|
||||||
extra_options.append("--verify")
|
extra_options.append("--verify")
|
||||||
|
|
||||||
if comment:
|
if comment:
|
||||||
if not reference:
|
|
||||||
print ('# %s "%s" --unicodes %s' % (hb_shape, fontfile, unicodes))
|
print ('# %s "%s" --unicodes %s' % (hb_shape, fontfile, unicodes))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -112,10 +104,6 @@ for filename in args:
|
||||||
else:
|
else:
|
||||||
passes += 1
|
passes += 1
|
||||||
|
|
||||||
if reference:
|
|
||||||
print (":".join ([fontfile, " ".join(options), unicodes, glyphs1]))
|
|
||||||
continue
|
|
||||||
|
|
||||||
if glyphs1.strip() != glyphs_expected and glyphs_expected != '*':
|
if glyphs1.strip() != glyphs_expected and glyphs_expected != '*':
|
||||||
print ("Actual: " + glyphs1, file=sys.stderr)
|
print ("Actual: " + glyphs1, file=sys.stderr)
|
||||||
print ("Expected: " + glyphs_expected, file=sys.stderr)
|
print ("Expected: " + glyphs_expected, file=sys.stderr)
|
||||||
|
@ -123,11 +111,10 @@ for filename in args:
|
||||||
else:
|
else:
|
||||||
passes += 1
|
passes += 1
|
||||||
|
|
||||||
if not reference:
|
print ("%d tests passed; %d failed; %d skipped." % (passes, fails, skips), file=sys.stderr)
|
||||||
print ("%d tests passed; %d failed; %d skipped." % (passes, fails, skips), file=sys.stderr)
|
if not (fails + passes):
|
||||||
if not (fails + passes):
|
|
||||||
print ("No tests ran.")
|
print ("No tests ran.")
|
||||||
elif not (fails + skips):
|
elif not (fails + skips):
|
||||||
print ("All tests passed.")
|
print ("All tests passed.")
|
||||||
|
|
||||||
if fails:
|
if fails:
|
||||||
|
|
Loading…
Reference in New Issue