From 7908e86e353cd40ffb725d4aafe1932d688c0fe8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Jun 2025 20:19:06 -0600 Subject: [PATCH] [util/test-shape] Only output one line per test If a shape call was failing, perhaps because of --verify failing, hb-shape was producing multiple lines possibly, making the test runner get out of sync and fail all following tests. https://github.com/harfbuzz/harfruzz/issues/60 --- test/shape/run-tests.py | 6 +++--- util/shape-consumer.hh | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/shape/run-tests.py b/test/shape/run-tests.py index 6889e183d..ccd433c11 100755 --- a/test/shape/run-tests.py +++ b/test/shape/run-tests.py @@ -30,7 +30,7 @@ def open_shape_batch_process(): cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, - stderr=sys.stdout, + stderr=subprocess.PIPE, env=env, ) return [process] @@ -47,6 +47,7 @@ def shape_cmd(command, shape_process, verbose=False): if shape_process[0].poll() is not None: shape_process[0].stdin.close() shape_process[0].stdout.close() + shape_process[0].stderr.close() shape_process[0] = open_shape_batch_process()[0] if verbose: @@ -281,8 +282,7 @@ for filename in args: if glyphs_expected != "*": extra_options.append("--verify") - if shaper == "ot": - extra_options.append("--unsafe-to-concat") + extra_options.append("--unsafe-to-concat") if verbose: print( diff --git a/util/shape-consumer.hh b/util/shape-consumer.hh index 15c193fe3..f97fd5f6d 100644 --- a/util/shape-consumer.hh +++ b/util/shape-consumer.hh @@ -70,10 +70,7 @@ struct shape_consumer_t : shape_options_t { failed = true; output.error (error); - if (hb_buffer_get_content_type (buffer) == HB_BUFFER_CONTENT_TYPE_GLYPHS) - break; - else - return true; + return true; } }