diff options
Diffstat (limited to 'crosperf/results_organizer_unittest.py')
-rwxr-xr-x | crosperf/results_organizer_unittest.py | 161 |
1 files changed, 110 insertions, 51 deletions
diff --git a/crosperf/results_organizer_unittest.py b/crosperf/results_organizer_unittest.py index ccf02973..e7657373 100755 --- a/crosperf/results_organizer_unittest.py +++ b/crosperf/results_organizer_unittest.py @@ -3,12 +3,11 @@ # Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - """Testing of ResultsOrganizer We create some labels, benchmark_runs and then create a ResultsOrganizer, after that, we compare the result of ResultOrganizer. - """ +""" from __future__ import print_function @@ -20,55 +19,115 @@ from results_organizer import OrganizeResults import mock_instance -result = {'benchmark1': [[{'': 'PASS', - 'bool': 'True', - 'milliseconds_1': '1', - 'milliseconds_2': '8', - 'milliseconds_3': '9.2', - 'ms_1': '2.1', - 'total': '5'}, {'test': '2'}, {'test': '4'}, - {'': 'PASS', - 'bool': 'FALSE', - 'milliseconds_1': '3', - 'milliseconds_2': '5', - 'ms_1': '2.2', - 'total': '6'}, {'test': '3'}, {'test': '4'}], - [{'': 'PASS', - 'bool': 'FALSE', - 'milliseconds_4': '30', - 'milliseconds_5': '50', - 'ms_1': '2.23', - 'total': '6'}, {'test': '5'}, {'test': '4'}, - {'': 'PASS', - 'bool': 'FALSE', - 'milliseconds_1': '3', - 'milliseconds_6': '7', - 'ms_1': '2.3', - 'total': '7'}, {'test': '2'}, {'test': '6'}]], - 'benchmark2': [[{'': 'PASS', - 'bool': 'TRUE', - 'milliseconds_1': '3', - 'milliseconds_8': '6', - 'ms_1': '2.3', - 'total': '7'}, {'test': '2'}, {'test': '6'}, - {'': 'PASS', - 'bool': 'TRUE', - 'milliseconds_1': '3', - 'milliseconds_8': '6', - 'ms_1': '2.2', - 'total': '7'}, {'test': '2'}, {'test': '2'}], - [{'': 'PASS', - 'bool': 'TRUE', - 'milliseconds_1': '3', - 'milliseconds_8': '6', - 'ms_1': '2', - 'total': '7'}, {'test': '2'}, {'test': '4'}, - {'': 'PASS', - 'bool': 'TRUE', - 'milliseconds_1': '3', - 'milliseconds_8': '6', - 'ms_1': '1', - 'total': '7'}, {'test': '1'}, {'test': '6'}]]} +result = { + 'benchmark1': [[{ + '': 'PASS', + 'bool': 'True', + 'milliseconds_1': '1', + 'milliseconds_2': '8', + 'milliseconds_3': '9.2', + 'ms_1': '2.1', + 'total': '5' + }, { + '': 'PASS', + 'test': '2' + }, { + '': 'PASS', + 'test': '4' + }, { + '': 'PASS', + 'bool': 'FALSE', + 'milliseconds_1': '3', + 'milliseconds_2': '5', + 'ms_1': '2.2', + 'total': '6' + }, { + '': 'PASS', + 'test': '3' + }, { + '': 'PASS', + 'test': '4' + }], [{ + '': 'PASS', + 'bool': 'FALSE', + 'milliseconds_4': '30', + 'milliseconds_5': '50', + 'ms_1': '2.23', + 'total': '6' + }, { + '': 'PASS', + 'test': '5' + }, { + '': 'PASS', + 'test': '4' + }, { + '': 'PASS', + 'bool': 'FALSE', + 'milliseconds_1': '3', + 'milliseconds_6': '7', + 'ms_1': '2.3', + 'total': '7' + }, { + '': 'PASS', + 'test': '2' + }, { + '': 'PASS', + 'test': '6' + }]], + 'benchmark2': [[{ + '': 'PASS', + 'bool': 'TRUE', + 'milliseconds_1': '3', + 'milliseconds_8': '6', + 'ms_1': '2.3', + 'total': '7' + }, { + '': 'PASS', + 'test': '2' + }, { + '': 'PASS', + 'test': '6' + }, { + '': 'PASS', + 'bool': 'TRUE', + 'milliseconds_1': '3', + 'milliseconds_8': '6', + 'ms_1': '2.2', + 'total': '7' + }, { + '': 'PASS', + 'test': '2' + }, { + '': 'PASS', + 'test': '2' + }], [{ + '': 'PASS', + 'bool': 'TRUE', + 'milliseconds_1': '3', + 'milliseconds_8': '6', + 'ms_1': '2', + 'total': '7' + }, { + '': 'PASS', + 'test': '2' + }, { + '': 'PASS', + 'test': '4' + }, { + '': 'PASS', + 'bool': 'TRUE', + 'milliseconds_1': '3', + 'milliseconds_8': '6', + 'ms_1': '1', + 'total': '7' + }, { + '': 'PASS', + 'test': '1' + }, { + '': 'PASS', + 'test': '6' + }]] +} class ResultOrganizerTest(unittest.TestCase): |