From 1c02175149345f47e05ecca2b56bece81909e7dd Mon Sep 17 00:00:00 2001 From: Yuval Kaplan Date: Mon, 31 Jul 2023 17:44:44 +0300 Subject: [PATCH] Touch TEST_SHARD_STATUS_FILE in pytest wrapper. --- python/pytest/pytest_runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/pytest/pytest_runner.py b/python/pytest/pytest_runner.py index 4a0c544b..0fe0be74 100644 --- a/python/pytest/pytest_runner.py +++ b/python/pytest/pytest_runner.py @@ -1,6 +1,7 @@ """Bazel adapter for Pytest.""" import os +import pathlib import sys import pytest @@ -12,7 +13,10 @@ # Support `shard_count` on test targets. test_total_shards = os.environ.get("TEST_TOTAL_SHARDS") test_shard_index = os.environ.get("TEST_SHARD_INDEX") + test_shard_status_file = os.environ.get("TEST_SHARD_STATUS_FILE") if test_total_shards: + if test_shard_status_file: + pathlib.Path(test_shard_status_file).touch() extra_args.extend( [ "--num-shards",