Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions python/pytest/pytest_runner.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Bazel adapter for Pytest."""

import os
import pathlib
import sys

import pytest
Expand All @@ -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",
Expand Down