mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-05 19:55:47 +03:00
Add debug command
Summary: Starts a shell in the build dir, with the environment set up in the same way as for the build. Useful for experimenting and testing. Reviewed By: chadaustin Differential Revision: D58082246 fbshipit-source-id: 82b275401528d7616c2560d80b4c187de67f6032
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8daed6f7a9
commit
33643225be
@@ -142,6 +142,16 @@ class BuilderBase(object):
|
||||
self._apply_patchfile()
|
||||
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
||||
|
||||
def debug(self, install_dirs, reconfigure: bool) -> None:
|
||||
reconfigure = self._reconfigure(reconfigure)
|
||||
self._apply_patchfile()
|
||||
self._prepare(install_dirs=install_dirs, reconfigure=reconfigure)
|
||||
env = self._compute_env(install_dirs)
|
||||
print("Starting a shell in %s, ^D to exit..." % self.build_dir)
|
||||
# TODO: print the command to run the build
|
||||
shell = ["powershell.exe"] if sys.platform == "win32" else ["/bin/sh", "-i"]
|
||||
self._run_cmd(shell, cwd=self.build_dir, env=env)
|
||||
|
||||
def build(self, install_dirs, reconfigure: bool) -> None:
|
||||
print("Building %s..." % self.manifest.name)
|
||||
reconfigure = self._reconfigure(reconfigure)
|
||||
|
Reference in New Issue
Block a user