John Jiang
John Jiang

Reputation: 955

Programmatic way to find the log file path for a bazel test run

I'd like to look at the log file from a bazel test run before it finishes. But bazel does not display the location of the log file unless it fails. Is there a way to programmatically find the log file location?

I understand that one can use the flag --test_output=all to transfer the log message to stdout, but this is often too verbose.

Upvotes: 0

Views: 848

Answers (1)

Brian Silverman
Brian Silverman

Reputation: 3848

bazel-testlogs/some/package/some_test/test.log will be a symlink to the output from //some/package:some_test. For a test with sharding, it'll be a path like bazel-testlogs/some/package/some_test/shard_1_of_4/test.log.

Upvotes: 1

Related Questions