[8.6.0] Add short_uncached and detailed_uncached options to --test_summary#28343
Conversation
…ry` (bazelbuild#28290) These options exclude cached test results from the summary. With `short` (default) ``` vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured). INFO: Found 1 test target... Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date: bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar INFO: Elapsed time: 0.770s, Critical Path: 0.00s INFO: 1 process: 1 action cache hit, 1 internal. INFO: Build completed successfully, 1 total action //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (cached) PASSED in 2.8s Executed 0 out of 1 test: 1 test passes. There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are. ``` With `short_uncached` ``` vscode ➜ /workspaces/bazel/bazel (uncached-test-summary-options) $ bazel-bin/src/bazel test //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests --test_filter=shortUncachedOption_allPassed --test_summary=short_uncached INFO: Analyzed target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests (0 packages loaded, 0 targets configured). INFO: Found 1 test target... Target //src/test/java/com/google/devtools/build/lib/runtime:RuntimeTests up-to-date: bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests bazel-bin/src/test/java/com/google/devtools/build/lib/runtime/RuntimeTests.jar INFO: Elapsed time: 0.264s, Critical Path: 0.00s INFO: 1 process: 1 action cache hit, 1 internal. INFO: Build completed successfully, 1 total action Executed 0 out of 1 test: 1 test passes. There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are. ``` Resolves bazelbuild#28062 RELNOTES: Reporting of cached test results can now be suppressed with `--test_summary=short_uncached` or `--test_summary=detailed_uncached`. Closes bazelbuild#28290. PiperOrigin-RevId: 857282700 Change-Id: Iaea823462344a6118bd5a112d734df5c35a1e152
There was a problem hiding this comment.
Code Review
This pull request introduces short_uncached and detailed_uncached options for the --test_summary flag, allowing users to suppress cached test results from the summary. The implementation is clean and well-structured, particularly the refactoring in TerminalTestResultNotifier to handle the new options. The accompanying test changes are excellent, with a significant improvement in readability and maintainability through the use of a TestSummarySpec builder. New unit and integration tests thoroughly cover the new functionality. The documentation for the related command-line options has also been improved. Overall, this is a high-quality change with no issues found.
short_uncached and detailed_uncached options to --test_summaaryshort_uncached and detailed_uncached options to --test_summary
appears to be unrelated. |
meisterT
left a comment
There was a problem hiding this comment.
Clicked retry on the timeout
88832ab
### What does this PR do? Bump `.bazelversion` from 8.5.1 to 8.6.0. ### Motivation Selected changes between 8.5.1 and 8.6.0: - Fix visibility for implicit deps of parent rules (bazelbuild/bazel#28722) - Force rctx.{download_and,}extract to create user-readable files (bazelbuild/bazel#28551) - Fix disk cache failures on concurrent read-write access on Windows (bazelbuild/bazel#28529) - Add a target_type argument to ctx.actions.symlink (bazelbuild/bazel#28538) - Compensate for Windows filesystems lacking junction support (bazelbuild/bazel#28367) (our fix) - Add short_uncached and detailed_uncached options to --test_summary (bazelbuild/bazel#28343) - Add --experimental_strict_repo_env option (bazelbuild/bazel#28189) - Make overlaid files executable in http_archive (bazelbuild/bazel#28277) - Add bazel mod show_repo --all_repos and --all_visible_repos (bazelbuild/bazel#28012) - Enable --experimental_retain_test_configuration_across_testonly (bazelbuild/bazel#28115) - Add option to continue with local execution if remote cache is unavailable (bazelbuild/bazel#28001)
### What does this PR do? Bump `.bazelversion` from 8.5.1 to 8.6.0. ### Motivation Selected changes between 8.5.1 and 8.6.0: - Fix visibility for implicit deps of parent rules (bazelbuild/bazel#28722) - Force rctx.{download_and,}extract to create user-readable files (bazelbuild/bazel#28551) - Fix disk cache failures on concurrent read-write access on Windows (bazelbuild/bazel#28529) - Add a target_type argument to ctx.actions.symlink (bazelbuild/bazel#28538) - Compensate for Windows filesystems lacking junction support (bazelbuild/bazel#28367) (our fix) - Add short_uncached and detailed_uncached options to --test_summary (bazelbuild/bazel#28343) - Add --experimental_strict_repo_env option (bazelbuild/bazel#28189) - Make overlaid files executable in http_archive (bazelbuild/bazel#28277) - Add bazel mod show_repo --all_repos and --all_visible_repos (bazelbuild/bazel#28012) - Enable --experimental_retain_test_configuration_across_testonly (bazelbuild/bazel#28115) - Add option to continue with local execution if remote cache is unavailable (bazelbuild/bazel#28001)
### What does this PR do? Bump `bazel` version from 8.5.1 to 8.6.0 to benefit from a series of improvements and fixes. Ours (bazelbuild/bazel#28367) allows to re-enable "convenience symlinks" for Windows users and makes [`path.realpath`](https://bazel.build/rules/lib/builtins/path#realpath) succeed when sharing a folder between a Linux host and a Windows VM. ### Motivation Selected changes between 8.5.1 and 8.6.0: - 💡 bazelbuild/bazel#28001 - bazelbuild/bazel#28012 - 💡 bazelbuild/bazel#28189 - bazelbuild/bazel#28277 - bazelbuild/bazel#28343 - 🐕 bazelbuild/bazel#28367 - bazelbuild/bazel#28529 - bazelbuild/bazel#28538 - bazelbuild/bazel#28551 - bazelbuild/bazel#28722 Co-authored-by: regis.desgroppes <[email protected]>
These options exclude cached test results from the summary.
With
short(default)With
short_uncachedResolves #28062
RELNOTES: Reporting of cached test results can now be suppressed with
--test_summary=short_uncachedor--test_summary=detailed_uncached.Backport of #28290.