summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorshoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2008-09-30 16:56:31 +0000
committershoward <showard@592f7852-d20e-0410-864c-8624ca9c26a4>2008-09-30 16:56:31 +0000
commit29bd8d95968269e5e61ed9ddaa21d5767d7a164b (patch)
treed7356fa286d61323c9ebcefdc3ea970ba1a32ee2 /utils
parent272f52c1f08aa013de14df44030ce10e160b7ef1 (diff)
Remove debug statement from test_importer
add db_clean_broken to full run move db execute lines out of if verbose statement so they are always executed Risk: Low Visibility: None From: Scott Zawalski <scottz@google.com> Signed-off-by: Steve Howard <showard@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2207 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'utils')
-rw-r--r--utils/test_importer.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/utils/test_importer.py b/utils/test_importer.py
index 2cd1aa6c..2cc6cf32 100644
--- a/utils/test_importer.py
+++ b/utils/test_importer.py
@@ -89,7 +89,6 @@ def main(argv):
if options.tests_dir:
if ".." in options.tests_dir:
path = os.path.join(os.getcwd(), options.tests_dir)
- print path
options.tests_dir = os.path.abspath(path)
tests = get_tests_from_fs(options.tests_dir, options.control_pattern,
add_noncompliant=options.add_noncompliant)
@@ -149,6 +148,8 @@ def update_all(autotest_dir, add_noncompliant, add_experimental, verbose):
update_profilers_in_db(profilers, verbose=verbose,
add_noncompliant=add_noncompliant,
description='NA')
+ # Clean bad db entries
+ db_clean_broken(autotest_dir, verbose)
def db_clean_broken(autotest_dir, verbose):
@@ -168,8 +169,8 @@ def db_clean_broken(autotest_dir, verbose):
if not os.path.isfile(full_path):
if verbose:
print "Removing " + path[0]
- sql = "DELETE FROM autotests WHERE path='%s'" % path[0]
- db_execute(cursor, sql)
+ sql = "DELETE FROM autotests WHERE path='%s'" % path[0]
+ db_execute(cursor, sql)
# Find profilers that are no longer present
profilers = []
@@ -181,8 +182,8 @@ def db_clean_broken(autotest_dir, verbose):
if not os.path.exists(full_path):
if verbose:
print "Removing " + path[0]
- sql = "DELETE FROM profilers WHERE name='%s'" % path[0]
- db_execute(cursor, sql)
+ sql = "DELETE FROM profilers WHERE name='%s'" % path[0]
+ db_execute(cursor, sql)
connection.commit()