2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/fd4936ae8219/
Changeset: fd4936ae8219
Branch: next-stable
User: greg
Date: 2014-01-30 17:20:04
Summary: Fixes in the tool shed's install and test framework for handling
repositories containing tools that install correctly but with one or more dependencies
that do not.
Affected #: 2 files
diff -r 593be4d22c470abe6bdbbfa51f2a8e7ac035de33 -r
fd4936ae82193639011ed06b9552ec1a8c8166e5
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
@@ -735,6 +735,8 @@
repository_name = str( repository.name )
repository_owner = str( repository.owner )
repository_changeset_revision = str( repository.changeset_revision )
+ print 'Populating dependency install containers for revision %s of repository %s
owned by %s.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
processed_successful_repository_installations = install_and_test_statistics_dict.get(
'successful_repository_installations', [] )
if repository_identifier_tup not in processed_successful_repository_installations:
install_and_test_statistics_dict[ 'successful_repository_installations'
].append( repository_identifier_tup )
@@ -844,12 +846,17 @@
repository_name = str( repository.name )
repository_owner = str( repository.owner )
repository_changeset_revision = str( repository.changeset_revision )
+ print 'Potentially populating install containers for repository dependencies of
revision %s of repository %s owned by %s.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
repository_dependencies_dicts, error_message = get_repository_dependencies_dicts(
galaxy_tool_shed_url, repository_metadata_id )
if error_message:
- print 'Cannot check or populate repository dependency install containers for
version %s of repository %s owned by %s ' % \
+ print 'Cannot check or populate repository dependency install containers for
revision %s of repository %s owned by %s ' % \
( repository_changeset_revision, repository_name, repository_owner )
print 'due to the following error getting
repository_dependencies_dicts:\n%s' % str( error_message )
else:
+ if not repository_dependencies_dicts:
+ print 'Revision %s of repository %s owned by %s has no repository
dependencies.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
for repository_dependencies_dict in repository_dependencies_dicts:
if not isinstance( repository_dependencies_dict, dict ):
print 'Skipping invalid repository_dependencies_dict: %s' % str(
repository_dependencies_dict )
@@ -951,7 +958,7 @@
can_update_tool_shed )
print 'Result of inserting tool_test_results for revision %s
of repository %s owned by %s:\n%s' % \
( changeset_revision, name, owner, str( response_dict ) )
-
print'============================================================='
+
print'\n============================================================='
else:
# The required repository's installation failed.
tool_test_results_dict[ 'installation_errors' ][
'current_repository' ] = str( required_repository.error_message )
@@ -965,7 +972,7 @@
can_update_tool_shed )
print 'Result of inserting tool_test_results for revision %s
of repository %s owned by %s:\n%s' % \
( changeset_revision, name, owner, str( response_dict ) )
-
print'============================================================='
+
print'\n============================================================='
else:
print 'Cannot retrieve revision %s of required repository %s
owned by %s from the database ' % \
( changeset_revision, name, owner )
@@ -1056,7 +1063,7 @@
name = str( name )
owner = str( owner )
changeset_revision = str( changeset_revision )
- print
'============================================================='
+ print
'\n============================================================='
print '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 ) )
print 'Updating tool_test_results for repository_metadata id %s.' %
metadata_revision_id
diff -r 593be4d22c470abe6bdbbfa51f2a8e7ac035de33 -r
fd4936ae82193639011ed06b9552ec1a8c8166e5
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
@@ -251,6 +251,19 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
+ if params.get( 'test_install_error', False ):
+ # The repository was successfully installed, but one or more
dependencies had installation errors,
+ # so we'll populate the test result containers since we
cannot execute any tests.
+ response_dict = \
+
install_and_test_base_util.save_test_results_for_changeset_revision(
install_and_test_base_util.galaxy_tool_shed_url,
+
tool_test_results_dicts,
+
tool_test_results_dict,
+
repository_dict,
+
params,
+
can_update_tool_shed )
+ print 'Result of inserting tool_test_results for revision
%s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( response_dict )
)
+
print'\n============================================================='
# Populate the installation containers (success or error) for the
repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
@@ -266,6 +279,10 @@
print 'Cannot execute tests for tools in revision %s of
repository %s owned by %s ' % \
( changeset_revision, name, owner )
print 'because one or more dependencies has installation
errors.'
+ # The repository was installed successfully, but one or more
dependencies had installation errors. Since
+ # we cannot test the tools due to these errors, we'll
remove tests and tools were created during the repository
+ # installation process so nose will not discover them and
attempt to execute them.
+ remove_tests( app )
else:
print 'Revision %s of repository %s owned by %s installed
successfully, so running tool tests.' % \
( changeset_revision, name, owner )
@@ -279,6 +296,9 @@
from_json_string( file(
galaxy_shed_tools_dict, 'r' ).read() ) )
# If the repository has a test-data directory we write the
generated shed_tools_dict to a temporary
# file so the functional test framework can find it.
+ # TODO: Eliminate the need for this shed_tools_dict since it
grows large over the course of each test run.
+ # If it cannot be eliminated altogether, reinitialize it with
each new repository install so at this point
+ # it contains only entries for the current repository
dependency hierarchy being tested.
file( galaxy_shed_tools_dict, 'w' ).write(
to_json_string( shed_tools_dict ) )
print 'Saved generated shed_tools_dict to %s\nContents:
%s' % ( galaxy_shed_tools_dict, shed_tools_dict )
try:
@@ -605,6 +625,7 @@
owner = str( repository.owner )
changeset_revision = str( repository.changeset_revision )
repository_identifier_tup = ( name, owner, changeset_revision )
+ print 'Testing tools contained in revision %s of repository %s owned by %s.'
% ( changeset_revision, name, owner )
# Generate the test methods for this installed repository. We need to pass
testing_shed_tools=True here
# or twill will look in $GALAXY_HOME/test-data for test data, which may result in
missing or invalid test
# files.
https://bitbucket.org/galaxy/galaxy-central/commits/d9f6f3f24671/
Changeset: d9f6f3f24671
User: greg
Date: 2014-01-30 17:20:33
Summary: Merged from next-stable
Affected #: 2 files
diff -r b67a464b8588525e17fd64910b9b9f3bcadb82ae -r
d9f6f3f2467195397828d452664c68e5e4c104ef
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
@@ -735,6 +735,8 @@
repository_name = str( repository.name )
repository_owner = str( repository.owner )
repository_changeset_revision = str( repository.changeset_revision )
+ print 'Populating dependency install containers for revision %s of repository %s
owned by %s.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
processed_successful_repository_installations = install_and_test_statistics_dict.get(
'successful_repository_installations', [] )
if repository_identifier_tup not in processed_successful_repository_installations:
install_and_test_statistics_dict[ 'successful_repository_installations'
].append( repository_identifier_tup )
@@ -844,12 +846,17 @@
repository_name = str( repository.name )
repository_owner = str( repository.owner )
repository_changeset_revision = str( repository.changeset_revision )
+ print 'Potentially populating install containers for repository dependencies of
revision %s of repository %s owned by %s.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
repository_dependencies_dicts, error_message = get_repository_dependencies_dicts(
galaxy_tool_shed_url, repository_metadata_id )
if error_message:
- print 'Cannot check or populate repository dependency install containers for
version %s of repository %s owned by %s ' % \
+ print 'Cannot check or populate repository dependency install containers for
revision %s of repository %s owned by %s ' % \
( repository_changeset_revision, repository_name, repository_owner )
print 'due to the following error getting
repository_dependencies_dicts:\n%s' % str( error_message )
else:
+ if not repository_dependencies_dicts:
+ print 'Revision %s of repository %s owned by %s has no repository
dependencies.' % \
+ ( repository_changeset_revision, repository_name, repository_owner )
for repository_dependencies_dict in repository_dependencies_dicts:
if not isinstance( repository_dependencies_dict, dict ):
print 'Skipping invalid repository_dependencies_dict: %s' % str(
repository_dependencies_dict )
@@ -951,7 +958,7 @@
can_update_tool_shed )
print 'Result of inserting tool_test_results for revision %s
of repository %s owned by %s:\n%s' % \
( changeset_revision, name, owner, str( response_dict ) )
-
print'============================================================='
+
print'\n============================================================='
else:
# The required repository's installation failed.
tool_test_results_dict[ 'installation_errors' ][
'current_repository' ] = str( required_repository.error_message )
@@ -965,7 +972,7 @@
can_update_tool_shed )
print 'Result of inserting tool_test_results for revision %s
of repository %s owned by %s:\n%s' % \
( changeset_revision, name, owner, str( response_dict ) )
-
print'============================================================='
+
print'\n============================================================='
else:
print 'Cannot retrieve revision %s of required repository %s
owned by %s from the database ' % \
( changeset_revision, name, owner )
@@ -1056,7 +1063,7 @@
name = str( name )
owner = str( owner )
changeset_revision = str( changeset_revision )
- print
'============================================================='
+ print
'\n============================================================='
print '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 ) )
print 'Updating tool_test_results for repository_metadata id %s.' %
metadata_revision_id
diff -r b67a464b8588525e17fd64910b9b9f3bcadb82ae -r
d9f6f3f2467195397828d452664c68e5e4c104ef
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
@@ -251,6 +251,19 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
+ if params.get( 'test_install_error', False ):
+ # The repository was successfully installed, but one or more
dependencies had installation errors,
+ # so we'll populate the test result containers since we
cannot execute any tests.
+ response_dict = \
+
install_and_test_base_util.save_test_results_for_changeset_revision(
install_and_test_base_util.galaxy_tool_shed_url,
+
tool_test_results_dicts,
+
tool_test_results_dict,
+
repository_dict,
+
params,
+
can_update_tool_shed )
+ print 'Result of inserting tool_test_results for revision
%s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( response_dict )
)
+
print'\n============================================================='
# Populate the installation containers (success or error) for the
repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
@@ -266,6 +279,10 @@
print 'Cannot execute tests for tools in revision %s of
repository %s owned by %s ' % \
( changeset_revision, name, owner )
print 'because one or more dependencies has installation
errors.'
+ # The repository was installed successfully, but one or more
dependencies had installation errors. Since
+ # we cannot test the tools due to these errors, we'll
remove tests and tools were created during the repository
+ # installation process so nose will not discover them and
attempt to execute them.
+ remove_tests( app )
else:
print 'Revision %s of repository %s owned by %s installed
successfully, so running tool tests.' % \
( changeset_revision, name, owner )
@@ -279,6 +296,9 @@
from_json_string( file(
galaxy_shed_tools_dict, 'r' ).read() ) )
# If the repository has a test-data directory we write the
generated shed_tools_dict to a temporary
# file so the functional test framework can find it.
+ # TODO: Eliminate the need for this shed_tools_dict since it
grows large over the course of each test run.
+ # If it cannot be eliminated altogether, reinitialize it with
each new repository install so at this point
+ # it contains only entries for the current repository
dependency hierarchy being tested.
file( galaxy_shed_tools_dict, 'w' ).write(
to_json_string( shed_tools_dict ) )
print 'Saved generated shed_tools_dict to %s\nContents:
%s' % ( galaxy_shed_tools_dict, shed_tools_dict )
try:
@@ -605,6 +625,7 @@
owner = str( repository.owner )
changeset_revision = str( repository.changeset_revision )
repository_identifier_tup = ( name, owner, changeset_revision )
+ print 'Testing tools contained in revision %s of repository %s owned by %s.'
% ( changeset_revision, name, owner )
# Generate the test methods for this installed repository. We need to pass
testing_shed_tools=True here
# or twill will look in $GALAXY_HOME/test-data for test data, which may result in
missing or invalid 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.