Skip to content

Commit

Permalink
Merge mozilla-central to autoland
Browse files Browse the repository at this point in the history
  • Loading branch information
Norisz Fay committed Jul 6, 2023
2 parents 1a4bebd + ef61a8e commit 988d294
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 13 additions & 12 deletions testing/raptor/raptor/perftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@
raise IOError("%s does not exist. " % path)
sys.path.insert(0, path)

from cmdline import FIREFOX, FIREFOX_ANDROID_APPS
from cmdline import FIREFOX_ANDROID_APPS
from condprof.client import ProfileNotFoundError, get_profile
from condprof.util import get_current_platform
from gecko_profile import GeckoProfile
from logger.logger import RaptorLogger
from results import RaptorResultsHandler

LOG = RaptorLogger(component="raptor-perftest")
FIREFOX_APPS = FIREFOX_ANDROID_APPS + [FIREFOX]

# - mozproxy.utils LOG displayed INFO messages even when LOG.error() was used in mitm.py
mpu.LOG = RaptorLogger(component="raptor-mitmproxy")
Expand Down Expand Up @@ -382,17 +381,19 @@ def get_conditioned_profile(self, binary=None):
return self.conditioned_profile_copy

def build_browser_profile(self):
if self.config["app"] in FIREFOX_APPS:
if self.config.get("conditioned_profile") is None:
self.profile = create_profile(self.profile_class)
else:
# use mozprofile to create a profile for us, from our conditioned profile's path
self.profile = create_profile(
self.profile_class, profile=self.get_conditioned_profile()
)
else:
if self.config["app"] in ["safari"]:
self.profile = None
return
elif (
self.config["app"] in ["chrome", "chromium", "chrome-m", "custom-car"]
or self.config.get("conditioned_profile") is None
):
self.profile = create_profile(self.profile_class)
else:
# use mozprofile to create a profile for us, from our conditioned profile's path
self.profile = create_profile(
self.profile_class, profile=self.get_conditioned_profile()
)
# Merge extra profile data from testing/profiles
with open(os.path.join(self.profile_data_dir, "profiles.json"), "r") as fh:
base_profiles = json.load(fh)["raptor"]
Expand Down Expand Up @@ -446,7 +447,7 @@ def run_test_setup(self, test):
if test.get("playback") is not None and self.playback is None:
self.start_playback(test)

if test.get("preferences") is not None and self.config["app"] in FIREFOX_APPS:
if test.get("preferences") is not None and self.config["app"] not in "safari":
self.set_browser_test_prefs(test["preferences"])

@abstractmethod
Expand Down
2 changes: 2 additions & 0 deletions testing/raptor/test/test_raptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def run(self):
"perftest_class, app_name",
[
[BrowsertimeDesktop, "firefox"],
[BrowsertimeDesktop, "chrome"],
[BrowsertimeDesktop, "chromium"],
[BrowsertimeAndroid, "geckoview"],
],
)
Expand Down

0 comments on commit 988d294

Please sign in to comment.