Bug 841445 - Add a 'mach run' command to launch the compiled binary [r=gps]

DONTBUILD (not part of the build)
This commit is contained in:
Matt Brubeck 2013-03-26 11:15:08 -07:00
Родитель ac1756efef
Коммит a0320cb053
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -338,6 +338,26 @@ class Install(MachCommandBase):
def install(self):
return self._run_make(directory=".", target='install', ensure_exit_code=False)
@CommandProvider
class RunProgram(MachCommandBase):
"""Launch the compiled binary"""
@Command('run', help='Run the compiled program.', prefix_chars='+')
@CommandArgument('params', default=None, nargs='*',
help='Command-line arguments to pass to the program.')
def run(self, params):
try:
args = [self.get_binary_path('app')]
except Exception as e:
print("It looks like your program isn't built.",
"You can run |mach build| to build it.")
print(e)
return 1
if params:
args.extend(params)
return self.run_process(args=args, ensure_exit_code=False,
pass_thru=True)
@CommandProvider
class Buildsymbols(MachCommandBase):
"""Produce a package of debug symbols suitable for use with Breakpad."""