Bug 1507342 - Allow profileserver.py to run from a fresh checkout. r=firefox-build-system-reviewers,gps

Differential Revision: https://phabricator.services.mozilla.com/D12494

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Chris Manchester 2018-11-26 17:16:40 +00:00
parent afd8a94f03
commit 1195b8eedc

View File

@ -26,8 +26,14 @@ PATH_MAPPINGS = {
if __name__ == '__main__':
cli = CLI()
debug_args, interactive = cli.debugger_arguments()
runner_args = cli.runner_args()
build = MozbuildObject.from_environment()
binary = runner_args.get('binary')
if not binary:
binary = build.get_binary_path(where="staged-package")
path_mappings = {
k: os.path.join(build.topsrcdir, v)
for k, v in PATH_MAPPINGS.items()
@ -86,8 +92,7 @@ if __name__ == '__main__':
# Run Firefox a first time to initialize its profile
runner = FirefoxRunner(profile=profile,
binary=build.get_binary_path(
where="staged-package"),
binary=binary,
cmdargs=['data:text/html,<script>Quitter.quit()</script>'],
env=env)
runner.start()
@ -100,8 +105,7 @@ if __name__ == '__main__':
cmdargs = ["http://localhost:%d/index.html" % PORT]
runner = FirefoxRunner(profile=profile,
binary=build.get_binary_path(
where="staged-package"),
binary=binary,
cmdargs=cmdargs,
env=env)
runner.start(debug_args=debug_args, interactive=interactive)