diff --git a/tools/run_benchmark.py b/tools/run_benchmark.py index bf5b73186..301d89d49 100644 --- a/tools/run_benchmark.py +++ b/tools/run_benchmark.py @@ -12,6 +12,7 @@ the JSON output file in firefox (or another browser of your choice if you pass t """ ff_browser = 'firefox' +target_directory = '{cwd}/app/build/'.format(cwd=os.getcwd()) output_path = '/storage/emulated/0/benchmark/' output_file = 'org.mozilla.fenix-benchmarkData.json' file_url = "file:///" @@ -36,13 +37,14 @@ def run_benchmark(class_to_test): def fetch_benchmark_results(): subprocess.run( ['adb', 'pull', "{path}{file}".format(path=output_path, file=output_file)], - check=True, text=True) + cwd=target_directory,check=True, text=True) print("The benchmark results can be seen here: {file_path}" .format(file_path=os.path.abspath("./{file}".format(file=file_url)))) def open_in_browser(): - abs_path = os.path.abspath("./{file}".format(file=output_file)) + abs_path = os.path.abspath("{target_directory}{file}".format(target_directory=target_directory, + file=output_file)) webbrowser.get(ff_browser).open_new(file_url+abs_path)