[LNT] r312068 - Remove --commit/--commit=0 flags/settings.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 16:43:41 PDT 2017


Author: matze
Date: Tue Aug 29 16:43:41 2017
New Revision: 312068

URL: http://llvm.org/viewvc/llvm-project?rev=312068&view=rev
Log:
Remove --commit/--commit=0 flags/settings.

This removes the possibility to not commit a run. It was easy to forget
to pass the commit flag by accident while when you wanted to check the
submission syntax you could just as well use `lnt checkformat` instead
of submitting without commit.

This also reverts most of the changes in r308256; as there is little use
in making the flag simpler to use when we can just remove it instead.

Note that the --commit=0/1 flags are still accepted (but ignore) to
accomodate old scripts. We also pass 'commit': '1' when submitting to
server so that submissions to old servers still work.

Differential Revision: https://reviews.llvm.org/D35588

Modified:
    lnt/trunk/docs/importing_data.rst
    lnt/trunk/docs/quickstart.rst
    lnt/trunk/docs/tests.rst
    lnt/trunk/docs/tools.rst
    lnt/trunk/lnt/lnttool/common.py
    lnt/trunk/lnt/lnttool/import_data.py
    lnt/trunk/lnt/lnttool/main.py
    lnt/trunk/lnt/lnttool/updatedb.py
    lnt/trunk/lnt/lnttool/viewcomparison.py
    lnt/trunk/lnt/server/db/testsuitedb.py
    lnt/trunk/lnt/server/ui/templates/submit_run.html
    lnt/trunk/lnt/server/ui/views.py
    lnt/trunk/lnt/tests/builtintest.py
    lnt/trunk/lnt/tests/nt.py
    lnt/trunk/lnt/tests/test_suite.py
    lnt/trunk/lnt/util/ImportData.py
    lnt/trunk/lnt/util/ServerUtil.py
    lnt/trunk/tests/lnttool/MySQLDB.shtest
    lnt/trunk/tests/lnttool/PostgresDB.shtest
    lnt/trunk/tests/lnttool/UpdateDB.py
    lnt/trunk/tests/lnttool/submit.shtest
    lnt/trunk/tests/runtest/nt.py
    lnt/trunk/tests/runtest/rerun.py
    lnt/trunk/tests/server/db/ImportProfile.py
    lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py
    lnt/trunk/tests/server/db/search.py
    lnt/trunk/tests/server/db/yamlschema.shtest
    lnt/trunk/tests/utils/blast.py

Modified: lnt/trunk/docs/importing_data.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/importing_data.rst?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/docs/importing_data.rst (original)
+++ lnt/trunk/docs/importing_data.rst Tue Aug 29 16:43:41 2017
@@ -21,7 +21,7 @@ Example::
 
     echo -n "foo.exec 25\nbar.score 24.2\nbar/baz.size 110.0\n" > results.txt
     lnt importreport --machine=my-machine-name --order=1234 --testsuite=nts results.txt report.json
-    lnt submit http://mylnt.com/default/submitRun --commit report.json
+    lnt submit http://mylnt.com/default/submitRun report.json
 
 .. _json_format:
 

Modified: lnt/trunk/docs/quickstart.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/quickstart.rst?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/docs/quickstart.rst (original)
+++ lnt/trunk/docs/quickstart.rst Tue Aug 29 16:43:41 2017
@@ -111,7 +111,7 @@ results.
 
 Once you have a local instance, you can either submit results directly with::
 
-     lnt import --commit=1 ~/myperfdb SANDBOX/test-<stamp>/report.json
+     lnt import ~/myperfdb SANDBOX/test-<stamp>/report.json
 
 or as part of a run with::
 

Modified: lnt/trunk/docs/tests.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/tests.rst?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/docs/tests.rst (original)
+++ lnt/trunk/docs/tests.rst Tue Aug 29 16:43:41 2017
@@ -160,7 +160,7 @@ The final test step was to generate a te
 directory. This report can now be submitted directly to an LNT server. For
 example, if we have a local server running as described earlier, we can run::
 
-  $ lnt submit --commit http://localhost:8000/submitRun \
+  $ lnt submit http://localhost:8000/submitRun \
       /tmp/BAR/test-2010-04-17_23-46-40/report.json
   STATUS: 0
 

Modified: lnt/trunk/docs/tools.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/tools.rst?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/docs/tools.rst (original)
+++ lnt/trunk/docs/tools.rst Tue Aug 29 16:43:41 2017
@@ -27,15 +27,11 @@ Client-Side Tools
   ``lnt importreport <input path> [<output path>]``
     Convert text based key value pairs into a LNT json report file.
 
-  ``lnt submit [--commit] <server url> <file>+``
+  ``lnt submit <server url> <file>+``
     Submits one or more files to the given server. The ``<server url>`` should
     be the url to the actual ``submitRun`` page on the server; the database
     being submitted to is effectively a part of this URL.
 
-    By default, this only submits the report to the server but does not actually
-    commit the data. When testing, you should verify that the server returns an
-    acceptable response before committing runs.
-
   ``lnt showtests``
     List available built-in tests. See the :ref:`tests` documentation for more
     details on this tool.
@@ -109,7 +105,7 @@ The following tools are used to interact
     The default server will have a sqlite3 database named *default*. You can
     specify to use PostgreSQL using ``--db-dir postgresql://user@hostname``.
 
-  ``lnt import [--commit] <instance path> <file>+``
+  ``lnt import <instance path> <file>+``
     Import an LNT data file into a database. You can use ``--database`` to
     select the database to write to. Note that by default this will also
     generate report emails if enabled in the configuration, you can use

Modified: lnt/trunk/lnt/lnttool/common.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/common.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/common.py (original)
+++ lnt/trunk/lnt/lnttool/common.py Tue Aug 29 16:43:41 2017
@@ -4,8 +4,8 @@ import logging
 
 
 def submit_options(func):
-    func = click.option("--commit", is_flag=True,
-                        help="actually commit the data")(func)
+    func = click.option("--commit", type=int, help="deprecated/ignored option",
+                        expose_value=False)(func)
     func = click.option("--update-machine", is_flag=True,
                         help="Update machine fields")(func)
     func = click.option("--merge", default="replace", show_default=True,

Modified: lnt/trunk/lnt/lnttool/import_data.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/import_data.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/import_data.py (original)
+++ lnt/trunk/lnt/lnttool/import_data.py Tue Aug 29 16:43:41 2017
@@ -23,7 +23,7 @@ import lnt.formats
 @submit_options
 def action_import(instance_path, files, database, output_format, show_sql,
                   show_sample_count, show_raw_result, testsuite, verbose,
-                  quiet, no_email, no_report, commit, update_machine, merge):
+                  quiet, no_email, no_report, update_machine, merge):
     """import test data into a database"""
     import contextlib
     import lnt.server.instance
@@ -47,9 +47,8 @@ def action_import(instance_path, files,
         for file_name in files:
             result = lnt.util.ImportData.import_and_report(
                 config, database, db, file_name,
-                output_format, testsuite, commit, show_sample_count,
-                no_email, no_report, updateMachine=update_machine,
-                mergeRun=merge)
+                output_format, testsuite, show_sample_count, no_email,
+                no_report, updateMachine=update_machine, mergeRun=merge)
 
             success &= result.get('success', False)
             if quiet:

Modified: lnt/trunk/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/main.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/main.py (original)
+++ lnt/trunk/lnt/lnttool/main.py Tue Aug 29 16:43:41 2017
@@ -94,7 +94,7 @@ def action_checkformat(files, testsuite)
                                  lnt.server.config.Config.dummy_instance())
     for file in files:
         result = lnt.util.ImportData.import_and_report(
-            None, None, db, file, '<auto>', testsuite, commit=True)
+            None, None, db, file, '<auto>', testsuite)
         lnt.util.ImportData.print_report_result(result, sys.stdout,
                                                 sys.stderr, verbose=True)
 
@@ -181,19 +181,12 @@ def action_showtests():
 @submit_options
 @click.option("--verbose", "-v", is_flag=True,
               help="show verbose test results")
-def action_submit(url, files, commit, update_machine, merge, verbose):
+def action_submit(url, files, update_machine, merge, verbose):
     """submit a test report to the server"""
     from lnt.util import ServerUtil
     import lnt.util.ImportData
 
-    if commit:
-        commit = True
-    else:
-        commit = False
-        logger.warning("submit called without --commit, " +
-                       "your results will not be saved at the server.")
-
-    files = ServerUtil.submitFiles(url, files, commit, verbose,
+    files = ServerUtil.submitFiles(url, files, verbose,
                                    updateMachine=update_machine,
                                    mergeRun=merge)
     for submitted_file in files:
@@ -492,42 +485,30 @@ def show_version(ctx, param, value):
 @click.group(invoke_without_command=True, no_args_is_help=True)
 @click.option('--version', is_flag=True, callback=show_version,
               expose_value=False, is_eager=True, help=show_version.__doc__)
-def cli():
+def main():
     """LNT command line tool
 
 \b
 Use ``lnt <command> --help`` for more information on a specific command.
     """
-cli.add_command(action_check_no_errors)
-cli.add_command(action_checkformat)
-cli.add_command(action_convert)
-cli.add_command(action_create)
-cli.add_command(action_import)
-cli.add_command(action_importreport)
-cli.add_command(action_profile)
-cli.add_command(action_runserver)
-cli.add_command(action_send_daily_report)
-cli.add_command(action_send_run_comparison)
-cli.add_command(action_showtests)
-cli.add_command(action_submit)
-cli.add_command(action_update)
-cli.add_command(action_updatedb)
-cli.add_command(action_view_comparison)
-cli.add_command(group_admin)
-cli.add_command(group_runtest)
-
-
-def main():
     _version_check()
-    # Change deprecated `--commit=1` and `--commit 1` options to new ones.
-    for i in range(1, len(sys.argv)):
-        arg = sys.argv[i]
-        if arg == '--commit=1':
-            sys.argv[i] = '--commit'
-        if arg == '--commit' and i+1 < len(sys.argv) and sys.argv[i+1] == '1':
-            del sys.argv[i+1]
-            break
-    cli()
+main.add_command(action_check_no_errors)
+main.add_command(action_checkformat)
+main.add_command(action_convert)
+main.add_command(action_create)
+main.add_command(action_import)
+main.add_command(action_importreport)
+main.add_command(action_profile)
+main.add_command(action_runserver)
+main.add_command(action_send_daily_report)
+main.add_command(action_send_run_comparison)
+main.add_command(action_showtests)
+main.add_command(action_submit)
+main.add_command(action_update)
+main.add_command(action_updatedb)
+main.add_command(action_view_comparison)
+main.add_command(group_admin)
+main.add_command(group_runtest)
 
 
 if __name__ == '__main__':

Modified: lnt/trunk/lnt/lnttool/updatedb.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/updatedb.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/updatedb.py (original)
+++ lnt/trunk/lnt/lnttool/updatedb.py Tue Aug 29 16:43:41 2017
@@ -8,7 +8,6 @@ import click
 @click.option("--testsuite", required=True, help="testsuite to modify")
 @click.option("--tmp-dir", default="lnt_tmp", show_default=True,
               help="name of the temp file directory")
- at click.option("--commit", is_flag=True, help="commit changes to the database")
 @click.option("--show-sql", is_flag=True,
               help="show SQL statements")
 @click.option("--delete-machine", "delete_machines", default=[],
@@ -18,8 +17,8 @@ import click
               multiple=True, help="run ids to delete", type=int)
 @click.option("--delete-order", default=[], show_default=True,
               help="run ids to delete")
-def action_updatedb(instance_path, database, testsuite, tmp_dir, commit,
-                    show_sql, delete_machines, delete_runs, delete_order):
+def action_updatedb(instance_path, database, testsuite, tmp_dir, show_sql,
+                    delete_machines, delete_runs, delete_order):
     """modify a database"""
     from .common import init_logger
     from lnt.util import logger
@@ -52,7 +51,4 @@ def action_updatedb(instance_path, datab
             for machine in machines:
                 ts.delete(machine)
 
-        if commit:
-            db.commit()
-        else:
-            db.rollback()
+        db.commit()

Modified: lnt/trunk/lnt/lnttool/viewcomparison.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/viewcomparison.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/viewcomparison.py (original)
+++ lnt/trunk/lnt/lnttool/viewcomparison.py Tue Aug 29 16:43:41 2017
@@ -84,9 +84,9 @@ def action_view_comparison(report_a, rep
         # Import the two reports.
         with contextlib.closing(config.get_database('default')) as db:
             r = import_and_report(config, 'default', db, report_a, '<auto>',
-                                  testsuite, commit=True, updateMachine=True)
+                                  testsuite, updateMachine=True)
             import_and_report(config, 'default', db, report_b, '<auto>',
-                              testsuite, commit=True, updateMachine=True)
+                              testsuite, updateMachine=True)
 
             # Dispatch another thread to start the webbrowser.
             comparison_url = '%s/v4/nts/2?compare_to=1' % (url,)

Modified: lnt/trunk/lnt/server/db/testsuitedb.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/testsuitedb.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/testsuitedb.py (original)
+++ lnt/trunk/lnt/server/db/testsuitedb.py Tue Aug 29 16:43:41 2017
@@ -1014,7 +1014,7 @@ class TestSuiteDB(object):
 
     def importDataFromDict(self, data, config, updateMachine, mergeRun):
         """
-        importDataFromDict(data, commit, config, updateMachine, mergeRun)
+        importDataFromDict(data, config, updateMachine, mergeRun)
             -> Run  (or throws ValueError exception)
 
         Import a new run from the provided test interchange data, and return

Modified: lnt/trunk/lnt/server/ui/templates/submit_run.html
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/submit_run.html?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/templates/submit_run.html (original)
+++ lnt/trunk/lnt/server/ui/templates/submit_run.html Tue Aug 29 16:43:41 2017
@@ -14,12 +14,6 @@
 <p><b>Input Data (plist):</b><br/>
 <textarea name="input_data"></textarea>
 
-<p><b>Commit*:</b><br/>
-<select name="commit">
-<option selected="selected" value="0">0</option>
-<option value="1">1</option>
-</select><br/>
-
 <p><b>Update Machine:</b><br/>
 <select name="update_machine">
 <option selected="selected" value="0">0</option>

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Tue Aug 29 16:43:41 2017
@@ -102,7 +102,6 @@ def _do_submit():
     assert request.method == 'POST'
     input_file = request.files.get('file')
     input_data = request.form.get('input_data')
-    commit = int(request.form.get('commit', 0)) != 0
     updateMachine = int(request.form.get('update_machine', 0)) != 0
     merge = request.form.get('merge', 'replace')
 
@@ -144,7 +143,7 @@ def _do_submit():
 
     result = lnt.util.ImportData.import_from_string(
         current_app.old_config, g.db_name, db, g.testsuite_name, data_value,
-        commit=commit, updateMachine=updateMachine, mergeRun=merge)
+        updateMachine=updateMachine, mergeRun=merge)
 
     # It is nice to have a full URL to the run, so fixup the request URL
     # here were we know more about the flask instance.

Modified: lnt/trunk/lnt/tests/builtintest.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/builtintest.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/builtintest.py (original)
+++ lnt/trunk/lnt/tests/builtintest.py Tue Aug 29 16:43:41 2017
@@ -58,14 +58,12 @@ class BuiltinTest(object):
         if output_stream is not sys.stdout:
             output_stream.close()
 
-    def submit(self, report_path, config, ts_name=None, commit=True):
+    def submit(self, report_path, config, ts_name=None):
         """Submit the results file to the server.  If no server
         was specified, use a local mock server.
 
         report_path is the location of the json report file.  config
-        holds options for submission url, and verbosity.  When commit
-        is true, results will be saved in the server, otherwise you
-        will just get back a report but server state is not altered.
+        holds options for submission url, and verbosity.
 
         Returns the report from the server.
         """
@@ -77,7 +75,7 @@ class BuiltinTest(object):
         if config.submit_url is not None:
             self.log("submitting result to %r" % (config.submit_url,))
             server_report = ServerUtil.submitFile(
-                config.submit_url, report_path, commit, config.verbose,
+                config.submit_url, report_path, config.verbose,
                 updateMachine=config.update_machine, mergeRun=config.merge)
         else:
             server_report = lnt.util.ImportData.no_submit()

Modified: lnt/trunk/lnt/tests/nt.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/nt.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/nt.py (original)
+++ lnt/trunk/lnt/tests/nt.py Tue Aug 29 16:43:41 2017
@@ -1694,8 +1694,9 @@ class NTTest(builtintest.BuiltinTest):
             test_results = run_test(opts.label, None, config)
             if opts.rerun:
                 self.log("Performing any needed reruns.")
-                server_report = self.submit_helper(config, commit=False)
-                new_samples = _process_reruns(config, server_report, test_results)
+                server_report = self.submit_helper(config)
+                new_samples = _process_reruns(config, server_report,
+                                              test_results)
                 test_results.update_report(new_samples)
 
                 # persist report with new samples.
@@ -1708,8 +1709,7 @@ class NTTest(builtintest.BuiltinTest):
             if config.output is not None:
                 self.print_report(test_results, config.output)
 
-        commit = True
-        server_report = self.submit_helper(config, commit)
+        server_report = self.submit_helper(config)
 
         ImportData.print_report_result(server_report,
                                        sys.stdout,
@@ -1717,7 +1717,7 @@ class NTTest(builtintest.BuiltinTest):
                                        config.verbose)
         return server_report
 
-    def submit_helper(self, config, commit=False):
+    def submit_helper(self, config):
         """Submit the report to the server.  If no server
         was specified, use a local mock server.
         """
@@ -1731,8 +1731,7 @@ class NTTest(builtintest.BuiltinTest):
             for server in config.submit_url:
                 self.log("submitting result to %r" % (server,))
                 try:
-                    result = ServerUtil.submitFile(server, report_path,
-                                                   commit, False)
+                    result = ServerUtil.submitFile(server, report_path, False)
                 except (urllib2.HTTPError, urllib2.URLError) as e:
                     logger.warning("submitting to {} failed with {}"
                                    .format(server, e))
@@ -1746,7 +1745,7 @@ class NTTest(builtintest.BuiltinTest):
             db = lnt.server.db.v4db.V4DB("sqlite:///:memory:",
                                          lnt.server.config.Config.dummy_instance())
             result = lnt.util.ImportData.import_and_report(
-                None, None, db, report_path, 'json', 'nts', commit)
+                None, None, db, report_path, 'json', 'nts')
 
         if result is None:
             fatal("Results were not obtained from submission.")

Modified: lnt/trunk/lnt/tests/test_suite.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/tests/test_suite.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/tests/test_suite.py (original)
+++ lnt/trunk/lnt/tests/test_suite.py Tue Aug 29 16:43:41 2017
@@ -351,7 +351,7 @@ class TestSuiteTest(BuiltinTest):
         with open(csv_report_path, 'w') as fd:
             fd.write(str_template)
 
-        return self.submit(report_path, self.opts, 'nts', commit=True)
+        return self.submit(report_path, self.opts, 'nts')
 
     def _configure_if_needed(self):
         mkdir_p(self._base_path)

Modified: lnt/trunk/lnt/util/ImportData.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/util/ImportData.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/util/ImportData.py (original)
+++ lnt/trunk/lnt/util/ImportData.py Tue Aug 29 16:43:41 2017
@@ -13,18 +13,15 @@ import time
 
 
 def import_and_report(config, db_name, db, file, format, ts_name,
-                      commit=False, show_sample_count=False,
-                      disable_email=False, disable_report=False,
-                      updateMachine=False, mergeRun='replace'):
+                      show_sample_count=False, disable_email=False,
+                      disable_report=False, updateMachine=False,
+                      mergeRun='replace'):
     """
     import_and_report(config, db_name, db, file, format, ts_name,
-                      [commit], [show_sample_count],
-                      [disable_email]) -> ... object ...
+                      [show_sample_count], [disable_email]) -> ... object ...
 
     Import a test data file into an LNT server and generate a test report. On
-    success, run is the newly imported run. Note that success is uneffected by
-    the value of commit, this merely changes whether the run (on success) is
-    committed to the database.
+    success, run is the newly imported run.
 
     The result object is a dictionary containing information on the imported
     run and its comparison to the previous run.
@@ -91,7 +88,9 @@ def import_and_report(config, db_name, d
                                (data_schema, ts_name))
             return result
 
-        run = ts.importDataFromDict(data, config=db_config, updateMachine=updateMachine, mergeRun=mergeRun)
+        run = ts.importDataFromDict(data, config=db_config,
+                                    updateMachine=updateMachine,
+                                    mergeRun=mergeRun)
     except KeyboardInterrupt:
         raise
     except Exception as e:
@@ -127,20 +126,16 @@ def import_and_report(config, db_name, d
     if show_sample_count:
         result['added_samples'] = ts.getNumSamples() - numSamples
 
-    result['committed'] = commit
+    result['committed'] = True
     result['run_id'] = run.id
-    if commit:
-        ts.commit()
-        if db_config:
-            #  If we are not in a dummy instance, also run background jobs.
-            #  We have to have a commit before we run, so subprocesses can
-            #  see the submitted data.
-            async_ops.async_fieldchange_calc(db_name, ts, run, config)
+    ts.commit()
+    if db_config:
+        #  If we are not in a dummy instance, also run background jobs.
+        #  We have to have a commit before we run, so subprocesses can
+        #  see the submitted data.
+        async_ops.async_fieldchange_calc(db_name, ts, run, config)
 
-    else:
-        ts.rollback()
     # Add a handy relative link to the submitted run.
-
     result['result_url'] = "db_{}/v4/{}/{}".format(db_name, ts_name, run.id)
     result['report_time'] = time.time() - importStartTime
     result['total_time'] = time.time() - startTime
@@ -159,9 +154,8 @@ def import_and_report(config, db_name, d
             # Perform the shadow import.
             shadow_result = import_and_report(config, shadow_name,
                                               shadow_db, file, format, ts_name,
-                                              commit, show_sample_count,
-                                              disable_email, disable_report,
-                                              updateMachine)
+                                              show_sample_count, disable_email,
+                                              disable_report, updateMachine)
 
             # Append the shadow result to the result.
             result['shadow_result'] = shadow_result
@@ -272,10 +266,6 @@ def print_report_result(result, out, err
                       "already in the database.") % result['original_run']
         print >>out
 
-    if not result['committed']:
-        print >>out, "NOTE: This run was not committed!"
-        print >>out
-
     if result['report_to_address']:
         print >>out, "Report emailed to: %r" % result['report_to_address']
         print >>out
@@ -310,8 +300,8 @@ def print_report_result(result, out, err
         print >>out, kind, ":", count
 
 
-def import_from_string(config, db_name, db, ts_name, data, commit=True,
-                       updateMachine=False, mergeRun='replace'):
+def import_from_string(config, db_name, db, ts_name, data, updateMachine=False,
+                       mergeRun='replace'):
     # Stash a copy of the raw submission.
     #
     # To keep the temporary directory organized, we keep files in
@@ -339,6 +329,6 @@ def import_from_string(config, db_name,
     # should at least reject overly large inputs.
 
     result = lnt.util.ImportData.import_and_report(
-        config, db_name, db, path, '<auto>', ts_name, commit,
+        config, db_name, db, path, '<auto>', ts_name,
         updateMachine=updateMachine, mergeRun=mergeRun)
     return result

Modified: lnt/trunk/lnt/util/ServerUtil.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/util/ServerUtil.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/lnt/util/ServerUtil.py (original)
+++ lnt/trunk/lnt/util/ServerUtil.py Tue Aug 29 16:43:41 2017
@@ -29,11 +29,11 @@ def _show_json_error(reply):
         sys.stderr.write(message + '\n')
 
 
-def submitFileToServer(url, file, commit, updateMachine, mergeRun):
+def submitFileToServer(url, file, updateMachine, mergeRun):
     with open(file, 'rb') as f:
         values = {
             'input_data': f.read(),
-            'commit': "1" if commit else "0",
+            'commit': "1",  # compatibility with old servers.
             'update_machine': "1" if updateMachine else "0",
             'merge': mergeRun,
         }
@@ -63,8 +63,7 @@ def submitFileToServer(url, file, commit
     return reply
 
 
-def submitFileToInstance(path, file, commit, updateMachine=False,
-                         mergeRun='replace'):
+def submitFileToInstance(path, file, updateMachine=False, mergeRun='replace'):
     # Otherwise, assume it is a local url and submit to the default database
     # in the instance.
     instance = lnt.server.instance.Instance.frompath(path)
@@ -75,26 +74,22 @@ def submitFileToInstance(path, file, com
             raise ValueError("no default database in instance: %r" % (path,))
         return lnt.util.ImportData.import_and_report(
             config, db_name, db, file, format='<auto>', ts_name='nts',
-            commit=commit, updateMachine=updateMachine, mergeRun=mergeRun)
+            updateMachine=updateMachine, mergeRun=mergeRun)
 
 
-def submitFile(url, file, commit, verbose, updateMachine=False,
-               mergeRun='replace'):
+def submitFile(url, file, verbose, updateMachine=False, mergeRun='replace'):
     # If this is a real url, submit it using urllib.
     if '://' in url:
-        result = submitFileToServer(url, file, commit, updateMachine, mergeRun)
+        result = submitFileToServer(url, file, updateMachine, mergeRun)
     else:
-        result = submitFileToInstance(url, file, commit, updateMachine,
-                                      mergeRun)
+        result = submitFileToInstance(url, file, updateMachine, mergeRun)
     return result
 
 
-def submitFiles(url, files, commit, verbose, updateMachine=False,
-                mergeRun='replace'):
+def submitFiles(url, files, verbose, updateMachine=False, mergeRun='replace'):
     results = []
     for file in files:
-        result = submitFile(url, file, commit, verbose, updateMachine,
-                            mergeRun)
+        result = submitFile(url, file, verbose, updateMachine, mergeRun)
         if result:
             results.append(result)
     return results

Modified: lnt/trunk/tests/lnttool/MySQLDB.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/MySQLDB.shtest?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/MySQLDB.shtest (original)
+++ lnt/trunk/tests/lnttool/MySQLDB.shtest Tue Aug 29 16:43:41 2017
@@ -9,5 +9,5 @@ SHARED_INPUTS="$2"
 lnt create "${TESTDIR}/instance" --db-dir mysql://root@localhost:9109 --default-db testdb --show-sql
 
 # Import a test set.
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --show-sample-count
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-b-small.plist" --commit --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-b-small.plist" --show-sample-count

Modified: lnt/trunk/tests/lnttool/PostgresDB.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/PostgresDB.shtest?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/PostgresDB.shtest (original)
+++ lnt/trunk/tests/lnttool/PostgresDB.shtest Tue Aug 29 16:43:41 2017
@@ -12,16 +12,16 @@ createdb --maintenance-db="${PGURL}/post
 lnt create "${TESTDIR}/instance" --db-dir ${PGURL} --default-db lnt_regr_test_PostgresDB
 
 # Import a test set.
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --show-sample-count
 
 # Import a test set.
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-b-small.plist" --commit --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-b-small.plist" --show-sample-count
 
 # Check that we remove both the sample and the run, and that we don't commit by
 # default.
 #
 lnt updatedb "${TESTDIR}/instance" --testsuite nts --delete-run 1 \
-	--commit --show-sql >& "${TESTDIR}/runrm.out"
+	--show-sql >& "${TESTDIR}/runrm.out"
 # RUN: FileCheck --check-prefix CHECK-RUNRM %s < "%t.install/runrm.out"
 
 # CHECK-RUNRM: DELETE FROM "NT_Sample" WHERE "NT_Sample"."ID" = %(ID)s
@@ -31,12 +31,12 @@ lnt updatedb "${TESTDIR}/instance" --tes
 # CHECK-RUNRM: COMMIT
 
 # Import a test set.
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --show-sample-count
 
 # Check that we remove runs when we remove a machine.
 #
 lnt updatedb "${TESTDIR}/instance" --testsuite nts \
-	--delete-machine "LNT SAMPLE MACHINE" --commit \
+	--delete-machine "LNT SAMPLE MACHINE" \
 	--show-sql >& "${TESTDIR}/machinerm.out"
 # RUN: FileCheck --check-prefix CHECK-MACHINERM %s < "%t.install/machinerm.out"
 

Modified: lnt/trunk/tests/lnttool/UpdateDB.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/UpdateDB.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/UpdateDB.py (original)
+++ lnt/trunk/tests/lnttool/UpdateDB.py Tue Aug 29 16:43:41 2017
@@ -3,13 +3,12 @@
 
 # Import a test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count
+# RUN:     --show-sample-count
 
-# Check that we remove both the sample and the run, and that we don't commit by
-# default.
+# Check that we remove both the sample and the run.
 #
 # RUN: lnt updatedb %t.install --testsuite nts \
-# RUN:     --commit --delete-run 1 --show-sql >& %t.out
+# RUN:     --delete-run 1 --show-sql >& %t.out
 # RUN: FileCheck --check-prefix CHECK-RUNRM %s < %t.out
 
 # CHECK-RUNRM: DELETE FROM "NT_Sample" WHERE "NT_Sample"."ID" = ?
@@ -23,9 +22,9 @@
 # RUN: rm -rf %t.install
 # RUN: lnt create %t.install
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count
+# RUN:     --show-sample-count
 # RUN: lnt updatedb %t.install --testsuite nts \
-# RUN:     --delete-machine "LNT SAMPLE MACHINE" --commit --show-sql >& %t.out
+# RUN:     --delete-machine "LNT SAMPLE MACHINE" --show-sql >& %t.out
 # RUN: FileCheck --check-prefix CHECK-MACHINERM %s < %t.out
 
 # CHECK-MACHINERM: DELETE FROM "NT_Sample" WHERE "NT_Sample"."ID" = ?

Modified: lnt/trunk/tests/lnttool/submit.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/submit.shtest?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/submit.shtest (original)
+++ lnt/trunk/tests/lnttool/submit.shtest Tue Aug 29 16:43:41 2017
@@ -10,7 +10,7 @@ INPUTS="$2"
 SHARED_INPUTS="$3"
 SRC_ROOT="$4"
 
-lnt submit "http://localhost:9091/db_default/submitRun" --commit 1 "${SHARED_INPUTS}/sample-report.json" -v > "${OUTPUT_DIR}/submit_verbose.txt"
+lnt submit "http://localhost:9091/db_default/submitRun" "${SHARED_INPUTS}/sample-report.json" -v > "${OUTPUT_DIR}/submit_verbose.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-VERBOSE < %t.tmp/submit_verbose.txt
 #
 # CHECK-VERBOSE: Import succeeded.
@@ -28,22 +28,17 @@ lnt submit "http://localhost:9091/db_def
 # CHECK-VERBOSE: Results available at: http://localhost:9091/db_default/v4/nts/3
 
 
-lnt submit "http://localhost:9091/db_default/submitRun" --commit "${SHARED_INPUTS}/sample-report.json" > "${OUTPUT_DIR}/submit0.txt"
-# RUN: FileCheck %s --check-prefix=CHECK-SUBMIT0 < %t.tmp/submit0.txt
-#
 # Make sure the old --commit=1 style argument is still accepted.
-lnt submit "http://localhost:9091/db_default/submitRun" --commit=1 "${SHARED_INPUTS}/sample-report.json" > "${OUTPUT_DIR}/submit1.txt"
-# RUN: FileCheck %s --check-prefix=CHECK-SUBMIT1 < %t.tmp/submit1.txt
-
-lnt submit "http://localhost:9091/db_default/submitRun" --commit 1 "${SHARED_INPUTS}/sample-report.json" > "${OUTPUT_DIR}/submit2.txt"
-# RUN: FileCheck %s --check-prefix=CHECK-SUBMIT2 < %t.tmp/submit2.txt
-
+lnt submit "http://localhost:9091/db_default/submitRun" --commit=1 "${SHARED_INPUTS}/sample-report.json" > "${OUTPUT_DIR}/submit0.txt"
+# RUN: FileCheck %s --check-prefix=CHECK-SUBMIT0 < %t.tmp/submit0.txt
 # CHECK-SUBMIT0: http://localhost:9091/db_default/v4/nts/4
+
+lnt submit "http://localhost:9091/db_default/submitRun" --commit 1 "${SHARED_INPUTS}/sample-report.json" > "${OUTPUT_DIR}/submit1.txt"
+# RUN: FileCheck %s --check-prefix=CHECK-SUBMIT1 < %t.tmp/submit1.txt
 # CHECK-SUBMIT1: http://localhost:9091/db_default/v4/nts/5
-# CHECK-SUBMIT2: http://localhost:9091/db_default/v4/nts/6
 
 
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/compile_submission.json" -v > "${OUTPUT_DIR}/submit_compile.txt"
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission.json" -v > "${OUTPUT_DIR}/submit_compile.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-COMPILE0 < %t.tmp/submit_compile.txt
 #
 # CHECK-COMPILE0: --- Tested: 10 tests --
@@ -59,7 +54,7 @@ lnt submit "http://localhost:9091/db_def
 # CHECK-COMPILE0: PASS : 10
 # CHECK-COMPILE0: Results available at: http://localhost:9091/db_default/v4/compile/5
 
-lnt submit "http://localhost:9091/db_default/submitRun" --commit "${SRC_ROOT}/docs/report-example.json" -v > "${OUTPUT_DIR}/submit_newformat.txt"
+lnt submit "http://localhost:9091/db_default/submitRun" "${SRC_ROOT}/docs/report-example.json" -v > "${OUTPUT_DIR}/submit_newformat.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-NEWFORMAT < %t.tmp/submit_newformat.txt
 #
 # CHECK-NEWFORMAT: Import succeeded.
@@ -74,12 +69,12 @@ lnt submit "http://localhost:9091/db_def
 # CHECK-NEWFORMAT: Results
 # CHECK-NEWFORMAT: ----------------
 # CHECK-NEWFORMAT: PASS : 10
-# CHECK-NEWFORMAT: Results available at: http://localhost:9091/db_default/v4/nts/7
+# CHECK-NEWFORMAT: Results available at: http://localhost:9091/db_default/v4/nts/6
 
 # For the old submitters/formats we have some detection logic to determine the
 # test-suite based on the Info.Run.tag field instead of the URL. The result
 # should be the same as using the "correct" URL.
-lnt submit "http://localhost:9091/db_default/submitRun" --commit "${INPUTS}/compile_submission.json" -v > "${OUTPUT_DIR}/submit_compile1.txt"
+lnt submit "http://localhost:9091/db_default/submitRun" "${INPUTS}/compile_submission.json" -v > "${OUTPUT_DIR}/submit_compile1.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-COMPILE1 < %t.tmp/submit_compile1.txt
 #
 # CHECK-COMPILE1: Import succeeded.
@@ -91,20 +86,20 @@ lnt submit "http://localhost:9091/db_def
 
 # Check some error handling/reporting
 rm -f "${OUTPUT_DIR}/submit_errors.txt"
-lnt submit "http://localhost:9091/db_default/v4/badsuite/submitRun" --commit "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
+lnt submit "http://localhost:9091/db_default/v4/badsuite/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # RUN: FileCheck %s --check-prefix=CHECK-ERRORS < %t.tmp/submit_errors.txt
 # CHECK-ERRORS: error: lnt server: Unknown test suite 'badsuite'!
-lnt submit "http://localhost:9091/db_baddb/v4/compile/submitRun" --commit "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
+lnt submit "http://localhost:9091/db_baddb/v4/compile/submitRun" "${INPUTS}/compile_submission.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # CHECK-ERRORS: error: lnt server: The page you are looking for does not exist.
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission0.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # CHECK-ERRORS: error: lnt server: could not parse input format
 # ...
 # CHECK-ERRORS: SystemExit: unable to guess input format for
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/invalid_submission1.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # CHECK-ERRORS: error: lnt server: import failure: machine
 # ...
 # CHECK-ERRORS: KeyError: 'machine'
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission_machine_diff_reject.json" >> "${OUTPUT_DIR}/submit_errors.txt" 2>&1
 # CHECK-ERRORS: error: lnt server: import failure: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
 # ...
 # CHECK-ERRORS: MachineInfoChanged: 'hw.activecpu' on machine 'some-compile-suite-machine' changed.
@@ -113,7 +108,7 @@ lnt submit "http://localhost:9091/db_def
 
 
 # Adding extra fields to the machine in a submission is fine.
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/compile_submission_machine_diff_fine.json" -v > "${OUTPUT_DIR}/submit_compile_machine_diff_fine.txt"
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission_machine_diff_fine.json" -v > "${OUTPUT_DIR}/submit_compile_machine_diff_fine.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-MACHINEDIFF < %t.tmp/submit_compile_machine_diff_fine.txt
 #
 # CHECK-MACHINEDIFF: Imported Data
@@ -128,7 +123,7 @@ lnt submit "http://localhost:9091/db_def
 # CHECK-MACHINEDIFF: Results available at: http://localhost:9091/db_default/v4/compile/7
 
 # Test updating existing machine
-lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" --commit "${INPUTS}/compile_submission_machine_diff_reject.json" --update-machine -v > "${OUTPUT_DIR}/submit_compile_machine_update.txt"
+lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" "${INPUTS}/compile_submission_machine_diff_reject.json" --update-machine -v > "${OUTPUT_DIR}/submit_compile_machine_update.txt"
 # RUN: FileCheck %s --check-prefix=CHECK-UPDATEMACHINE < %t.tmp/submit_compile_machine_update.txt
 #
 # CHECK-UPDATEMACHINE: Imported Data

Modified: lnt/trunk/tests/runtest/nt.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/nt.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/nt.py (original)
+++ lnt/trunk/tests/runtest/nt.py Tue Aug 29 16:43:41 2017
@@ -164,7 +164,7 @@
 # RUN: FileCheck --check-prefix CHECK-SUBMIT-STDERR < %t.err %s
 
 # CHECK-SUBMIT-STDOUT: Import succeeded.
-# CHECK-SUBMIT-STDOUT: Added Runs    : 1
+# CHECK-SUBMIT-STDOUT: PASS : 345
 
 # CHECK-SUBMIT-STDERR: inferred C++ compiler under test
 # CHECK-SUBMIT-STDERR: checking source versions

Modified: lnt/trunk/tests/runtest/rerun.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/runtest/rerun.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/runtest/rerun.py (original)
+++ lnt/trunk/tests/runtest/rerun.py Tue Aug 29 16:43:41 2017
@@ -18,7 +18,7 @@
 # RUN: FileCheck --check-prefix CHECK-STDERR < %t.err %s
 
 # CHECK-STDOUT: Import succeeded.
-# CHECK-STDOUT: Added Runs    : 1
+# CHECK-STDOUT: PASS : 345
 
 # CHECK-STDERR: inferred C++ compiler under test
 # CHECK-STDERR: checking source versions
@@ -46,7 +46,8 @@
 # RUN: FileCheck --check-prefix CHECK-STDERR2 < %t.2.err %s
 
 # CHECK-STDOUT2: Import succeeded.
-# CHECK-STDOUT2: Added Runs    : 1
+# CHECK-STDOUT2: FAIL : 3
+# CHECK-STDOUT2: PASS : 342
 
 # CHECK-STDERR2: inferred C++ compiler under test
 # CHECK-STDERR2: checking source versions

Modified: lnt/trunk/tests/server/db/ImportProfile.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/ImportProfile.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/ImportProfile.py (original)
+++ lnt/trunk/tests/server/db/ImportProfile.py Tue Aug 29 16:43:41 2017
@@ -6,7 +6,7 @@
 
 # Import the test set
 # RUN: lnt import %t.install %S/Inputs/profile-report.json \
-# RUN:   --commit --show-sample-count > %t2.log
+# RUN:   --show-sample-count > %t2.log
 # RUN: ls %t.install/data/profiles
 # RUN: python %s %t.install
 

Modified: lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py (original)
+++ lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py Tue Aug 29 16:43:41 2017
@@ -6,7 +6,7 @@
 
 # Import the first test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count > %t1.log
+# RUN:     --show-sample-count > %t1.log
 # RUN: FileCheck -check-prefix=IMPORT-A-1 %s < %t1.log
 #
 # IMPORT-A-1: Added Machines: 1
@@ -18,7 +18,7 @@
 
 # Import the second test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-b-small.plist \
-# RUN:     --commit --show-sample-count --show-sql > %t2.log
+# RUN:     --show-sample-count --show-sql > %t2.log
 # RUN: FileCheck -check-prefix=IMPORT-B %s < %t2.log
 #
 # IMPORT-B: Added Runs : 1
@@ -26,7 +26,7 @@
 
 # Check appending to an existing order
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count --merge=append >& %t_append.log
+# RUN:     --show-sample-count --merge=append >& %t_append.log
 # RUN: FileCheck -check-prefix=IMPORT-A-APPEND %s < %t_append.log
 #
 # IMPORT-A-APPEND-NOT: Added Machines
@@ -38,7 +38,7 @@
 
 # Check that reimporting replaces the existing run.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count --merge=replace >& %t_replace.log
+# RUN:     --show-sample-count --merge=replace >& %t_replace.log
 # RUN: FileCheck -check-prefix=IMPORT-A-REPLACE %s < %t_replace.log
 #
 # IMPORT-A-REPLACE-NOT: Added Machines
@@ -50,7 +50,7 @@
 
 # Check that reimporting the first test set properly reports as a duplicate.
 # RUN: not lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit --show-sample-count --merge=reject >& %t_reject.log
+# RUN:     --show-sample-count --merge=reject >& %t_reject.log
 # RUN: FileCheck -check-prefix=IMPORT-A-REJECT %s < %t_reject.log
 #
 # IMPORT-A-REJECT: Duplicate submission for '1'

Modified: lnt/trunk/tests/server/db/search.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/search.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/search.py (original)
+++ lnt/trunk/tests/server/db/search.py Tue Aug 29 16:43:41 2017
@@ -43,10 +43,9 @@ class SearchTest(unittest.TestCase):
     
                 result = lnt.util.ImportData.import_and_report(
                     None, 'default', self.db, f.name,
-                    format='<auto>', ts_name='nts', commit=True,
-                    show_sample_count=False, disable_email=True,
-                    disable_report=True, updateMachine=False,
-                    mergeRun='reject')
+                    format='<auto>', ts_name='nts', show_sample_count=False,
+                    disable_email=True, disable_report=True,
+                    updateMachine=False, mergeRun='reject')
 
                 assert result.get('success', False)
 

Modified: lnt/trunk/tests/server/db/yamlschema.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/yamlschema.shtest?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/yamlschema.shtest (original)
+++ lnt/trunk/tests/server/db/yamlschema.shtest Tue Aug 29 16:43:41 2017
@@ -1,7 +1,7 @@
 # RUN: rm -rf "%t.install"
 # RUN: lnt create "%t.install"
 # RUN: ln -sf %{src_root}/docs/schema-example.yaml "%t.install/schemas/size.yaml"
-# RUN: lnt import "%t.install" -s size %S/Inputs/customschema-report.json --commit | FileCheck %s
+# RUN: lnt import "%t.install" -s size %S/Inputs/customschema-report.json | FileCheck %s
 
 # CHECK: Import succeeded.
 # CHECK: Imported Data
@@ -19,30 +19,30 @@
 # ===============
 #
 # Inserting with an extra field shouldn't work just yet
-# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report2.json" --commit 2>&1 | FileCheck %s --check-prefix=NOTUPGRADED
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report2.json" 2>&1 | FileCheck %s --check-prefix=NOTUPGRADED
 # NOTUPGRADED: Metric u'newfield' unknown in suite
 
 # Upgrading to a schema with metrics/fields removed should fail
 # RUN: rm -f "%t.install/schemas/size.yaml"
 # RUN: ln -sf "%S/Inputs/schema-example-nomigration0.yaml" "%t.install/schemas/size.yaml"
-# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 2>&1 | FileCheck %s --check-prefix=NOMIGRATION0
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" 2>&1 | FileCheck %s --check-prefix=NOMIGRATION0
 # NOMIGRATION0: Cannot automatically migrate database: Metrics removed: data_size
 #
 # RUN: rm -f "%t.install/schemas/size.yaml"
 # RUN: ln -sf "%S/Inputs/schema-example-nomigration1.yaml" "%t.install/schemas/size.yaml"
-# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 2>&1 | FileCheck %s --check-prefix=NOMIGRATION1
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" 2>&1 | FileCheck %s --check-prefix=NOMIGRATION1
 # NOMIGRATION1: Cannot automatically migrate database: Machine fields removed: os
 #
 # RUN: rm -f "%t.install/schemas/size.yaml"
 # RUN: ln -sf "%S/Inputs/schema-example-nomigration2.yaml" "%t.install/schemas/size.yaml"
-# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 2>&1 | FileCheck %s --check-prefix=NOMIGRATION2
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" 2>&1 | FileCheck %s --check-prefix=NOMIGRATION2
 # NOMIGRATION2: Cannot automatically migrate database: Type mismatch in metric 'data_size'
 
 
 # This upgrade should finally work
 # RUN: rm -f "%t.install/schemas/size.yaml"
 # RUN: ln -sf "%S/Inputs/schema-example-migratable.yaml" "%t.install/schemas/size.yaml"
-# RUN: lnt import "%t.install" "%S/Inputs/customschema-report2.json" -s size --commit --show-sql 2>&1 | FileCheck %s --check-prefix=MIGRATION
+# RUN: lnt import "%t.install" "%S/Inputs/customschema-report2.json" -s size --show-sql 2>&1 | FileCheck %s --check-prefix=MIGRATION
 #
 # MIGRATION: ALTER TABLE "size_Sample" ADD COLUMN newfield FLOAT
 # MIGRATION: ALTER TABLE "size_Run" ADD COLUMN new_run_field VARCHAR(256)

Modified: lnt/trunk/tests/utils/blast.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/utils/blast.py?rev=312068&r1=312067&r2=312068&view=diff
==============================================================================
--- lnt/trunk/tests/utils/blast.py (original)
+++ lnt/trunk/tests/utils/blast.py Tue Aug 29 16:43:41 2017
@@ -20,7 +20,7 @@ TESTS = ["about", "after", "again", "air
 def external_submission(url, fname):
     """Use a LNT subprocess to submit our results."""
     assert os.path.exists(fname)
-    cmd = "lnt submit --verbose --commit {url} {file}".format(
+    cmd = "lnt submit --verbose {url} {file}".format(
         url=url, file=fname)
     print "Calling " + cmd
     subprocess.check_call(cmd, shell=True)




More information about the llvm-commits mailing list