1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1d57caac677c/ Changeset: 1d57caac677c User: greg Date: 2014-01-05 03:25:53 Summary: Improved logging in the tool shed's install and test framework. Affected #: 3 files diff -r cd8ca90e93a1f896ee6ff3ac56665e64373ace00 -r 1d57caac677cbbd8465c149b6a091684b21af1f8 test/install_and_test_tool_shed_repositories/base/util.py --- a/test/install_and_test_tool_shed_repositories/base/util.py +++ b/test/install_and_test_tool_shed_repositories/base/util.py @@ -547,13 +547,18 @@ tool_test_results_dict[ 'installation_errors' ][ 'repository_dependencies' ]\ .append( missing_repository_dependency_info_dict ) # Record the status of this repository in the tool shed. - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( str( repository.changeset_revision ), str( repository.name ), str( repository.owner ), str( tool_test_results_dict ) ) ) response_dict = register_test_result( galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( str( repository.changeset_revision ), str( repository.name ), str( repository.owner ), str( response_dict ) ) ) + log.debug('=============================================================' ) def initialize_install_and_test_statistics_dict( test_framework ): # Initialize a dictionary for the summary that will be printed to stdout. @@ -818,6 +823,7 @@ if can_update_tool_shed: metadata_revision_id = repository_dict.get( 'id', None ) if metadata_revision_id is not None: + log.debug( 'Updating tool_test_results for repository_metadata id %s.' % str( metadata_revision_id ) ) tool_test_results_dicts.insert( 0, tool_test_results_dict ) params[ 'tool_test_results' ] = tool_test_results_dicts # Set the time_last_tested entry so that the repository_metadata.time_last_tested will be set in the tool shed. @@ -826,7 +832,8 @@ try: return update( tool_shed_api_key, url, params, return_formatted=False ) except Exception, e: - log.exception( 'Error attempting to register test results: %s' % str( e ) ) + log.exception( 'Error updating tool_test_results for repository_metadata id %s:\n%s' % \ + ( str( metadata_revision_id ), str( e ) ) ) return {} else: return {} diff -r cd8ca90e93a1f896ee6ff3ac56665e64373ace00 -r 1d57caac677cbbd8465c149b6a091684b21af1f8 test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py @@ -189,18 +189,23 @@ changeset_revision, encoded_repository_metadata_id ) if is_excluded: + log.debug( "Not testing revision %s of repository %s owned by %s because it is in the exclude list for this test run." % \ + ( changeset_revision, name, owner ) ) # If this repository is being skipped, register the reason. tool_test_results_dict[ 'not_tested' ] = dict( reason=reason ) params = dict( do_not_test=False ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) - log.debug( "Not testing revision %s of repository %s owned by %s because it is in the exclude list for this test run." % \ - ( changeset_revision, name, owner ) ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: # See if the repository was installed in a previous test. repository = install_and_test_base_util.get_repository( name, owner, changeset_revision ) @@ -215,13 +220,18 @@ install_and_test_statistics_dict[ 'repositories_with_installation_error' ].append( repository_identifier_dict ) tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message params = dict( test_install_error=True ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: # The repository was successfully installed. log.debug( 'Installation succeeded for revision %s of repository %s owned by %s.' % \ @@ -277,7 +287,9 @@ install_and_test_statistics_dict[ 'at_least_one_test_failed' ].append( repository_identifier_dict ) # Record the status of this repository in the tool shed. params[ 'tools_functionally_correct' ] = False - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = \ install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, @@ -285,6 +297,9 @@ repository_dict, params, can_update_tool_shed ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: log.debug( 'Skipped attempt to install revision %s of repository %s owned by %s because ' % \ ( changeset_revision, name, owner ) ) @@ -627,6 +642,8 @@ if result.wasSuccessful(): # This repository's tools passed all functional tests. Use the ReportResults nose plugin to get a list # of tests that passed. + log.debug( 'Revision %s of repository %s owned by %s installed and passed functional tests.' % \ + ( changeset_revision, name, owner ) ) for plugin in test_plugins: if hasattr( plugin, 'getTestStatus' ): test_identifier = '%s/%s' % ( owner, name ) @@ -647,17 +664,22 @@ # Call the register_test_result() method to execute a PUT request to the repository_revisions API # controller with the status of the test. This also sets the do_not_test and tools_functionally # correct flags and updates the time_last_tested field to today's date. - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) - log.debug( 'Revision %s of repository %s owned by %s installed and passed functional tests.' % \ - ( changeset_revision, name, owner ) ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: # The get_failed_test_dicts() method returns a list. + log.debug( 'Revision %s of repository %s owned by %s installed successfully but did not pass functional tests.' % \ + ( changeset_revision, name, owner ) ) failed_test_dicts = get_failed_test_dicts( result, from_tool_test=True ) tool_test_results_dict[ 'failed_tests' ] = failed_test_dicts failed_repository_dict = repository_identifier_dict @@ -668,15 +690,18 @@ params = dict( tools_functionally_correct=False, test_install_error=False, do_not_test=str( set_do_not_test ) ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) - log.debug( 'Revision %s of repository %s owned by %s installed successfully but did not pass functional tests.' % \ - ( changeset_revision, name, owner ) ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) # Remove the just-executed tests so twill will not find and re-test them along with the tools # contained in the next repository. remove_tests( app ) diff -r cd8ca90e93a1f896ee6ff3ac56665e64373ace00 -r 1d57caac677cbbd8465c149b6a091684b21af1f8 test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py @@ -124,17 +124,22 @@ encoded_repository_metadata_id ) if is_excluded: # If this repository is being skipped, register the reason. + log.debug( "Not testing revision %s of repository %s owned by %s because it is in the exclude list for this test run." % \ + ( changeset_revision, name, owner ) ) tool_test_results_dict[ 'not_tested' ] = dict( reason=reason ) params = dict( do_not_test=False ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) - log.debug( "Not testing revision %s of repository %s owned by %s because it is in the exclude list for this test run." % \ - ( changeset_revision, name, owner ) ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: # See if the repository was installed in a previous test. repository = install_and_test_base_util.get_repository( name, owner, changeset_revision ) @@ -149,13 +154,18 @@ install_and_test_statistics_dict[ 'repositories_with_installation_error' ].append( repository_identifier_dict ) tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message params = dict( test_install_error=True ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: # The repository was successfully installed. log.debug( 'Installation succeeded for revision %s of repository %s owned by %s.' % \ @@ -166,13 +176,18 @@ repository_identifier_dict, install_and_test_statistics_dict, tool_test_results_dict ) - # TODO: do something useful with response_dict + log.debug('=============================================================' ) + log.debug( 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( tool_test_results_dict ) ) ) response_dict = install_and_test_base_util.register_test_result( install_and_test_base_util.galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ) + log.debug( 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \ + ( changeset_revision, name, owner, str( response_dict ) ) ) + log.debug('=============================================================' ) else: log.debug( 'Skipped attempt to install revision %s of repository %s owned by %s because ' % \ ( changeset_revision, name, owner ) ) 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.