mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
[fenix] No issue: add gve to setup-startup-profiling.py.
This commit is contained in:
parent
9cefe650b3
commit
5504314468
@ -16,6 +16,10 @@ from subprocess import run
|
||||
|
||||
PATH_PREFIX = '/data/local/tmp'
|
||||
|
||||
PROD_FENIX = 'fenix'
|
||||
PROD_GVE = 'geckoview_example'
|
||||
PRODUCTS = [PROD_FENIX, PROD_GVE]
|
||||
|
||||
GV_CONFIG = b'''env:
|
||||
MOZ_PROFILER_STARTUP: 1
|
||||
MOZ_PROFILER_STARTUP_INTERVAL: 5
|
||||
@ -34,6 +38,8 @@ def parse_args():
|
||||
"profiling for the given release channel"))
|
||||
p.add_argument('release_channel', choices=['nightly', 'beta', 'release', 'debug'], help=("the release channel to "
|
||||
"change the startup profiling state of the command on"))
|
||||
|
||||
p.add_argument('-p', '--product', choices=PRODUCTS, default=PROD_FENIX, help="which product to work on")
|
||||
return p.parse_args()
|
||||
|
||||
|
||||
@ -61,9 +67,8 @@ def remove(filename):
|
||||
run(['adb', 'shell', 'am', 'clear-debug-app'])
|
||||
|
||||
|
||||
def convert_channel_to_id(channel):
|
||||
# Users might want to use custom app IDs in the future
|
||||
# but we don't know that's a need yet: let's add it if it is.
|
||||
def convert_channel_to_id(product, channel):
|
||||
if product == PROD_FENIX:
|
||||
mapping = {
|
||||
'release': 'org.mozilla.firefox',
|
||||
'beta': 'org.mozilla.firefox_beta',
|
||||
@ -71,12 +76,14 @@ def convert_channel_to_id(channel):
|
||||
'debug': 'org.mozilla.fenix.debug'
|
||||
}
|
||||
return mapping[channel]
|
||||
elif product == PROD_GVE:
|
||||
return 'org.mozilla.geckoview_example'
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
id = convert_channel_to_id(args.release_channel)
|
||||
id = convert_channel_to_id(args.product, args.release_channel)
|
||||
filename = id + '-geckoview-config.yaml'
|
||||
|
||||
if args.command == 'activate':
|
||||
|
Loading…
Reference in New Issue
Block a user