From 7e99eb8a9715814ac74edb81ba0ef182f410e6f6 Mon Sep 17 00:00:00 2001 From: Chris Sosa <[email protected]> Date: Tue, 23 Mar 2010 14:32:04 -0700 Subject: [PATCH] We've been passing on errors that have been important before. We need to give more user feedback Signed-off-by: Chris Sosa <[email protected]>
--- client/bin/setup_job.py | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/bin/setup_job.py b/client/bin/setup_job.py index c32698c..bf07fdb 100644 --- a/client/bin/setup_job.py +++ b/client/bin/setup_job.py @@ -2,7 +2,7 @@ # # Eric Li <[email protected]> -import logging, os, pickle, sys +import logging, os, pickle, re, sys import common from autotest_lib.client.bin import client_logging_config @@ -83,9 +83,14 @@ def load_all_client_tests(options): global_namespace) client_test = global_namespace['auto_test'] all_tests.append(client_test) - except ImportError: - # this test has only control file but no python. - pass + except ImportError, e: + # skips error if test is control file without python test + if re.search(test_name, str(e)): + pass + # give the user a warning if there is an import error. + else: + logging.warning("%s import error: %s. Skipping %s" \ + % (test_name, e, test_name)) except Exception, e: # Log other errors (e.g., syntax errors) and collect the test. logging.error("%s: %s", test_name, e) -- 1.7.0.1
_______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
