Commit a43b4bf8 authored by Carlos Garcia Campos's avatar Carlos Garcia Campos

regtest: Add a command line option to create-report command to not launch the browser

parent 11395827
......@@ -263,7 +263,7 @@ class HTMLReport:
except:
raise
def create(self):
def create(self, launch_browser):
html = "<html><body><a name='top'></a>"
if self.config.backends:
backends = [get_backend(name) for name in self.config.backends]
......@@ -323,4 +323,5 @@ class HTMLReport:
f.write(html)
f.close()
subprocess.Popen(['xdg-open', report_index])
if launch_browser:
subprocess.Popen(['xdg-open', report_index])
......@@ -40,6 +40,9 @@ class CreateReport(Command):
parser.add_argument('-p', '--pretty-diff',
action = 'store_true', dest = 'pretty_diff', default = False,
help = 'Include pretty diff output')
parser.add_argument('-n', '--no-browser',
action = 'store_false', dest = 'launch_browser', default = True,
help = 'Do not launch a web browser with the results')
parser.add_argument('tests')
def run(self, options):
......@@ -53,7 +56,7 @@ class CreateReport(Command):
docs_dir = os.path.dirname(doc)
report = HTMLReport(docs_dir, options['refs_dir'], options['out_dir'])
report.create()
report.create(options['launch_browser'])
return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment