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",