Backed out changeset 6553d0f5973d (bug 1628982) for raptor timeouts. CLOSED TREE

This commit is contained in:
Csoregi Natalia 2020-04-13 19:22:31 +03:00
parent a1da71c534
commit ba597ff33e
9 changed files with 14 additions and 62 deletions

View File

@ -276,8 +276,6 @@ def add_extra_options(config, tests):
if test['require-signed-extensions']:
extra_options.append('--is-release-build')
extra_options.append("--project={}".format(config.params.get('project')))
# add urlparams based on platform, test names and projects
testurlparams_by_platform_and_project = {
"android-hw-g5": [

View File

@ -204,13 +204,6 @@ class Raptor(TestingMixin, MercurialScript, CodeCoverageMixin, AndroidMixin):
"help": "The number of times a cold load test is repeated (for cold load tests only, "
"where the browser is shutdown and restarted between test iterations)."
}],
[["--project"], {
"action": "store",
"dest": "project",
"default": "mozilla-central",
"type": "str",
"help": "Name of the project (try, mozilla-central, etc.)"
}],
[["--test-url-params"], {
"action": "store",
"dest": "test_url_params",

View File

@ -217,7 +217,7 @@ class Browsertime(Perftest):
])
# have browsertime use our newly-created conditioned-profile path
if self.using_condprof:
if not self.no_condprof:
self.profile.profile = self.conditioned_profile_dir
if self.config["gecko_profile"]:

View File

@ -136,9 +136,7 @@ def create_parser(mach_interface=False):
help='How long to wait (ms) after browser start-up before starting the tests')
add_arg('--browser-cycles', dest="browser_cycles", type=int,
help="The number of times a cold load test is repeated (for cold load tests only, "
"where the browser is shutdown and restarted between test iterations)"),
add_arg('--project', dest='project', type=str, default='mozilla-central',
help="Project name (try, mozilla-central, etc.)"),
"where the browser is shutdown and restarted between test iterations)")
add_arg('--test-url-params', dest='test_url_params',
help="Parameters to add to the test_url query string")
add_arg('--print-tests', action=_PrintTests,

View File

@ -95,12 +95,9 @@ either Raptor or browsertime."""
device_name=None,
disable_perf_tuning=False,
extra_prefs={},
project="mozilla-central",
**kwargs
):
self._dirs_to_remove = []
# Override the magic --host HOST_IP with the value of the environment variable.
if host == "HOST_IP":
host = os.environ["HOST_IP"]
@ -129,26 +126,19 @@ either Raptor or browsertime."""
"enable_fission": extra_prefs.get("fission.autostart", False),
"disable_perf_tuning": disable_perf_tuning,
"extra_prefs": extra_prefs,
"project": project
}
self.firefox_android_apps = FIREFOX_ANDROID_APPS
# See bugs 1582757, 1606199, and 1606767; until we support win10-aarch64,
# fennec_aurora, and reference browser conditioned-profile builds,
# fall back to mozrunner-created profiles
self.using_condprof = not (
self.no_condprof = (
(self.config["platform"] == "win" and self.config["processor"] == "aarch64")
or self.config["binary"] == "org.mozilla.fennec_aurora"
or self.config["binary"] == "org.mozilla.reference.browser.raptor"
or self.config["binary"] == "org.mozilla.firefox"
or self.config["binary"].startswith("org.mozilla.fenix")
or self.config["no_conditioned_profile"]
)
if self.using_condprof:
LOG.info("Using a conditioned profile.")
else:
LOG.info("Using an empty profile.")
self.config["using_condprof"] = self.using_condprof
LOG.info("self.no_condprof is: {}".format(self.no_condprof))
# We can never use e10s on fennec
if self.config["app"] == "fennec":
@ -180,7 +170,7 @@ either Raptor or browsertime."""
# For the post startup delay, we want to max it to 1s when using the
# conditioned profiles.
if self.using_condprof and not self.run_local:
if not self.no_condprof and not self.run_local:
self.post_startup_delay = min(post_startup_delay, POST_DELAY_CONDPROF)
else:
# if running debug-mode reduce the pause after browser startup
@ -197,11 +187,6 @@ either Raptor or browsertime."""
# Crashes counter
self.crashes = 0
def _get_temp_dir(self):
tempdir = tempfile.mkdtemp()
self._dirs_to_remove.append(tempdir)
return tempdir
@property
def is_localhost(self):
return self.config.get("host") in ("localhost", "127.0.0.1")
@ -211,7 +196,7 @@ either Raptor or browsertime."""
condprofile client API; returns a self.conditioned_profile_dir"""
# create a temp file to help ensure uniqueness
temp_download_dir = self._get_temp_dir()
temp_download_dir = tempfile.mkdtemp()
LOG.info(
"Making temp_download_dir from inside get_conditioned_profile {}".format(
temp_download_dir
@ -229,26 +214,12 @@ either Raptor or browsertime."""
platform = get_current_platform()
LOG.info("Platform used: %s" % platform)
# when running under mozharness, the --project value
# is set to match the project (try, mozilla-central, etc.)
# By default it's mozilla-central, even on local runs.
# We use it to prioritize conditioned profiles indexed
# into the same project when it runs on the CI
repo = self.config["project"]
# we fall back to mozilla-central in all cases. If it
# was already mozilla-central, we fall back to try
alternate_repo = "mozilla-central" if repo != "mozilla-central" else "try"
LOG.info("Getting profile from project %s" % repo)
try:
cond_prof_target_dir = get_profile(
temp_download_dir, platform, "settled", repo=repo)
cond_prof_target_dir = get_profile(temp_download_dir, platform, "settled")
except ProfileNotFoundError:
LOG.info("Profile not found for project %s" % repo)
LOG.info("Getting profile from project %s" % alternate_repo)
# If we can't find the profile on mozilla-central, we look on try
cond_prof_target_dir = get_profile(
temp_download_dir, platform, "settled", repo=alternate_repo
temp_download_dir, platform, "settled", repo="try"
)
except Exception:
# any other error is a showstopper
@ -274,10 +245,12 @@ either Raptor or browsertime."""
self.conditioned_profile_dir
)
)
shutil.rmtree(temp_download_dir)
return self.conditioned_profile_dir
def build_browser_profile(self):
if not self.using_condprof or self.config['app'] in ['chrome', 'chromium', 'chrome-m']:
if self.no_condprof or self.config['app'] in ['chrome', 'chromium', 'chrome-m']:
self.profile = create_profile(self.profile_class)
else:
self.get_conditioned_profile()
@ -402,13 +375,9 @@ either Raptor or browsertime."""
def check_for_crashes(self):
pass
@abstractmethod
def clean_up(self):
for dir_to_rm in self._dirs_to_remove:
if not os.path.exists(dir_to_rm):
continue
LOG.info("Removing temporary directory: {}".format(dir_to_rm))
shutil.rmtree(dir_to_rm, ignore_errors=True)
self._dirs_to_remove = []
pass
def get_page_timeout_list(self):
return self.results_handler.page_timeout_list

View File

@ -133,7 +133,6 @@ def main(args=sys.argv[1:]):
device_name=args.device_name,
no_conditioned_profile=args.no_conditioned_profile,
disable_perf_tuning=args.disable_perf_tuning,
project=args.project
)
except Exception:
traceback.print_exc()

View File

@ -81,7 +81,6 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
args=[
"--profile",
self.remote_profile,
"--allow-downgrade",
"use_multiprocess",
self.config["e10s"],
],
@ -128,7 +127,6 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
extra_args = [
"-profile", self.remote_profile,
"--allow-downgrade",
"--es", "env0",
"LOG_VERBOSE=1",
"--es", "env1",

View File

@ -35,7 +35,6 @@ class WebExtension(Perftest):
self.cpu_profiler = None
super(WebExtension, self).__init__(*args, **kwargs)
self.using_condprof = self.config.get("using_condprof", True)
# set up the results handler
self.results_handler = RaptorResultsHandler(

View File

@ -28,12 +28,10 @@ class WebExtensionDesktop(PerftestDesktop, WebExtension):
LOG.info("creating browser runner using mozrunner")
self.output_handler = OutputHandler()
process_args = {"processOutputLine": [self.output_handler]}
firefox_args = ["--allow-downgrade"]
runner_cls = runners[self.config["app"]]
self.runner = runner_cls(
self.config["binary"],
profile=self.profile,
cmdargs=firefox_args,
process_args=process_args,
symbols_path=self.config["symbols_path"],
)