commit/galaxy-central: greg: Enhance the tool shed repository's tool test inspection components to categorize empty <tests> or <test> tag sets defined in tool configs as "tool missing tests" instead of testing the tools with resulting test failures.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3d8ecec95155/ Changeset: 3d8ecec95155 User: greg Date: 2013-11-20 19:20:14 Summary: Enhance the tool shed repository's tool test inspection components to categorize empty <tests> or <test> tag sets defined in tool configs as "tool missing tests" instead of testing the tools with resulting test failures. Affected #: 1 file diff -r ec6c12a576850401bc502af2aa679a6c18568219 -r 3d8ecec9515505f276fdaaa54c2f1af1c1d390b4 lib/tool_shed/scripts/check_repositories_for_functional_tests.py --- a/lib/tool_shed/scripts/check_repositories_for_functional_tests.py +++ b/lib/tool_shed/scripts/check_repositories_for_functional_tests.py @@ -284,18 +284,38 @@ # If there are no tests, this tool should not be tested, since the tool functional tests only report failure if the test itself fails, # not if it's missing or undefined. Filtering out those repositories at this step will reduce the number of "false negatives" the # automated functional test framework produces. - tool_has_tests = True - if 'tests' not in tool_metadata or not tool_metadata[ 'tests' ]: - tool_has_tests = False - if verbosity >= 2: - print '# No functional tests defined for %s.' % tool_id - no_tests += 1 - else: - tool_has_tests = True + tool_has_tests = False + defined_test_dicts = tool_metadata.get( 'tests', None ) + if defined_test_dicts is not None: + # We need to inspect the <test> tags because the following tags... + # <tests> + # </tests> + # ...will produce the following metadata: + # "tests": [] + # And the following tags... + # <tests> + # <test> + # </test> + # </tests> + # ...will produce the following metadata: + # "tests": + # [{"inputs": [], "name": "Test-1", "outputs": [], "required_files": []}] + for defined_test_dict in defined_test_dicts: + inputs = defined_test_dict.get( 'inputs', [] ) + outputs = defined_test_dict.get( 'outputs', [] ) + if inputs and outputs: + # At least one tool within the repository has a valid <test> tag. + tool_has_tests = True + break + if tool_has_tests: if verbosity >= 2: print "# Tool ID '%s' in changeset revision %s of %s has one or more valid functional tests defined." % \ ( tool_id, changeset_revision, name ) has_tests += 1 + else: + if verbosity >= 2: + print '# No functional tests defined for %s.' % tool_id + no_tests += 1 failure_reason = '' problem_found = False missing_test_files = [] Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org