Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 540aada3 authored by Steve Block's avatar Steve Block Committed by Android (Google) Code Review
Browse files

Merge "Add to DumpRenderTree2 the option to suppress showing results in the host browser"

parents 59e46ef7 d210fd26
Loading
Loading
Loading
Loading
+17 −11
Original line number Diff line number Diff line
@@ -3,29 +3,30 @@
"""Run layout tests on the device.

  It runs the specified tests on the device, downloads the summaries to the temporary directory
  and opens html details in the default browser.
  and optionally shows the detailed results the host's default browser.

  Usage:
    run_layout_tests.py PATH
    run_layout_tests.py --show-results-in-browser test-relative-path
"""

import sys
import logging
import optparse
import os
import sys
import subprocess
import logging
import webbrowser
import tempfile
import webbrowser

#TODO: These should not be hardcoded
RESULTS_ABSOLUTE_PATH = "/sdcard/layout-test-results/"
DETAILS_HTML = "details.html"
SUMMARY_TXT = "summary.txt"

def main():
  if len(sys.argv) > 1:
    path = sys.argv[1]
def main(options, args):
  if args:
    path = " ".join(args);
  else:
    path = ""
    path = "";

  logging.basicConfig(level=logging.INFO, format='%(message)s')

@@ -61,7 +62,12 @@ def main():
  logging.info("")

  # Open the browser with summary
  if options.show_results_in_browser != "false":
    webbrowser.open(details_html_tmp_path)

if __name__ == "__main__":
  main();
  option_parser = optparse.OptionParser(usage="Usage: %prog [options] test-relative-path")
  option_parser.add_option("", "--show-results-in-browser", default="true",
                           help="Show the results the host's default web browser, default=true")
  options, args = option_parser.parse_args();
  main(options, args);