Bug 1507342 - Allow profileserver.py to run from a fresh checkout. r=firefox-build-system-reviewers,gps
authorChris Manchester <cmanchester@mozilla.com>
Mon, 26 Nov 2018 17:16:40 +0000
changeset 504550 5720aea08e4f55c211eaab665d32838c932d9c07
parent 504549 c8e417bfccfbba8bd7917368778939949d1126bd
child 504551 c4087e8ea340050a45994f4d4f938bb5076a8d5f
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, gps
bugs1507342
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
build/pgo/profileserver.py
--- a/build/pgo/profileserver.py
+++ b/build/pgo/profileserver.py
@@ -21,18 +21,24 @@ PORT = 8888
 PATH_MAPPINGS = {
     '/js-input/webkit/PerformanceTests': 'third_party/webkit/PerformanceTests',
 }
 
 
 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()
     }
     httpd = MozHttpd(port=PORT,
                      docroot=os.path.join(build.topsrcdir, "build", "pgo"),
                      path_mappings=path_mappings)
     httpd.start(block=False)
@@ -81,29 +87,27 @@ if __name__ == '__main__':
 
                 vcdir = os.path.abspath(os.path.join(env[e], '../../VC/bin'))
                 if os.path.exists(vcdir):
                     env['PATH'] = '%s;%s' % (vcdir, env['PATH'])
                     break
 
         # 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()
         runner.wait()
 
         jarlog = os.getenv("JARLOG_FILE")
         if jarlog:
             env["MOZ_JAR_LOG_FILE"] = os.path.abspath(jarlog)
             print("jarlog: %s" % env["MOZ_JAR_LOG_FILE"])
 
         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)
         runner.wait()
         httpd.stop()