minor, enable printing to stderr in run-tests.py

As was originally intended https://github.com/harfbuzz/harfbuzz/blob/3ce6c7b/test/shaping/run-tests.sh
This commit is contained in:
Ebrahim Byagowi 2020-05-28 23:43:55 +04:30
parent 7554f618ec
commit cd5580e2d6
2 changed files with 6 additions and 6 deletions

View File

@ -123,8 +123,8 @@ for filename in args:
unicodes] + (options.split (' ') if options else []))
if glyphs1[0] != glyphs2[0] and glyphs_expected != '*':
print ("FT funcs: " + glyphs1[0]) # file=sys.stderr
print ("OT funcs: " + glyphs2[0]) # file=sys.stderr
print ("FT funcs: " + glyphs1[0], file=sys.stderr)
print ("OT funcs: " + glyphs2[0], file=sys.stderr)
fails += 1
else:
passes += 1
@ -134,14 +134,14 @@ for filename in args:
continue
if glyphs1[0].strip() != glyphs_expected and glyphs_expected != '*':
print ("Actual: " + glyphs1[0]) # file=sys.stderr
print ("Expected: " + glyphs_expected) # file=sys.stderr
print ("Actual: " + glyphs1[0], file=sys.stderr)
print ("Expected: " + glyphs_expected, file=sys.stderr)
fails += 1
else:
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):
print ("No tests ran.")
elif not (fails + skips):

View File

@ -26,7 +26,7 @@ def cmd (command):
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
universal_newlines=True)
(stdoutdata, stderrdata) = p.communicate ()
print (stderrdata, end="") # file=sys.stderr
print (stderrdata, end="", file=sys.stderr)
return stdoutdata, p.returncode
def read_binary (file_path):