Skip to content

Commit ed94f30

Browse files
craig[bot]xw19
andcommitted
Merge #151646
151646: dev: Adding cpus will set jobs r=rickystewart a=xw19 Adding `--cpus` will also set `--jobs` Closes #138989 Release note: none Epic: none Co-authored-by: Sourav Moitra <[email protected]>
2 parents 101352f + ca78497 commit ed94f30

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

pkg/cmd/dev/testdata/datadriven/bench

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ exec
2626
dev bench pkg/spanconfig/spanconfigkvsubscriber -f=BenchmarkSpanConfigDecoder --cpus=10 --ignore-cache=false -v --timeout=50s
2727
----
2828
echo $HOME/.cache
29-
bazel test --local_cpu_resources=10 --test_timeout=50 pkg/spanconfig/spanconfigkvsubscriber:all --test_arg -test.run=- --test_arg -test.bench=BenchmarkSpanConfigDecoder --test_sharding_strategy=disabled --test_arg -test.cpu --test_arg 1 --test_arg -test.v --test_arg -test.benchmem --crdb_test_off --crdb_bench --test_env COCKROACH_TEST_FIXTURES_DIR=crdb-mock-test-fixtures/crdb-test-fixtures --sandbox_writable_path=crdb-mock-test-fixtures/crdb-test-fixtures --test_output streamed
29+
bazel test --local_cpu_resources=10 --jobs=10 --test_timeout=50 pkg/spanconfig/spanconfigkvsubscriber:all --test_arg -test.run=- --test_arg -test.bench=BenchmarkSpanConfigDecoder --test_sharding_strategy=disabled --test_arg -test.cpu --test_arg 1 --test_arg -test.v --test_arg -test.benchmem --crdb_test_off --crdb_bench --test_env COCKROACH_TEST_FIXTURES_DIR=crdb-mock-test-fixtures/crdb-test-fixtures --sandbox_writable_path=crdb-mock-test-fixtures/crdb-test-fixtures --test_output streamed
3030

3131
exec
3232
dev bench pkg/bench -f='BenchmarkTracing/1node/scan/trace=off' --test-args '-test.memprofile=mem.out -test.cpuprofile=cpu.out'

pkg/cmd/dev/testdata/datadriven/dev-build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cp sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkou
1313
exec
1414
dev build cockroach-short --cpus=12
1515
----
16-
bazel build --local_cpu_resources=12 //pkg/cmd/cockroach-short:cockroach-short --build_event_binary_file=/tmp/path
16+
bazel build --local_cpu_resources=12 --jobs=12 //pkg/cmd/cockroach-short:cockroach-short --build_event_binary_file=/tmp/path
1717
bazel info workspace --color=no
1818
mkdir crdb-checkout/bin
1919
bazel info bazel-bin --color=no

pkg/cmd/dev/testdata/datadriven/testlogic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ bazel info workspace --color=no
5959
bazel info workspace --color=no
6060
bazel run pkg/cmd/generate-logictest -- -out-dir=crdb-checkout
6161
bazel run //pkg/gen:schemachanger
62-
bazel test //pkg/sql/logictest/tests/... --test_env=GOTRACEBACK=all --local_cpu_resources=8 --test_arg -show-sql --test_timeout=60 --test_env=COCKROACH_STRESS=true --notest_keep_going --runs_per_test=500 --test_filter auto_span_config_reconciliation/ --test_sharding_strategy=disabled --test_output errors
62+
bazel test //pkg/sql/logictest/tests/... --test_env=GOTRACEBACK=all --local_cpu_resources=8 --jobs=8 --test_arg -show-sql --test_timeout=60 --test_env=COCKROACH_STRESS=true --notest_keep_going --runs_per_test=500 --test_filter auto_span_config_reconciliation/ --test_sharding_strategy=disabled --test_output errors
6363

6464
exec
6565
dev testlogic base --files=auto_span_config_reconciliation --stress

pkg/cmd/dev/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ func (d *dev) getMergeBaseHash(ctx context.Context) (string, error) {
265265
func addCommonBazelArguments(args *[]string) {
266266
if numCPUs != 0 {
267267
*args = append(*args, fmt.Sprintf("--local_cpu_resources=%d", numCPUs))
268+
*args = append(*args, fmt.Sprintf("--jobs=%d", numCPUs))
268269
}
269270
if pgoEnabled {
270271
*args = append(*args, "--config=pgo")

0 commit comments

Comments
 (0)