Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature flag to drop dependencies from test execution #571

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion colcon_core/verb/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from colcon_core.executor import execute_jobs
from colcon_core.executor import Job
from colcon_core.executor import OnError
from colcon_core.feature_flags import is_feature_flag_set
from colcon_core.logging import colcon_logger
from colcon_core.package_selection import add_arguments \
as add_packages_arguments
Expand Down Expand Up @@ -181,6 +182,7 @@ def put_event_into_queue_(self, event):

def _get_jobs(self, args, decorators, install_base):
jobs = OrderedDict()
drop_test_deps = is_feature_flag_set('drop_test_deps')
for decorator in decorators:
if not decorator.selected:
continue
Expand Down Expand Up @@ -216,7 +218,9 @@ def _get_jobs(self, args, decorators, install_base):

job = Job(
identifier=pkg.name,
dependencies=set(recursive_dependencies.keys()),
dependencies=set(
() if drop_test_deps else recursive_dependencies.keys()
),
task=extension, task_context=task_context)

jobs[pkg.name] = job
Expand Down
Loading