diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml index 0f44ca7f3a..d7e6fd8a68 100644 --- a/.github/workflows/runtime.yml +++ b/.github/workflows/runtime.yml @@ -27,6 +27,7 @@ on: - "tools/cf_diff.py" - "tools/cf_ref.py" - "tools/cfg_structure.py" + - "tools/conformance/**" - "tools/cpu_ref.py" - "tools/f32_fuzz.py" - "tools/file_mode.py" @@ -78,6 +79,7 @@ on: - "tools/cf_diff.py" - "tools/cf_ref.py" - "tools/cfg_structure.py" + - "tools/conformance/**" - "tools/cpu_ref.py" - "tools/f32_fuzz.py" - "tools/file_mode.py" diff --git a/scripts/check_compute_journal_overlay.py b/scripts/check_compute_journal_overlay.py index c346436f9a..4ea23f84c0 100644 --- a/scripts/check_compute_journal_overlay.py +++ b/scripts/check_compute_journal_overlay.py @@ -11,6 +11,7 @@ import re import shutil import subprocess +import sys import tempfile import time @@ -95,6 +96,10 @@ def run(exe, root, device, strict): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("executable", type=Path, help="built d3d12_compute_journal_test.exe") parser.add_argument("--device", help="optional LEONIDA_VK_DEVICE selector") diff --git a/scripts/compute_workers_win.py b/scripts/compute_workers_win.py index 04eab8adb3..1ab6915ca6 100644 --- a/scripts/compute_workers_win.py +++ b/scripts/compute_workers_win.py @@ -185,6 +185,10 @@ def child(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass if sys.argv[1:] != ["--shard"]: raise SystemExit(2) child() diff --git a/scripts/corpus_watch.py b/scripts/corpus_watch.py index 8d12ea69f7..a09bf8ab9b 100644 --- a/scripts/corpus_watch.py +++ b/scripts/corpus_watch.py @@ -192,4 +192,8 @@ def run_once(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main()) diff --git a/tests/test_runner_calls_all_tests.py b/tests/test_runner_calls_all_tests.py index 4a0317f89d..b582c1e9ad 100644 --- a/tests/test_runner_calls_all_tests.py +++ b/tests/test_runner_calls_all_tests.py @@ -50,6 +50,7 @@ "test_a_failed_check_fails_only_its_own_test", "test_out_via_directory_alias_into_corpus_is_a_usage_error", "test_out_hard_link_to_carved_index_is_a_usage_error", + "test_out_named_like_the_optional_spirv_index", }, } diff --git a/tools/compute_heap_layout_census.py b/tools/compute_heap_layout_census.py index 1bc8967d83..bd34471815 100644 --- a/tools/compute_heap_layout_census.py +++ b/tools/compute_heap_layout_census.py @@ -152,6 +152,10 @@ def census(disasm, captured, per_program=False): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("disasm", type=Path) parser.add_argument("--dispatch-log", action="append", default=[], type=Path) diff --git a/tools/game_run_summary.py b/tools/game_run_summary.py index 7dbec9c91b..796e4cba79 100644 --- a/tools/game_run_summary.py +++ b/tools/game_run_summary.py @@ -222,4 +222,8 @@ def main(argv=None) -> int: if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main()) diff --git a/tools/stage_timeline.py b/tools/stage_timeline.py index 9b37373f10..b54d81f8bc 100644 --- a/tools/stage_timeline.py +++ b/tools/stage_timeline.py @@ -97,4 +97,8 @@ def main(): if __name__ == "__main__": + try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode + sys.stdout.reconfigure(errors="replace") + except (AttributeError, ValueError, OSError): + pass sys.exit(main())