commit 76fe8d5b880280a09e0f0ef16209789a6681ac6e
parent 8af32bf2f7249de7ba4858af5f3912c504804257
Author: Suhaib Mujahid <suhaibmujahid@gmail.com>
Date: Tue, 18 Nov 2025 18:28:58 +0000
Bug 2000839 - Change BugBug no-recommendation exit code to 1. r=marco
Previously, the command returned exit code 0 when BugBug did not recommend any tests. This has been updated to return 1, indicating a non-successful outcome when no tests are recommended.
Differential Revision: https://phabricator.services.mozilla.com/D272959
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testing/mach_commands.py b/testing/mach_commands.py
@@ -418,12 +418,12 @@ def test(command_context, what, extra_args, **log_args):
f"Querying BugBug for test recommendations... (based on changes after {base_commit[:8]})"
)
schedules = patch_schedules(base_commit, patch, selection_mode)
-
if not schedules:
- print(
- "BugBug did not recommend any tests for your changes. Consider specifying tests by path or suite name."
- )
- return 0
+ print("BugBug did not recommend any tests for your changes.")
+
+ if not schedules and not what:
+ print("Consider specifying tests by path or suite name.")
+ return 1
test_paths = sorted(schedules.keys())
print(f"BugBug recommended {len(test_paths)} test group(s):")