Bug 1633394 - Add option to run cold tests from command line r=perftest-reviewers,sparky

Differential Revision: https://phabricator.services.mozilla.com/D72665
This commit is contained in:
Florin Strugariu 2020-05-27 15:52:21 +00:00
Родитель bce2082606
Коммит e64e00f164
5 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -426,18 +426,16 @@ def get_raptor_test_list(args, oskey):
LOG.info("setting page-timeout to %d as specified on cmd line" % args.page_timeout)
next_test['page_timeout'] = args.page_timeout
# for browsertime jobs, cold page-load mode is determined by command line argument; for
# raptor-webext jobs cold page-load is determined by the 'cold' key in test manifest INI
_running_cold = False
if args.browsertime is True:
if args.cold is True:
_running_cold = True
else:
# running warm page-load so ignore browser-cycles if it was provided (set to 1)
next_test['browser_cycles'] = 1
# check command line to see if we set cold page load from command line
if args.cold or next_test.get("cold") == "true":
# for raptor-webext jobs cold page-load is determined by the 'cold' key
# in test manifest INI
_running_cold = True
else:
if next_test.get("cold", "false") == "true":
_running_cold = True
# if it's a warm load test ignore browser_cycles if set
next_test['browser_cycles'] = 1
if _running_cold:
# when running in cold mode, set browser-cycles to the page-cycles value; as we want

Просмотреть файл

@ -83,6 +83,7 @@ either Raptor or browsertime."""
host=None,
power_test=False,
cpu_test=False,
cold=False,
memory_test=False,
live_sites=False,
is_release_build=False,
@ -123,6 +124,7 @@ either Raptor or browsertime."""
"power_test": power_test,
"memory_test": memory_test,
"cpu_test": cpu_test,
"cold": cold,
"live_sites": live_sites,
"is_release_build": is_release_build,
"enable_control_server_wait": memory_test or cpu_test,

Просмотреть файл

@ -123,6 +123,7 @@ def main(args=sys.argv[1:]):
cpu_test=args.cpu_test,
memory_test=args.memory_test,
live_sites=args.live_sites,
cold=args.cold,
is_release_build=args.is_release_build,
debug_mode=args.debug_mode,
post_startup_delay=args.post_startup_delay,

Просмотреть файл

@ -234,7 +234,7 @@ class WebExtensionAndroid(PerftestAndroid, WebExtension):
# initialize for the test
init_android_power_test(self)
if test.get("cold", False) is True:
if self.config.get("cold") or test.get("cold"):
self.__run_test_cold(test, timeout)
else:
self.__run_test_warm(test, timeout)

Просмотреть файл

@ -95,7 +95,7 @@ class WebExtensionDesktop(PerftestDesktop, WebExtension):
)
mozpower_measurer.initialize_power_measurements()
if test.get("cold", False) is True:
if self.config.get("cold") or test.get("cold"):
self.__run_test_cold(test, timeout)
else:
self.__run_test_warm(test, timeout)