From ac64e6d807586b966752fa4d120e1ef801580206 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 2 Oct 2023 07:24:47 -0500 Subject: [PATCH] Fix tests that use skip_if --- tests/run-tests.py | 4 +++- tests/{ => testlib}/skip_if.py | 0 2 files changed, 3 insertions(+), 1 deletion(-) rename tests/{ => testlib}/skip_if.py (100%) diff --git a/tests/run-tests.py b/tests/run-tests.py index afab133238..86b2fe5457 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -712,9 +712,11 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): with open(test_file_expected, "rb") as f: output_expected = f.read() else: + # CIRCUITPY: set language & make sure testlib is available for `skip_ok`. + e = {"PYTHONPATH": "testlib", "PATH": os.environ["PATH"], "LANG": "en_US.UTF-8"} # run CPython to work out expected output try: - output_expected = subprocess.check_output(CPYTHON3_CMD + [test_file]) + output_expected = subprocess.check_output(CPYTHON3_CMD + [test_file], env=e) if args.write_exp: with open(test_file_expected, "wb") as f: f.write(output_expected) diff --git a/tests/skip_if.py b/tests/testlib/skip_if.py similarity index 100% rename from tests/skip_if.py rename to tests/testlib/skip_if.py