Skip to content

Commit fd7b609

Browse files
Ian Childsmeta-codesync[bot]
authored andcommitted
Extract resolve_test_path from resolve_test_discovery
Summary: Just a little refactor to simplify the next diff Reviewed By: cjhopman Differential Revision: D92513345 fbshipit-source-id: 34b036bbd4a27274a980a01bfa9d155e54fcecf5
1 parent 521280a commit fd7b609

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

app/buck2_core/src/fs/buck_out_path.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,14 @@ impl BuckOutPathResolver {
398398
pub fn resolve_test_discovery(
399399
&self,
400400
label: &ConfiguredProvidersLabel,
401+
) -> buck2_error::Result<ProjectRelativePathBuf> {
402+
self.resolve_test_path(&ForwardRelativePath::unchecked_new("test_discovery"), label)
403+
}
404+
405+
fn resolve_test_path(
406+
&self,
407+
prefix: &ForwardRelativePath,
408+
label: &ConfiguredProvidersLabel,
401409
) -> buck2_error::Result<ProjectRelativePathBuf> {
402410
let path = match label.name() {
403411
ProvidersName::Default => "default".into(),
@@ -413,7 +421,7 @@ impl BuckOutPathResolver {
413421
};
414422
let path = ForwardRelativePath::unchecked_new(&path);
415423
self.prefixed_path_for_owner(
416-
ForwardRelativePath::unchecked_new("test_discovery"),
424+
prefix,
417425
&BaseDeferredKey::TargetLabel(label.target().dupe()),
418426
None,
419427
path,

0 commit comments

Comments
 (0)