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

Side by Side Diff: tools/isolate/data/gtest_fake/gtest_fake_base.py

Issue 10825010: Run_test_case.py now returns 1 when at least 1 test fails. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
M-A Ruel 2012/07/25 16:03:20 This file is not executable.
csharp 2012/07/25 16:55:22 Done.
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Provide common functionality to simulate a google-test executable.
7
8 http://code.google.com/p/googletest/
9 """
10
11 def get_test_output(test_name):
12 fixture, case = test_name.split('.', 1)
13 return (
14 '[==========] Running 1 test from 1 test case.\n'
15 '[----------] Global test environment set-up.\n'
16 '[----------] 1 test from %(fixture)s\n'
17 '[ RUN ] %(fixture)s.%(case)s\n'
18 '[ OK ] %(fixture)s.%(case)s (0 ms)\n'
19 '[----------] 1 test from %(fixture)s (0 ms total)\n'
20 '\n') % {
21 'fixture': fixture,
22 'case': case,
23 }
24
25
26 def get_footer(number, total):
27 return (
28 '[----------] Global test environment tear-down\n'
29 '[==========] %(number)d test from %(total)d test case ran. (0 ms total)\n'
30 '[ PASSED ] %(number)d test.\n'
31 '\n'
32 ' YOU HAVE 5 DISABLED TESTS\n'
33 '\n'
34 ' YOU HAVE 2 tests with ignored failures (FAILS prefix)\n') % {
35 'number': number,
36 'total': total,
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698