forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: introduce --test-args for go test binaries
It's useful to be able to pass arguments down to the go test binary directly. This commit introduces a top-level flag to do just that. Now we can do the following sort of thing: dev bench pkg/bench -f='BenchmarkTracing/1node/scan/trace=off' \ --test-args '-test.memprofile=mem.out -test.cpuprofile=cpu.out' Release note: None
- Loading branch information
1 parent
d19063f
commit 63df397
Showing
17 changed files
with
184 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
exec | ||
dev bench pkg/spanconfig/... | ||
---- | ||
bazel test pkg/spanconfig/...:all --test_arg -test.run=- --test_arg -test.bench=. --test_output errors | ||
|
||
exec | ||
dev bench pkg/sql/parser --filter=BenchmarkParse | ||
---- | ||
bazel test pkg/sql/parser:all --test_arg -test.run=- --test_arg -test.bench=BenchmarkParse --test_sharding_strategy=disabled --test_output errors | ||
|
||
exec | ||
dev bench pkg/bench -f=BenchmarkTracing/1node/scan/trace=off --count=2 --bench-time=10x --bench-mem | ||
---- | ||
bazel test pkg/bench:all --test_arg -test.run=- --test_arg -test.bench=BenchmarkTracing/1node/scan/trace=off --test_sharding_strategy=disabled --test_arg -test.count=2 --test_arg -test.benchtime=10x --test_arg -test.benchmem --test_output errors | ||
|
||
exec | ||
dev bench pkg/spanconfig/spanconfigkvsubscriber -f=BenchmarkSpanConfigDecoder --cpus=10 --ignore-cache -v --timeout=50s | ||
---- | ||
bazel test --local_cpu_resources=10 --test_timeout=50 pkg/spanconfig/spanconfigkvsubscriber:all --nocache_test_results --test_arg -test.run=- --test_arg -test.bench=BenchmarkSpanConfigDecoder --test_sharding_strategy=disabled --test_arg -test.v --test_output all | ||
|
||
exec | ||
dev bench pkg/bench -f='BenchmarkTracing/1node/scan/trace=off' --test-args '-test.memprofile=mem.out -test.cpuprofile=cpu.out' | ||
---- | ||
bazel info workspace --color=no | ||
bazel test pkg/bench:all --test_arg -test.run=- --test_arg -test.bench=BenchmarkTracing/1node/scan/trace=off --test_sharding_strategy=disabled --test_arg -test.outputdir=crdb-checkout --sandbox_writable_path=crdb-checkout --test_arg -test.memprofile=mem.out --test_arg -test.cpuprofile=cpu.out --test_output errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
exec | ||
dev compose | ||
---- | ||
bazel run //pkg/compose:compose_test --config=test | ||
|
||
exec | ||
dev compose --cpus 12 --short --timeout 1m -f TestComposeCompare | ||
---- | ||
bazel run //pkg/compose:compose_test --config=test --local_cpu_resources=12 --test_filter=TestComposeCompare --test_arg -test.short --test_timeout=60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,68 @@ | ||
exec | ||
dev build cockroach-short --skip-generate | ||
---- | ||
bazel build //pkg/cmd/cockroach-short:cockroach-short | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm cockroach-short | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach-short | ||
rm cockroach | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach | ||
rm crdb-checkout/cockroach-short | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach-short | ||
rm crdb-checkout/cockroach | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach | ||
|
||
exec | ||
dev build cockroach-short --cpus=12 --skip-generate | ||
---- | ||
bazel build --local_cpu_resources=12 //pkg/cmd/cockroach-short:cockroach-short | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm cockroach-short | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach-short | ||
rm cockroach | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach | ||
rm crdb-checkout/cockroach-short | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach-short | ||
rm crdb-checkout/cockroach | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach | ||
|
||
exec | ||
dev build --debug short --skip-generate | ||
---- | ||
bazel build //pkg/cmd/cockroach-short:cockroach-short | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm cockroach-short | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach-short | ||
rm cockroach | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach | ||
rm crdb-checkout/cockroach-short | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach-short | ||
rm crdb-checkout/cockroach | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach | ||
|
||
exec | ||
dev build short --skip-generate -- -s | ||
---- | ||
bazel build //pkg/cmd/cockroach-short:cockroach-short -s | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm cockroach-short | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach-short | ||
rm cockroach | ||
ln -s pkg/cmd/cockroach-short/cockroach-short_/cockroach-short cockroach | ||
rm crdb-checkout/cockroach-short | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach-short | ||
rm crdb-checkout/cockroach | ||
ln -s sandbox/pkg/cmd/cockroach-short/cockroach-short_/cockroach-short crdb-checkout/cockroach | ||
|
||
exec | ||
dev build --skip-generate -- --verbose_failures --sandbox_debug | ||
---- | ||
bazel run @nodejs//:yarn -- --check-files --cwd pkg/ui --offline | ||
bazel build //pkg/cmd/cockroach:cockroach --config=with_ui --verbose_failures --sandbox_debug | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm cockroach | ||
ln -s pkg/cmd/cockroach/cockroach_/cockroach cockroach | ||
rm crdb-checkout/cockroach | ||
ln -s sandbox/pkg/cmd/cockroach/cockroach_/cockroach crdb-checkout/cockroach | ||
|
||
exec | ||
dev build stress --skip-generate | ||
---- | ||
bazel build @com_github_cockroachdb_stress//:stress | ||
bazel info workspace --color=no | ||
mkdir bin | ||
mkdir crdb-checkout/bin | ||
bazel info bazel-bin --color=no | ||
rm bin/stress | ||
ln -s external/com_github_cockroachdb_stress/stress_/stress bin/stress | ||
rm crdb-checkout/bin/stress | ||
ln -s sandbox/external/com_github_cockroachdb_stress/stress_/stress crdb-checkout/bin/stress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
exec | ||
dev gen protobuf | ||
---- | ||
bazel run //pkg/gen:go_proto | ||
|
||
exec | ||
dev gen bazel | ||
---- | ||
bazel info workspace --color=no | ||
build/bazelutil/bazel-generate.sh | ||
crdb-checkout/build/bazelutil/bazel-generate.sh | ||
|
||
exec | ||
dev generate bazel --mirror --force | ||
---- | ||
bazel info workspace --color=no | ||
export COCKROACH_BAZEL_CAN_MIRROR=1 | ||
export COCKROACH_BAZEL_FORCE_GENERATE=1 | ||
build/bazelutil/bazel-generate.sh | ||
crdb-checkout/build/bazelutil/bazel-generate.sh |
Oops, something went wrong.