[LNT] r308256 - Import: Make --commit a flag; make sure commit arg is always a boolean

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 19:06:38 PDT 2017


Author: matze
Date: Mon Jul 17 19:06:38 2017
New Revision: 308256

URL: http://llvm.org/viewvc/llvm-project?rev=308256&view=rev
Log:
Import: Make --commit a flag; make sure commit arg is always a boolean

`--commit=1` and `--commit 1` is still supported as an (undocumented)
special case to not break old scripts.

Modified:
    lnt/trunk/docs/importing_data.rst
    lnt/trunk/docs/tests.rst
    lnt/trunk/docs/tools.rst
    lnt/trunk/lnt/lnttool/import_data.py
    lnt/trunk/lnt/lnttool/main.py
    lnt/trunk/lnt/lnttool/updatedb.py
    lnt/trunk/lnt/server/ui/views.py
    lnt/trunk/tests/lnttool/PostgresDB.shtest
    lnt/trunk/tests/lnttool/UpdateDB.py
    lnt/trunk/tests/lnttool/submit.py
    lnt/trunk/tests/server/db/ImportProfile.py
    lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.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=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/docs/importing_data.rst (original)
+++ lnt/trunk/docs/importing_data.rst Mon Jul 17 19:06:38 2017
@@ -18,7 +18,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=1 report.json
+    lnt submit http://mylnt.com/default/submitRun --commit report.json
 
 .. _json_format:
 

Modified: lnt/trunk/docs/tests.rst
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/docs/tests.rst?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/docs/tests.rst (original)
+++ lnt/trunk/docs/tests.rst Mon Jul 17 19:06:38 2017
@@ -131,7 +131,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=1 http://localhost:8000/submitRun \
+  $ lnt submit --commit 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=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/docs/tools.rst (original)
+++ lnt/trunk/docs/tools.rst Mon Jul 17 19:06:38 2017
@@ -27,7 +27,7 @@ Client-Side Tools
  ``lnt importreport <input path> [<output path>]``
     Convert text based key value pairs into a LNT json report file.
 
-  ``lnt submit [--commit=1] <server url> <file>+``
+  ``lnt submit [--commit] <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.
@@ -60,7 +60,7 @@ The following tools are used to interact
   ``lnt createdb <path>``
     Creates a new LNT sqlite3 database at the specified path.
 
-  ``lnt import [--commit=1] <instance path> <file>+``
+  ``lnt import [--commit] <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/import_data.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/import_data.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/import_data.py (original)
+++ lnt/trunk/lnt/lnttool/import_data.py Mon Jul 17 19:06:38 2017
@@ -9,7 +9,7 @@ import lnt.formats
 @click.option("--format", "output_format", show_default=True,
               type=click.Choice(lnt.formats.format_names + ['<auto>']),
               default='<auto>', help="input format")
- at click.option("--commit", type=int, help="commit changes to the database")
+ 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("--show-sample-count", is_flag=True)
 @click.option("--show-raw-result", is_flag=True)

Modified: lnt/trunk/lnt/lnttool/main.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/main.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/main.py (original)
+++ lnt/trunk/lnt/lnttool/main.py Mon Jul 17 19:06:38 2017
@@ -142,8 +142,7 @@ def action_showtests():
 @click.command("submit")
 @click.argument("url")
 @click.argument("files", nargs=-1, type=click.Path(exists=True), required=True)
- at click.option("--commit", show_default=True, type=int,
-              help="number of days to show in report")
+ at click.option("--commit", is_flag=True, help="actually commit the data")
 @click.option("--verbose", "-v", is_flag=True,
               help="show verbose test results")
 def action_submit(url, files, commit, verbose):
@@ -151,8 +150,11 @@ def action_submit(url, files, commit, ve
     from lnt.util import ServerUtil
     import lnt.util.ImportData
 
-    if not commit:
-        logger.warning("submit called with --commit=0, " +
+    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)
@@ -452,30 +454,41 @@ 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 main():
+def cli():
     """LNT command line tool
 
 \b
 Use ``lnt <command> --help`` for more information on a specific command.
     """
-    _version_check()
+cli.add_command(action_checkformat)
+cli.add_command(action_create)
+cli.add_command(action_convert)
+cli.add_command(action_import)
+cli.add_command(action_importreport)
+cli.add_command(action_profile)
+cli.add_command(action_runserver)
+cli.add_command(action_runtest)
+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)
 
 
-main.add_command(action_checkformat)
-main.add_command(action_create)
-main.add_command(action_convert)
-main.add_command(action_import)
-main.add_command(action_importreport)
-main.add_command(action_profile)
-main.add_command(action_runserver)
-main.add_command(action_runtest)
-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)
+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()
+
 
 if __name__ == '__main__':
     main()

Modified: lnt/trunk/lnt/lnttool/updatedb.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/lnttool/updatedb.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/lnt/lnttool/updatedb.py (original)
+++ lnt/trunk/lnt/lnttool/updatedb.py Mon Jul 17 19:06:38 2017
@@ -8,8 +8,7 @@ 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", type=int,
-              help="commit changes to the database")
+ 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=[],

Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Mon Jul 17 19:06:38 2017
@@ -101,7 +101,7 @@ 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))
+    commit = int(request.form.get('commit', 0)) != 0
 
     if input_file and not input_file.content_length:
         input_file = None

Modified: lnt/trunk/tests/lnttool/PostgresDB.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/PostgresDB.shtest?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/PostgresDB.shtest (original)
+++ lnt/trunk/tests/lnttool/PostgresDB.shtest Mon Jul 17 19:06:38 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=1 --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --show-sample-count
 
 # Import a test set.
-lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit=1 --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --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=1 --show-sql > "${TESTDIR}/runrm.out"
+	--commit --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=1 --show-sample-count
+lnt import "${TESTDIR}/instance" "${SHARED_INPUTS}/sample-a-small.plist" --commit --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=1 \
+	--delete-machine "LNT SAMPLE MACHINE" --commit \
 	--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=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/UpdateDB.py (original)
+++ lnt/trunk/tests/lnttool/UpdateDB.py Mon Jul 17 19:06:38 2017
@@ -3,13 +3,13 @@
 
 # Import a test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit=1 --show-sample-count
+# RUN:     --commit --show-sample-count
 
 # Check that we remove both the sample and the run, and that we don't commit by
 # default.
 #
 # RUN: lnt updatedb %t.install --testsuite nts \
-# RUN:     --commit=1 --delete-run 1 --show-sql > %t.out
+# RUN:     --commit --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 +23,9 @@
 # RUN: rm -rf %t.install
 # RUN: lnt create %t.install
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit=1 --show-sample-count
+# RUN:     --commit --show-sample-count
 # RUN: lnt updatedb %t.install --testsuite nts \
-# RUN:     --delete-machine "LNT SAMPLE MACHINE" --commit=1 --show-sql > %t.out
+# RUN:     --delete-machine "LNT SAMPLE MACHINE" --commit --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.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/lnttool/submit.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/lnttool/submit.py (original)
+++ lnt/trunk/tests/lnttool/submit.py Mon Jul 17 19:06:38 2017
@@ -2,17 +2,36 @@
 # RUN: python %{shared_inputs}/create_temp_instance.py \
 # RUN:   %s %{shared_inputs}/SmallInstance %t.instance
 # RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
-# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit=1 \
+# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit \
 # RUN:       %{shared_inputs}/sample-report.json | \
 # RUN:    FileCheck %s --check-prefix=CHECK-DEFAULT
 #
 # CHECK-DEFAULT: http://localhost:9091/db_default/v4/nts/3
 #
+# Make sure the old --commit=1 style argument is still accepted.
 # RUN: rm -rf %t.instance
 # RUN: python %{shared_inputs}/create_temp_instance.py \
 # RUN:   %s %{shared_inputs}/SmallInstance %t.instance
 # RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
 # RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit=1 \
+# RUN:       %{shared_inputs}/sample-report.json | \
+# RUN:    FileCheck %s --check-prefix=CHECK-DEFAULT
+#
+# Make sure the old --commit 1 style argument is still accepted.
+# RUN: rm -rf %t.instance
+# RUN: python %{shared_inputs}/create_temp_instance.py \
+# RUN:   %s %{shared_inputs}/SmallInstance %t.instance
+# RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
+# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit 1 \
+# RUN:       %{shared_inputs}/sample-report.json | \
+# RUN:    FileCheck %s --check-prefix=CHECK-DEFAULT
+#
+# Check submit with verbose flag
+# RUN: rm -rf %t.instance
+# RUN: python %{shared_inputs}/create_temp_instance.py \
+# RUN:   %s %{shared_inputs}/SmallInstance %t.instance
+# RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
+# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit \
 # RUN:       %{shared_inputs}/sample-report.json -v | \
 # RUN:    FileCheck %s --check-prefix=CHECK-VERBOSE
 #
@@ -34,7 +53,7 @@
 # RUN: python %{shared_inputs}/create_temp_instance.py \
 # RUN:   %s %{shared_inputs}/SmallInstance %t.instance
 # RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
-# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit=1 \
+# RUN:    lnt submit "http://localhost:9091/db_default/submitRun" --commit \
 # RUN:       %{src_root}/docs/report-example.json -v | \
 # RUN:    FileCheck %s --check-prefix=CHECK-NEWFORMAT
 #
@@ -57,7 +76,7 @@
 # RUN:   %s %{shared_inputs}/SmallInstance %t.instance
 # RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
 # RUN:   lnt submit "http://localhost:9091/db_default/v4/compile/submitRun" \
-# RUN:   --commit=1 %S/Inputs/compile_submission.json -v \
+# RUN:   --commit %S/Inputs/compile_submission.json -v \
 # RUN:   | FileCheck %s --check-prefix=CHECK-OLDFORMAT-COMPILE
 #
 # For the old format we have some detection logic to determine the test-suite
@@ -69,7 +88,7 @@
 # RUN:   %s %{shared_inputs}/SmallInstance %t.instance
 # RUN: %{shared_inputs}/server_wrapper.sh %t.instance 9091 \
 # RUN:   lnt submit "http://localhost:9091/db_default/submitRun" \
-# RUN:   --commit=1 %S/Inputs/compile_submission.json -v \
+# RUN:   --commit %S/Inputs/compile_submission.json -v \
 # RUN:   | FileCheck %s --check-prefix=CHECK-OLDFORMAT-COMPILE
 #
 # CHECK-OLDFORMAT-COMPILE: --- Tested: 10 tests --

Modified: lnt/trunk/tests/server/db/ImportProfile.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/ImportProfile.py?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/ImportProfile.py (original)
+++ lnt/trunk/tests/server/db/ImportProfile.py Mon Jul 17 19:06:38 2017
@@ -6,7 +6,7 @@
 
 # Import the test set
 # RUN: lnt import %t.install %S/Inputs/profile-report.json \
-# RUN:   --commit=1 --show-sample-count > %t2.log
+# RUN:   --commit --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=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py (original)
+++ lnt/trunk/tests/server/db/ImportV4TestSuiteInstance.py Mon Jul 17 19:06:38 2017
@@ -6,7 +6,7 @@
 
 # Import the first test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit=1 --show-sample-count > %t1.log
+# RUN:     --commit --show-sample-count > %t1.log
 # RUN: FileCheck -check-prefix=IMPORT-A-1 %s < %t1.log
 #
 # IMPORT-A-1: Added Machines: 1
@@ -16,7 +16,7 @@
 
 # Import the second test set.
 # RUN: lnt import %t.install %{shared_inputs}/sample-b-small.plist \
-# RUN:     --commit=1 --show-sample-count --show-sql > %t2.log
+# RUN:     --commit --show-sample-count --show-sql > %t2.log
 # RUN: FileCheck -check-prefix=IMPORT-B %s < %t2.log
 #
 # IMPORT-B: Added Runs : 1
@@ -24,7 +24,7 @@
 
 # Check that reimporting the first test set properly reports as a duplicate.
 # RUN: lnt import %t.install %{shared_inputs}/sample-a-small.plist \
-# RUN:     --commit=1 --show-sample-count > %t3.log
+# RUN:     --commit --show-sample-count > %t3.log
 # RUN: FileCheck -check-prefix=IMPORT-A-2 %s < %t3.log
 #
 # IMPORT-A-2: This submission is a duplicate of run 1

Modified: lnt/trunk/tests/server/db/yamlschema.shtest
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/tests/server/db/yamlschema.shtest?rev=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/server/db/yamlschema.shtest (original)
+++ lnt/trunk/tests/server/db/yamlschema.shtest Mon Jul 17 19:06:38 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=1 | FileCheck %s
+# RUN: lnt import "%t.install" -s size %S/Inputs/customschema-report.json --commit | 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=1 2>&1 | FileCheck %s --check-prefix=NOTUPGRADED
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report2.json" --commit 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=1 2>&1 | FileCheck %s --check-prefix=NOMIGRATION0
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 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=1 2>&1 | FileCheck %s --check-prefix=NOMIGRATION1
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 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=1 2>&1 | FileCheck %s --check-prefix=NOMIGRATION2
+# RUN: not lnt import "%t.install" -s size "%S/Inputs/customschema-report.json" --commit 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=1 --show-sql 2>&1 | FileCheck %s --check-prefix=MIGRATION
+# RUN: lnt import "%t.install" "%S/Inputs/customschema-report2.json" -s size --commit --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=308256&r1=308255&r2=308256&view=diff
==============================================================================
--- lnt/trunk/tests/utils/blast.py (original)
+++ lnt/trunk/tests/utils/blast.py Mon Jul 17 19:06:38 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=1 {url} {file}".format(
+    cmd = "lnt submit --verbose --commit {url} {file}".format(
         url=url, file=fname)
     print "Calling " + cmd
     subprocess.check_call(cmd, shell=True)




More information about the llvm-commits mailing list