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

Unified Diff: run_test_cases.py

Issue 12218018: Fix --gtest_output=xml: support. (Closed) Base URL: https://git.chromium.org/chromium/tools/swarm_client.git@master
Patch Set: typo Created 7 years, 10 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 | « no previous file | tests/gtest_fake/gtest_fake_xml.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: run_test_cases.py
diff --git a/run_test_cases.py b/run_test_cases.py
index f50974ea7e25734b50833a6a6ea95675353a16ef..f2bb7caea9c3f1aa863a6035911ebcc7782520d4 100755
--- a/run_test_cases.py
+++ b/run_test_cases.py
@@ -766,7 +766,9 @@ def run_test_cases(
if gtest_output.startswith('xml'):
# Have each shard write an XML file and them merge them all.
tempdir = tempfile.mkdtemp(prefix='run_test_cases')
- cmd.append('--gtest_output=xml:' + tempdir)
+ # The real google-test requires a trailing os.path.sep when a directory
+ # is used.
+ cmd.append('--gtest_output=xml:' + tempdir + os.path.sep)
# Figure out the result filepath in case we can't parse it, it'd be
# annoying to error out after running the tests.
if gtest_output == 'xml':
@@ -835,7 +837,8 @@ def run_test_cases(
# TODO(maruel): It would automatically add 0, 1, 2 when a previous
# one exists.
gtest_output = os.path.join(gtest_output, 'test_detail.xml')
- print('Saving gtest compatible XML file to: %s' % gtest_output)
+ sys.stdout.write(
+ '\nSaving gtest compatible XML file to: %s\n' % gtest_output)
with open(gtest_output, 'w') as f:
result.writexml(f)
else:
« no previous file with comments | « no previous file | tests/gtest_fake/gtest_fake_xml.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698