bazelbuild / bazelbuild/bazel

Allow _test targets to specify it cannot be run with itself in parallel

Open
#11,784 10 comments 2 reactions 0 assignees View on GitHub
not stale P3 team-Local-Exec type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

Currently using the feature --runs_per_test arg to run all tests multiple times. Many tests are not safe to be run concurrently. The tag "exclusive" guarantees a given test runs with no other tests but this causes testing times to be really slow. Really I just want to specify that a given test can't be run with itself concurrently. It can run at the same time as other tests, just not at the same time as itself.

### Feature requests: what underlying problem are you trying to solve with this feature?

Could another tag be added "self_exclusive" or something that stops single test from being executed concurrently with itself but still concurrently with other tests

### What operating system are you running Bazel on?

Ubuntu 16.04

### What's the output of `bazel info release`?

release 0.23.2

### Have you found anything relevant by searching the web?

Something similarish here: https://github.com/bazelbuild/bazel/issues/2525 . This fixes bug that would've affected us but doesn't quite address our use case.

Contributor guide

Open the contributing guide

Research direction

Start with the --runs_per_test behavior and the existing exclusive test tag, then compare the related behavior described in issue #2525. Done means a test can prevent concurrent executions of itself while still running concurrently with other tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.