Bug 1553623: Fix typos in Raptor's cmdline.py; r=perftest-reviewers,sparky

Differential Revision: https://phabricator.services.mozilla.com/D32215

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Stephen Donner 2019-05-22 21:12:28 +00:00
Родитель f9b6430779
Коммит 168232fa40
1 изменённых файлов: 22 добавлений и 21 удалений

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

@ -26,7 +26,7 @@ APPS = {
FENNEC: {
"long_name": "Firefox Fennec on Android"},
GECKOVIEW: {
"long_name": "Firefox Geckoview on Android",
"long_name": "Firefox GeckoView on Android",
"default_activity": "org.mozilla.geckoview_example.GeckoViewActivity",
"default_intent": "android.intent.action.MAIN"},
REFBROW: {
@ -64,33 +64,34 @@ def create_parser(mach_interface=False):
add_arg = parser.add_argument
add_arg('-t', '--test', required=True, dest='test',
help="name of raptor test to run (can be a top-level suite name i.e. "
help="Name of Raptor test to run (can be a top-level suite name i.e. "
"'--test raptor-speedometer','--test raptor-tp6-1', or for page-load "
"tests a suite sub-test i.e. '--test raptor-tp6-google-firefox')")
add_arg('--app', default='firefox', dest='app',
help="name of the application we are testing (default: firefox)",
help="Name of the application we are testing (default: firefox)",
choices=APPS.keys())
add_arg('-b', '--binary', dest='binary',
help="path to the browser executable that we are testing")
add_arg('-a', '--activity', dest='activity', default=None,
help="Name of android activity used to launch the android app."
help="Name of Android activity used to launch the Android app."
"i.e.: %s" % print_all_activities())
add_arg('-i', '--intent', dest='intent', default=None,
help="Name of android intent action used to launch the android app."
help="Name of Android intent action used to launch the Android app."
"i.e.: %s" % print_all_intents())
add_arg('--host', dest='host',
help="Hostname from which to serve urls, defaults to 127.0.0.1. "
help="Hostname from which to serve URLs; defaults to 127.0.0.1. "
"The value HOST_IP will cause the value of host to be "
"loaded from the environment variable HOST_IP.",
default='127.0.0.1')
add_arg('--power-test', dest="power_test", action="store_true",
help="Use Raptor to measure power usage. Currently supported for Geckoview. "
help="Use Raptor to measure power usage. Supported across GeckoView, "
"Fenix, Firefox (Fennec), and Reference Browsers."
"The host ip address must be specified via the --host command line argument.")
add_arg('--memory-test', dest="memory_test", action="store_true",
help="Use Raptor to measure memory usage.")
add_arg('--is-release-build', dest="is_release_build", default=False,
action='store_true',
help="Whether the build is a release build which requires work arounds "
help="Whether the build is a release build which requires workarounds "
"using MOZ_DISABLE_NONLOCAL_CONNECTIONS to support installing unsigned "
"webextensions. Defaults to False.")
add_arg('--geckoProfile', action="store_true", dest="gecko_profile",
@ -100,10 +101,10 @@ def create_parser(mach_interface=False):
add_arg('--geckoProfileEntries', dest="gecko_profile_entries", type=int,
help=argparse.SUPPRESS)
add_arg('--gecko-profile', action="store_true", dest="gecko_profile",
help="Profile the run and output the results in $MOZ_UPLOAD_DIR. "
help="Profile the run and out-put the results in $MOZ_UPLOAD_DIR. "
"After talos is finished, profiler.firefox.com will be launched in Firefox "
"so you can analyze the local profiles. To disable auto-launching of "
"profiler.firefox.com set the DISABLE_PROFILE_LAUNCH=1 env var.")
"profiler.firefox.com, set the DISABLE_PROFILE_LAUNCH=1 env var.")
add_arg('--gecko-profile-entries', dest="gecko_profile_entries", type=int,
help='How many samples to take with the profiler')
add_arg('--gecko-profile-interval', dest='gecko_profile_interval', type=int,
@ -114,7 +115,7 @@ def create_parser(mach_interface=False):
help="Path to the symbols for the build we are testing")
add_arg('--page-cycles', dest="page_cycles", type=int,
help="How many times to repeat loading the test page (for page load tests); "
"for benchmark tests this is how many times the benchmark test will be run")
"for benchmark tests, this is how many times the benchmark test will be run")
add_arg('--page-timeout', dest="page_timeout", type=int,
help="How long to wait (ms) for one page_cycle to complete, before timing out")
add_arg('--post-startup-delay',
@ -133,9 +134,9 @@ def create_parser(mach_interface=False):
help="Run without multiple processes (e10s).")
if not mach_interface:
add_arg('--run-local', dest="run_local", default=False, action="store_true",
help="Flag that indicates if raptor is running locally or in production")
help="Flag which indicates if Raptor is running locally or in production")
add_arg('--obj-path', dest="obj_path", default=None,
help="Browser build obj_path (received when running in production)")
help="Browser-build obj_path (received when running in production)")
add_logging_group(parser)
return parser
@ -153,13 +154,13 @@ def verify_options(parser, args):
# if geckoProfile specified but not running on Firefox, not supported
if args.gecko_profile is True and args.app != "firefox":
parser.error("Gecko profiling is only supported when running raptor on Firefox!")
parser.error("Gecko profiling is only supported when running Raptor on Firefox!")
# if --power-test specified, must be on geckoview/android with --host specified.
if args.power_test:
if args.app not in ["fennec", "geckoview", "refbrow", "fenix"] \
or args.host in ('localhost', '127.0.0.1'):
parser.error("Power test is only supported when running raptor on Firefox Android "
parser.error("Power test is only supported when running Raptor on Firefox Android "
"browsers when host is specified!")
# if running on geckoview/refbrow/fenix, we need an activity and intent
@ -170,14 +171,14 @@ def verify_options(parser, args):
args.activity = APPS[args.app]['default_activity']
else:
# otherwise fail out
parser.error("--activity command line argument is required!")
parser.error("--activity command-line argument is required!")
if not args.intent:
# if we have a default intent specified in APPS above, use that
if APPS[args.app].get("default_intent", None) is not None:
args.intent = APPS[args.app]['default_intent']
else:
# otherwise fail out
parser.error("--intent command line argument is required!")
parser.error("--intent command-line argument is required!")
def parse_args(argv=None):
@ -219,7 +220,7 @@ class _PrintTests(_StopAction):
filters=[self.filter_app],
**info)
if len(available_tests) == 0:
# none for that app, skip to next
# none for that app; skip to next
continue
# print in readable format
@ -237,14 +238,14 @@ class _PrintTests(_StopAction):
for next_test in available_tests:
if next_test.get("name", None) is None:
# no test name, skip it
# no test name; skip it
continue
suite = os.path.basename(next_test['manifest'])[:-4]
if suite not in test_list:
test_list[suite] = {'type': None, 'subtests': []}
# for page-load tests we want to list every subtest, so we
# for page-load tests, we want to list every subtest, so we
# can see which pages are available in which tp6-* sets
if next_test.get("type", None) is not None:
test_list[suite]['type'] = next_test['type']
@ -255,7 +256,7 @@ class _PrintTests(_StopAction):
subtest = "{0} ({1})".format(subtest, measure)
test_list[suite]['subtests'].append(subtest)
# print the list in a nice readable format
# print the list in a nice, readable format
for key in sorted(test_list.iterkeys()):
print("\n%s" % key)
print(" type: %s" % test_list[key]['type'])