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

Unified Diff: tests/gtest_fake/gtest_fake_base.py

Issue 12976005: Get rid of the single test_case code path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Rebase take two 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/gtest_fake/expected.xml ('k') | tests/run_test_cases_smoke_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gtest_fake/gtest_fake_base.py
diff --git a/tests/gtest_fake/gtest_fake_base.py b/tests/gtest_fake/gtest_fake_base.py
index 59715ec0f1fa943f6db67fcd815a49f58a13667c..c41f468be8e580701bf483942ece5593b9c0d3b4 100644
--- a/tests/gtest_fake/gtest_fake_base.py
+++ b/tests/gtest_fake/gtest_fake_base.py
@@ -7,19 +7,28 @@
http://code.google.com/p/googletest/
"""
-def get_test_output(test_name, failed):
+
+def get_test_output_inner(test_name, failed):
fixture, case = test_name.split('.', 1)
return (
+ '[ RUN ] %(fixture)s.%(case)s\n'
+ '%(result)s %(fixture)s.%(case)s (100 ms)\n') % {
+ 'fixture': fixture,
+ 'case': case,
+ 'result': '[ FAILED ]' if failed else '[ OK ]',
+ }
+
+def get_test_output(test_name, failed):
+ fixture, _ = test_name.split('.', 1)
+ return (
'[==========] Running 1 test from 1 test case.\n'
'[----------] Global test environment set-up.\n'
+ '%(content)s'
'[----------] 1 test from %(fixture)s\n'
- '[ RUN ] %(fixture)s.%(case)s\n'
- '%(result)s %(fixture)s.%(case)s (100 ms)\n'
'[----------] 1 test from %(fixture)s (100 ms total)\n'
'\n') % {
+ 'content': get_test_output_inner(test_name, failed),
'fixture': fixture,
- 'case': case,
- 'result': '[ FAILED ]' if failed else '[ OK ]',
}
« no previous file with comments | « tests/gtest_fake/expected.xml ('k') | tests/run_test_cases_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698