Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • dev test has a --stress flag for running tests under stress and --race for running tests with the race detector enabled.

  • Next to the test.log file produced by your test, you can find a test.xml file. This file contains specific information on each test run and its status, as well as timing information.

  • The -v argument to dev test will result in more verbose logging as well as more detailed information written to the test.xml. You can make this the default behavior on your machine by adding test --test_env=GO_TEST_WRAP_TESTV=1 to your .bazelrc.user file.

  • As with dev build, dev test allows you to pass additional arguments directly to Bazel by putting them after --: for example, dev test pkg/sql/types -- --verbose_failures --sandbox_debug.

  • To get test results printed as tests are being run add -v -- --test_output streamed to the test command. Note that this reduces test parallelism.

  • To attach a debugger to a hung dev test process tack -- -c dbg to the end of your command and it will disable stripping which breaks dlv (https://github.com/bazelbuild/intellij/issues/2313).

  • For more tips on debugging test failures, see “How to ensure your tests can run in the Bazel sandbox

Other tasks

Code Block
# Build crlfmt
./dev build crlfmt
# Build roachprod
./dev build roachprod
# Run acceptance tests
./dev acceptance
# Run compose tests
./dev compose
# Run benchmarks for pkg/sql/parser
./dev bench pkg/sql/parser
# Generate code and docs (run this before submitting your PR).
./dev generate
# Generate changes to `BUILD.bazel` files
./dev generate bazel --short
# Run lints
./dev lint
# logic tests!
./dev testlogic --files=$FILES --subtests=$SUBTESTS --config=$CONFIG
# Open a container running the "bazelbuilder" image. Requires Docker.
./dev builder
# Remove artifacts from building the UI
./dev ui clean --all

dev vs. make

This is a (non-exhaustive) 1-to-1 mapping of dev commands to their make equivalents. Feel free to add to this (smile)

...