[LNT] r198669 - Prepare submit for being used in two phase commits.
Chris Matthews
cmatthews5 at apple.com
Mon Jan 6 18:39:42 PST 2014
Author: cmatthews
Date: Mon Jan 6 20:39:41 2014
New Revision: 198669
URL: http://llvm.org/viewvc/llvm-project?rev=198669&view=rev
Log:
Prepare submit for being used in two phase commits.
Change submit to return results from the server, so they can be used to determine needed reruns. Also prepare submit for two phase commit by disabling printing when needed, so that we can make a silent first phase commit to the server.
Modified:
lnt/trunk/lnt/tests/builtintest.py
Modified: lnt/trunk/lnt/tests/builtintest.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/builtintest.py?rev=198669&r1=198668&r2=198669&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/builtintest.py (original)
+++ lnt/trunk/lnt/tests/builtintest.py Mon Jan 6 20:39:41 2014
@@ -46,7 +46,7 @@ class BuiltinTest(object):
if output_stream is not sys.stdout:
output_stream.close()
- def submit(self, report_path, config, commit=True):
+ def submit(self, report_path, config, commit=True, print_report=True):
"""Submit the results file to the server. If no server
was specified, use a local mock server.
@@ -55,6 +55,7 @@ class BuiltinTest(object):
is true, results will be saved in the server, otherwise you
will just get back a report but server state is not altered.
+ Returns the report generated by the LNT server.
"""
assert os.path.exists(report_path), "Failed report should have never gotten here!"
result = None
@@ -74,7 +75,8 @@ class BuiltinTest(object):
result = ImportData.import_and_report(
None, None, db, report_path, 'json', commit = True)
assert result is not None, "Results were not submitted."
- ImportData.print_report_result(result, sys.stdout, sys.stderr,
- config.verbose)
-
+ if print_report:
+ ImportData.print_report_result(result, sys.stdout, sys.stderr,
+ config.verbose)
+ return result
More information about the llvm-commits
mailing list