Skip to content

Bug 2037300 - Add heuristics for selecting gtest, cppunit, rusttests#6002

Merged
marco-c merged 2 commits intomozilla:masterfrom
marco-c:gtest_cppunit_rusttests
May 8, 2026
Merged

Bug 2037300 - Add heuristics for selecting gtest, cppunit, rusttests#6002
marco-c merged 2 commits intomozilla:masterfrom
marco-c:gtest_cppunit_rusttests

Conversation

@marco-c
Copy link
Copy Markdown
Collaborator

@marco-c marco-c commented May 8, 2026

No description provided.

@marco-c marco-c requested a review from suhaibmujahid May 8, 2026 12:08
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds path/content-based heuristics to supplement Bugbug’s ML test selection by force-selecting certain task types (gtest/cppunit/rusttests) when relevant files are modified, and wires this into the HTTP scheduling pipeline.

Changes:

  • Introduces find_tasks_for_paths() in bugbug/test_scheduling.py to heuristically pick gtest/cppunit/rusttests tasks.
  • Updates the HTTP service patch analysis to apply these heuristics on top of model-selected tasks and to reuse a deduped modified_paths list.
  • Adds unit tests covering the new task-selection heuristics.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
bugbug/test_scheduling.py Adds task-selection heuristics for gtest/cppunit/rusttests based on modified paths and light file inspection.
http_service/bugbug_http/models.py Applies the new heuristics during _analyze_patch and reuses computed known_tasks/modified_paths.
tests/test_test_scheduling.py Adds test coverage validating gtest/cppunit/rusttests heuristic behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bugbug/test_scheduling.py
Comment thread bugbug/test_scheduling.py
Comment thread bugbug/test_scheduling.py
Comment thread bugbug/test_scheduling.py
Comment thread bugbug/test_scheduling.py
@marco-c marco-c merged commit e0298c4 into mozilla:master May 8, 2026
10 checks passed
@marco-c marco-c deleted the gtest_cppunit_rusttests branch May 8, 2026 14:49
@marco-c marco-c linked an issue May 8, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add additional heuristics to select relevant tests for gtest

3 participants