On Wed, Mar 6, 2013 at 10:18 PM, Lucas Meneghel Rodrigues <[email protected]> wrote: > On 03/06/2013 08:21 PM, Julius Gawlas wrote: >> >> Since test_type is not nullable when creating new object we need >> to specify it; in the previous version we just set the path. Also >> move up the validation for test type. > > > Julius, I've made some fixes to the install script pushed them to next, and > synced next and master. > > I've tested the install on a Fedora 17 VM. The install went flawless and > even the test importer worked perfectly, so as far as I understand the patch > is unnecessary. > > Now, I need to go over your patch and validate the changes. I'll do this > tomorrow. > > Cheers, > > Lucas > > >> Signed-off-by: Julius Gawlas <[email protected]> >> --- >> utils/test_importer.py | 37 ++++++++++++++++++------------------- >> 1 files changed, 18 insertions(+), 19 deletions(-) >> >> diff --git a/utils/test_importer.py b/utils/test_importer.py >> index c1d8d8c..b1b4027 100755 >> --- a/utils/test_importer.py >> +++ b/utils/test_importer.py >> @@ -49,6 +49,9 @@ class >> TestImporterLoggingConfig(logging_config.LoggingConfig): >> DRY_RUN = False >> DEPENDENCIES_NOT_FOUND = set() >> >> +test_type = {'client': 1, >> + 'server': 2, } >> + >> >> def update_all(autotest_dir, add_noncompliant, add_experimental): >> """ >> @@ -228,12 +231,20 @@ def update_tests_in_db(tests, dry_run=False, >> add_experimental=False, >> '%s not in %s, did you forget to use -z >> option?' % >> (test, autotest_dir)) >> >> + logging.info("Processing %s", test) >> + >> + # create test object, first validate test type >> + data = tests[test] >> + if not hasattr(data, 'test_type'): >> + raise Exception('Test type is required') >> + if not data.test_type.lower() in test_type: >> + raise Exception('Incorrect value %s for test_type' % >> + data.test_type)
Although the changes are good, doing this so early here breaks the add_noncompliant=True case. As these are not strictly necessary, given that the script works on latest next/master, I won't apply this one. Sorry about that, and thanks for your time dedicated on this issue. Lucas _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
