Skip to content

Commit cc1eadd

Browse files
authored
Add feature flag to drop dependencies from test execution (#571)
The current model requires that packages have already finished building prior to invoking tests, meaning that there aren't any ordering constraints on test execution.
1 parent ca9583e commit cc1eadd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

colcon_core/verb/test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from colcon_core.executor import execute_jobs
1616
from colcon_core.executor import Job
1717
from colcon_core.executor import OnError
18+
from colcon_core.feature_flags import is_feature_flag_set
1819
from colcon_core.logging import colcon_logger
1920
from colcon_core.package_selection import add_arguments \
2021
as add_packages_arguments
@@ -181,6 +182,7 @@ def put_event_into_queue_(self, event):
181182

182183
def _get_jobs(self, args, decorators, install_base):
183184
jobs = OrderedDict()
185+
drop_test_deps = is_feature_flag_set('drop_test_deps')
184186
for decorator in decorators:
185187
if not decorator.selected:
186188
continue
@@ -216,7 +218,9 @@ def _get_jobs(self, args, decorators, install_base):
216218

217219
job = Job(
218220
identifier=pkg.name,
219-
dependencies=set(recursive_dependencies.keys()),
221+
dependencies=set(
222+
() if drop_test_deps else recursive_dependencies.keys()
223+
),
220224
task=extension, task_context=task_context)
221225

222226
jobs[pkg.name] = job

0 commit comments

Comments
 (0)