Commit 094d0cd9 authored by Simon's avatar Simon Committed by Commit Bot

Perf Try - Add --output-format=html to all jobs.

For perf try jobs, you must specify --output-format=html in order to produce an HTML results file that can be displayed on the build page. 

This CL adds the flag if no --output-format is specified, or if none of the existing formats is html.

Bug: chromium:762570
Change-Id: I5e39937faa64fa7d6bfb2a643e22eac426ff17b1
Reviewed-on: https://chromium-review.googlesource.com/661056Reviewed-by: default avatarAnnie Sullivan <sullivan@chromium.org>
Commit-Queue: Simon Hatch <simonhatch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501653}
parent 91107ba2
...@@ -416,6 +416,12 @@ E.g., ...@@ -416,6 +416,12 @@ E.g.,
else: else:
arguments.insert(1, '--browser=release') arguments.insert(1, '--browser=release')
dummy_parser = argparse.ArgumentParser()
dummy_parser.add_argument('--output-format', action='append')
args, _ = dummy_parser.parse_known_args(arguments)
if not args.output_format or 'html' not in args.output_format:
arguments.append('--output-format=html')
command = ' '.join(arguments) command = ' '.join(arguments)
return { return {
......
...@@ -135,7 +135,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -135,7 +135,8 @@ class TrybotCommandTest(unittest.TestCase):
def _ExpectedGitTryTestArgs(self, test_name, browser, target_arch='ia32'): def _ExpectedGitTryTestArgs(self, test_name, browser, target_arch='ia32'):
return ('perf_try_config={' return ('perf_try_config={'
'"repeat_count": "1", "command": "src/tools/perf/run_benchmark ' '"repeat_count": "1", "command": "src/tools/perf/run_benchmark '
'--browser=%s %s --verbose", "max_time_minutes": "120", ' '--browser=%s %s --verbose --output-format=html", '
'"max_time_minutes": "120", '
'"target_arch": "%s", "truncate_percent": "0"}' % ( '"target_arch": "%s", "truncate_percent": "0"}' % (
browser, test_name, target_arch)) browser, test_name, target_arch))
...@@ -398,7 +399,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -398,7 +399,8 @@ class TrybotCommandTest(unittest.TestCase):
config, _ = self._GetConfigForTrybot('android-nexus4', 'android') config, _ = self._GetConfigForTrybot('android-nexus4', 'android')
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=android-chromium sunspider --verbose'), '--browser=android-chromium sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'ia32', 'target_arch': 'ia32',
...@@ -410,7 +412,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -410,7 +412,8 @@ class TrybotCommandTest(unittest.TestCase):
'android-webview-nexus6-aosp', 'android-webview') 'android-webview-nexus6-aosp', 'android-webview')
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=android-webview sunspider --verbose'), '--browser=android-webview sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'ia32', 'target_arch': 'ia32',
...@@ -421,7 +424,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -421,7 +424,8 @@ class TrybotCommandTest(unittest.TestCase):
config, _ = self._GetConfigForTrybot('mac-10-9', 'mac') config, _ = self._GetConfigForTrybot('mac-10-9', 'mac')
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=release sunspider --verbose'), '--browser=release sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'ia32', 'target_arch': 'ia32',
...@@ -433,7 +437,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -433,7 +437,8 @@ class TrybotCommandTest(unittest.TestCase):
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=release_x64 sunspider --verbose'), '--browser=release_x64 sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'x64', 'target_arch': 'x64',
...@@ -445,7 +450,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -445,7 +450,8 @@ class TrybotCommandTest(unittest.TestCase):
'win-x64', 'win-x64', extra_benchmark_args=['-v']) 'win-x64', 'win-x64', extra_benchmark_args=['-v'])
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=release_x64 sunspider -v'), '--browser=release_x64 sunspider -v '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'x64', 'target_arch': 'x64',
...@@ -456,7 +462,8 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -456,7 +462,8 @@ class TrybotCommandTest(unittest.TestCase):
config, _ = self._GetConfigForTrybot('winx64nvidia', 'win-x64') config, _ = self._GetConfigForTrybot('winx64nvidia', 'win-x64')
self.assertEquals( self.assertEquals(
{'command': ('src/tools/perf/run_benchmark ' {'command': ('src/tools/perf/run_benchmark '
'--browser=release_x64 sunspider --verbose'), '--browser=release_x64 sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120', 'max_time_minutes': '120',
'repeat_count': '1', 'repeat_count': '1',
'target_arch': 'x64', 'target_arch': 'x64',
...@@ -471,6 +478,57 @@ class TrybotCommandTest(unittest.TestCase): ...@@ -471,6 +478,57 @@ class TrybotCommandTest(unittest.TestCase):
{'win_perf_bisect': 'stuff'} {'win_perf_bisect': 'stuff'}
) )
def testConfig_EmptyOutputFormat_AddsHtml(self):
config, _ = self._GetConfigForTrybot('android-nexus4', 'android')
self.assertEquals(
{'command': ('src/tools/perf/run_benchmark '
'--browser=android-chromium sunspider --verbose '
'--output-format=html'),
'max_time_minutes': '120',
'repeat_count': '1',
'target_arch': 'ia32',
'truncate_percent': '0'
}, config)
def testConfig_OtherOutputFormat_AddsHtml(self):
config, _ = self._GetConfigForTrybot('android-nexus4', 'android',
extra_benchmark_args=['--output-format=foo'])
self.assertEquals(
{'command': ('src/tools/perf/run_benchmark '
'--browser=android-chromium sunspider --output-format=foo '
'--verbose --output-format=html'),
'max_time_minutes': '120',
'repeat_count': '1',
'target_arch': 'ia32',
'truncate_percent': '0'
}, config)
def testConfig_HtmlOutputFormat_Skipped(self):
config, _ = self._GetConfigForTrybot('android-nexus4', 'android',
extra_benchmark_args=['--output-format', 'html'])
self.assertEquals(
{'command': ('src/tools/perf/run_benchmark '
'--browser=android-chromium sunspider '
'--output-format html --verbose'),
'max_time_minutes': '120',
'repeat_count': '1',
'target_arch': 'ia32',
'truncate_percent': '0'
}, config)
def testConfig_HtmlOutputFormat_UsesEquals_Skipped(self):
config, _ = self._GetConfigForTrybot('android-nexus4', 'android',
extra_benchmark_args=['--output-format=html'])
self.assertEquals(
{'command': ('src/tools/perf/run_benchmark '
'--browser=android-chromium sunspider '
'--output-format=html --verbose'),
'max_time_minutes': '120',
'repeat_count': '1',
'target_arch': 'ia32',
'truncate_percent': '0'
}, config)
def testGetChangeListCommandError(self): def testGetChangeListCommandError(self):
temp_file = self._MockTempFile(None, None) temp_file = self._MockTempFile(None, None)
command, _ = self._SetupTrybotCommand( command, _ = self._SetupTrybotCommand(
......
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