commit/galaxy-central: greg: Moinor fixes and adjustments to the tool shed's install and test framework.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/3c7edca24e5a/ Changeset: 3c7edca24e5a User: greg Date: 2013-11-28 03:10:52 Summary: Moinor fixes and adjustments to the tool shed's install and test framework. Affected #: 3 files diff -r 32205f911e7442fb6eed7155f8306df7aafb731e -r 3c7edca24e5aa0563e7078b56469730fd2bc27a1 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 @@ -259,6 +259,11 @@ # Create a new dictionary for the most recent test run. tool_test_results_dict = {} test_environment_dict = tool_test_results_dict.get( 'test_environment', {} ) + # Add the current time as the approximate time that this test run occurs. A similar value will also be + # set to the repository_metadata.time_last_tested column, but we also store it here because the Tool Shed + # may be configured to store multiple test run results, so each must be associated with a time stamp. + now = time.strftime( "%Y-%m-%d %H:%M:%S" ) + test_environment_dict[ 'time_tested' ] = now test_environment_dict[ 'tool_shed_database_version' ] = get_database_version( app ) test_environment_dict[ 'tool_shed_mercurial_version' ] = __version__.version test_environment_dict[ 'tool_shed_revision' ] = get_repository_current_revision( os.getcwd() ) diff -r 32205f911e7442fb6eed7155f8306df7aafb731e -r 3c7edca24e5aa0563e7078b56469730fd2bc27a1 lib/tool_shed/util/container_util.py --- a/lib/tool_shed/util/container_util.py +++ b/lib/tool_shed/util/container_util.py @@ -1052,17 +1052,22 @@ """Return a folder hierarchy containing tool dependencies.""" # This container is displayed only in the tool shed. if tool_test_results_dicts: - multiple_tool_test_results_dicts = len( tool_test_results_dicts ) > 1 test_results_dict_id = 0 folder_id += 1 tool_test_results_root_folder = Folder( id=folder_id, key='root', label='root', parent=None ) + multiple_tool_test_results_dicts = len( tool_test_results_dicts ) > 1 + if multiple_tool_test_results_dicts: + folder_id += 1 + test_runs_folder = Folder( id=folder_id, key='test_runs', label='Test runs', parent=tool_test_results_root_folder ) + tool_test_results_root_folder.folders.append( test_runs_folder ) for index, tool_test_results_dict in enumerate( tool_test_results_dicts ): test_environment_dict = tool_test_results_dict.get( 'test_environment', None ) if test_environment_dict is not None: time_tested = test_environment_dict.get( 'time_tested', 'unknown_%d' % index ) if multiple_tool_test_results_dicts: folder_id += 1 - containing_folder = Folder( id=folder_id, key='test_results', label=time_tested, parent=tool_test_results_root_folder ) + containing_folder = Folder( id=folder_id, key='test_results', label=time_tested, parent=test_runs_folder ) + test_runs_folder.folders.append( containing_folder ) else: containing_folder = tool_test_results_root_folder test_results_dict_id += 1 @@ -1150,6 +1155,7 @@ key='installation_errors', label='Installation errors', parent=containing_folder ) + containing_folder.installation_errors.append( installation_error_base_folder ) if current_repository_errors: folder_id += 1 subfolder = Folder( id=folder_id, @@ -1200,9 +1206,6 @@ error_message=tool_dependency_error_dict.get( 'error_message', '' ) ) subfolder.tool_dependency_installation_errors.append( tool_dependency_installation_error ) installation_error_base_folder.folders.append( subfolder ) - containing_folder.installation_errors.append( installation_error_base_folder ) - if multiple_tool_test_results_dicts: - tool_test_results_root_folder.folders.append( containing_folder ) else: tool_test_results_root_folder = None return folder_id, tool_test_results_root_folder diff -r 32205f911e7442fb6eed7155f8306df7aafb731e -r 3c7edca24e5aa0563e7078b56469730fd2bc27a1 test/install_and_test_tool_shed_repositories/functional_tests.py --- a/test/install_and_test_tool_shed_repositories/functional_tests.py +++ b/test/install_and_test_tool_shed_repositories/functional_tests.py @@ -1206,7 +1206,8 @@ response_dict = register_test_result( galaxy_tool_shed_url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params ) log.debug( 'Revision %s of repository %s installed and passed functional tests.' % ( str( changeset_revision ), str( name ) ) ) else: - tool_test_results_dict[ 'failed_tests' ].append( extract_log_data( result, from_tool_test=True ) ) + # The extract_log_data() netod returns a list. + tool_test_results_dict[ 'failed_tests' ] = extract_log_data( result, from_tool_test=True ) results_dict[ 'repositories_failed' ].append( dict( name=name, owner=owner, changeset_revision=changeset_revision ) ) set_do_not_test = not is_latest_downloadable_revision( galaxy_tool_shed_url, repository_dict ) params = dict( tools_functionally_correct=False, 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