From 12b908c659843351b2112633b6b6024c82575b04 Mon Sep 17 00:00:00 2001 From: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:10:13 -0400 Subject: [PATCH] Fix the fetch of all example tests (#24864) --- .circleci/create_circleci_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index 63894cddd1..8632723863 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -581,13 +581,13 @@ def create_circleci_config(folder=None): example_file = os.path.join(folder, "examples_test_list.txt") if os.path.exists(example_file) and os.path.getsize(example_file) > 0: with open(example_file, "r", encoding="utf-8") as f: - example_tests = f.read().split(" ") + example_tests = f.read() for job in EXAMPLES_TESTS: framework = job.name.replace("examples_", "").replace("torch", "pytorch") if example_tests == "all": job.tests_to_run = [f"examples/{framework}"] else: - job.tests_to_run = [f for f in example_tests if f.startswith(f"examples/{framework}")] + job.tests_to_run = [f for f in example_tests.split(" ") if f.startswith(f"examples/{framework}")] if len(job.tests_to_run) > 0: jobs.append(job)