Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
91144: bazel: add dev roachprod-bench-wrapper command r=srosenberg a=herkolategan

Add command roachprod-bench-wrapper to dev. The command will build all the test
binaries for a given set of packages, using Bazel. Any runfiles required by the
binaries will also be staged. Binaries and runfiles are added to a tar in
artifacts and can be optionally compressed. The output is portable without being
dependent on the repository.

Each package is supplied with a run script that will set up environment variables
for Bazel runfiles to be used by the test binary.

Additionally, this builds the binary for a sub command roachprod-bench that will
orchestrate the execution of the binaries. The sub command is also executed by
the roachprod-bench command with specified arguments passed to it.

Resolves: cockroachdb#90837
See also: cockroachdb#90958

Epic: CRDB-20903

Release justification: test-only change.
Release note: None

Co-authored-by: Herko Lategan <herko@cockroachlabs.com>
  • Loading branch information
craig[bot] and herkolategan committed Jan 9, 2023
2 parents 27ebfa8 + 2004b8e commit 6c619e2
Show file tree
Hide file tree
Showing 4 changed files with 430 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/dev/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ go_library(
"lint.go",
"main.go",
"merge_test_xmls.go",
"roachprod_bench.go",
"roachprod_stress.go",
"test.go",
"testlogic.go",
Expand All @@ -33,6 +34,7 @@ go_library(
"//pkg/util/buildutil",
"@com_github_alessio_shellescape//:shellescape",
"@com_github_google_shlex//:shlex",
"@com_github_klauspost_pgzip//:pgzip",
"@com_github_spf13_cobra//:cobra",
],
)
Expand Down Expand Up @@ -73,7 +75,9 @@ disallowed_imports_test(
"//pkg/cmd/dev/io/exec",
"//pkg/cmd/dev/io/os",
"@com_github_alessio_shellescape//:shellescape",
"@com_github_klauspost_compress//flate:flate",
"@com_github_google_shlex//:shlex",
"@com_github_klauspost_pgzip//:pgzip",
"@com_github_irfansharif_recorder//:recorder",
"@com_github_spf13_cobra//:cobra",
"@com_github_spf13_pflag//:pflag",
Expand Down
1 change: 1 addition & 0 deletions pkg/cmd/dev/dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Typical usage:
makeTestCmd(ret.test),
makeUICmd(&ret),
makeRoachprodStressCmd(ret.roachprodStress),
makeRoachprodBenchCmd(ret.roachprodBench),
)

// Add all the shared flags.
Expand Down
Loading

0 comments on commit 6c619e2

Please sign in to comment.