Bug 1634909 - [raptor] Remove deprecated browser name from webextension config. r=perftest-reviewers,sparky
authorHenrik Skupin <mail@hskupin.info>
Tue, 19 May 2020 20:37:50 +0000
changeset 530947 5d7e631388faf24bda8c6c2e4f4e4c83317620e5
parent 530946 a4421710edc835945a79abee7533c1610fe5ea77
child 530948 62b8adbc0e67be4570ff98f33406729667e71eee
push id37434
push userabutkovits@mozilla.com
push dateWed, 20 May 2020 10:05:10 +0000
treeherdermozilla-central@005ef1c25992 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersperftest-reviewers, sparky
bugs1634909
milestone78.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 1634909 - [raptor] Remove deprecated browser name from webextension config. r=perftest-reviewers,sparky Differential Revision: https://phabricator.services.mozilla.com/D75928
testing/raptor/raptor/gen_test_config.py
testing/raptor/raptor/webextension/base.py
testing/raptor/webext/raptor/runner.js
--- a/testing/raptor/raptor/gen_test_config.py
+++ b/testing/raptor/raptor/gen_test_config.py
@@ -10,42 +10,40 @@ from logger.logger import RaptorLogger
 
 here = os.path.abspath(os.path.dirname(__file__))
 webext_dir = os.path.join(os.path.dirname(here), 'webext', 'raptor')
 LOG = RaptorLogger(component='raptor-gen-test-config')
 
 FILE_CONTENTS = """// this file is auto-generated by raptor, do not edit directly
 function getTestConfig() {{
   return {{
-    "browser": "{browser}",
     "cs_port": "{control_server_port}",
     "test_name": "{test}",
     "test_settings_url": "http://{host}:{control_server_port}/json/{test}.json",
     "post_startup_delay": "{post_startup_delay}",
     "benchmark_port": "{benchmark_port}",
     "host": "{host}",
     "debug_mode": "{debug_mode}",
     "browser_cycle": "{browser_cycle}"
   }};
 }}
 
 """
 
 
-def gen_test_config(browser, test, cs_port, post_startup_delay,
+def gen_test_config(test, cs_port, post_startup_delay,
                     host='127.0.0.1', b_port=0, debug_mode=0,
                     browser_cycle=1):
     LOG.info("writing test settings into background js, so webext can get it")
 
     if host is None or cs_port is None:
         raise ValueError("Invalid URL for control server: http://{}:{}".format(host, cs_port))
 
     config = FILE_CONTENTS.format(
         benchmark_port=b_port,
-        browser=browser,
         browser_cycle=browser_cycle,
         control_server_port=cs_port,
         debug_mode=debug_mode,
         host=host,
         post_startup_delay=post_startup_delay,
         test=test,
     )
 
--- a/testing/raptor/raptor/webextension/base.py
+++ b/testing/raptor/raptor/webextension/base.py
@@ -57,17 +57,16 @@ class WebExtension(Perftest):
         LOG.info("starting web extension test: %s" % test["name"])
         LOG.info("test settings: %s" % str(test))
         LOG.info("web extension config: %s" % str(self.config))
 
         if test.get("type") == "benchmark":
             self.serve_benchmark_source(test)
 
         gen_test_config(
-            self.config["app"],
             test["name"],
             self.control_server.port,
             self.post_startup_delay,
             host=self.config["host"],
             b_port=int(self.benchmark.port) if self.benchmark else 0,
             debug_mode=1 if self.debug_mode else 0,
             browser_cycle=test.get("browser_cycle", 1),
         )
--- a/testing/raptor/webext/raptor/runner.js
+++ b/testing/raptor/webext/raptor/runner.js
@@ -28,17 +28,16 @@ var postStartupDelay;
 // delay (ms) between pageload cycles
 var pageCycleDelay = 1000;
 
 var newTabPerCycle = false;
 
 // delay (ms) for foregrounding app
 var foregroundDelay = 5000;
 
-var browserName;
 var isGecko = false;
 var isGeckoView = false;
 var ext;
 var testName = null;
 var settingsURL = null;
 var csPort = null;
 var host = null;
 var benchmarkPort = null;
@@ -740,17 +739,16 @@ function raptorLog(text, level = "info")
   console[level](`${prefix}[raptor-runnerjs] ${text}`);
 }
 
 async function init() {
   const config = getTestConfig();
   testName = config.test_name;
   settingsURL = config.test_settings_url;
   csPort = config.cs_port;
-  browserName = config.browser;
   benchmarkPort = config.benchmark_port;
   postStartupDelay = config.post_startup_delay;
   host = config.host;
   debugMode = config.debug_mode;
   browserCycle = config.browser_cycle;
 
   try {
     // Chromium based browsers do not support the "browser" namespace and