Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Side by Side Diff: tests/gtest_fake/gtest_fake_base.py

Issue 12459014: Implement clustering support in run_test_cases.py. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Fixes Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Provide common functionality to simulate a google-test executable. 5 """Provide common functionality to simulate a google-test executable.
6 6
7 http://code.google.com/p/googletest/ 7 http://code.google.com/p/googletest/
8 """ 8 """
9 9
10 def get_test_output(test_name): 10 def get_test_output(test_name):
11 fixture, case = test_name.split('.', 1) 11 fixture, case = test_name.split('.', 1)
12 return ( 12 return (
13 '[==========] Running 1 test from 1 test case.\n' 13 '[==========] Running 1 test from 1 test case.\n'
14 '[----------] Global test environment set-up.\n' 14 '[----------] Global test environment set-up.\n'
15 '[----------] 1 test from %(fixture)s\n' 15 '[----------] 1 test from %(fixture)s\n'
16 '[ RUN ] %(fixture)s.%(case)s\n' 16 '[ RUN ] %(fixture)s.%(case)s\n'
17 '[ OK ] %(fixture)s.%(case)s (0 ms)\n' 17 '[ OK ] %(fixture)s.%(case)s (100 ms)\n'
18 '[----------] 1 test from %(fixture)s (0 ms total)\n' 18 '[----------] 1 test from %(fixture)s (100 ms total)\n'
19 '\n') % { 19 '\n') % {
20 'fixture': fixture, 20 'fixture': fixture,
21 'case': case, 21 'case': case,
22 } 22 }
23 23
24 24
25 def get_footer(number, total): 25 def get_footer(number, total):
26 return ( 26 return (
27 '[----------] Global test environment tear-down\n' 27 '[----------] Global test environment tear-down\n'
28 '[==========] %(number)d test from %(total)d test case ran. (0 ms total)\n' 28 '[==========] %(number)d test from %(total)d test case ran. (30 ms total)\n'
29 '[ PASSED ] %(number)d test.\n' 29 '[ PASSED ] %(number)d test.\n'
30 '\n' 30 '\n'
31 ' YOU HAVE 5 DISABLED TESTS\n' 31 ' YOU HAVE 5 DISABLED TESTS\n'
32 '\n' 32 '\n'
33 ' YOU HAVE 2 tests with ignored failures (FAILS prefix)\n') % { 33 ' YOU HAVE 2 tests with ignored failures (FAILS prefix)\n') % {
34 'number': number, 34 'number': number,
35 'total': total, 35 'total': total,
36 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698