Skip to content

Commit 3127d8f

Browse files
yfeldblumfacebook-github-bot
authored andcommitted
getdeps show-build-dir
Summary: A show-build-dir subcommand. Possibly useful for building a project and then running only one test or benchmark binary directly. Reviewed By: wez Differential Revision: D26502869 fbshipit-source-id: 0d8f6c42a2bbeb2440503a39c7fc770e3b3e4fff
1 parent de27e6b commit 3127d8f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

build/fbcode_builder/getdeps.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,27 @@ def run(self, args):
401401
clean_dirs(opts)
402402

403403

404+
@cmd("show-build-dir", "print the build dir for a given project")
405+
class ShowBuildDirCmd(ProjectCmdBase):
406+
def run_project_cmd(self, args, loader, manifest):
407+
if args.recursive:
408+
manifests = loader.manifests_in_dependency_order()
409+
else:
410+
manifests = [manifest]
411+
412+
for m in manifests:
413+
inst_dir = loader.get_project_build_dir(m)
414+
print(inst_dir)
415+
416+
def setup_project_cmd_parser(self, parser):
417+
parser.add_argument(
418+
"--recursive",
419+
help="print the transitive deps also",
420+
action="store_true",
421+
default=False,
422+
)
423+
424+
404425
@cmd("show-inst-dir", "print the installation dir for a given project")
405426
class ShowInstDirCmd(ProjectCmdBase):
406427
def run_project_cmd(self, args, loader, manifest):

0 commit comments

Comments
 (0)