1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5378f0517318/
Changeset: 5378f0517318
User: greg
Date: 2014-01-02 22:39:46
Summary: A bit of code cleanup and enhanced logging for the tool shed's install and test framework.
Affected #: 3 files
diff -r 1b0c9587a1da4adc4b75f843f10191e7136cf719 -r 5378f0517318861997ae7be112bbbf4098bdf7ce lib/galaxy/webapps/tool_shed/api/repository_revisions.py
--- a/lib/galaxy/webapps/tool_shed/api/repository_revisions.py
+++ b/lib/galaxy/webapps/tool_shed/api/repository_revisions.py
@@ -209,6 +209,11 @@
repository_metadata.time_last_tested = datetime.datetime.utcnow()
flush_needed = True
elif hasattr( repository_metadata, key ):
+ # log information when setting attributes associated with the Tool Shed's install and test framework.
+ if key in [ 'do_not_test', 'includes_tools', 'missing_test_components', 'test_install_error',
+ 'tools_functionally_correct' ]:
+ log.debug( 'Setting repository_metadata table column %s to value %s for changeset_revision %s via the Tool Shed API.' % \
+ ( str( key ), str( new_value ), str( repository_metadata.changeset_revision ) ) )
setattr( repository_metadata, key, new_value )
flush_needed = True
if flush_needed:
diff -r 1b0c9587a1da4adc4b75f843f10191e7136cf719 -r 5378f0517318861997ae7be112bbbf4098bdf7ce 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
@@ -811,7 +811,7 @@
def register_test_result( url, tool_test_results_dicts, tool_test_results_dict, repository_dict, params, can_update_tool_shed ):
"""
- Update the repository metadata tool_test_results and appropriate flags using the Tool SHed API. This method
+ Update the repository metadata tool_test_results and appropriate flags using the Tool Shed API. This method
updates tool_test_results with the relevant data, sets the do_not_test and tools_functionally correct flags
to the appropriate values and updates the time_last_tested field to the value of the received time_tested.
"""
diff -r 1b0c9587a1da4adc4b75f843f10191e7136cf719 -r 5378f0517318861997ae7be112bbbf4098bdf7ce 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
@@ -52,14 +52,13 @@
from paste import httpserver
from functional import database_contexts
+import functional.test_toolbox as imported_test_toolbox
log = logging.getLogger( 'install_and_test_repositories_with_tools' )
assert sys.version_info[ :2 ] >= ( 2, 6 )
test_home_directory = os.path.join( cwd, 'test', 'install_and_test_tool_shed_repositories', 'repositories_with_tools' )
-test_toolbox = None
-
# Here's the directory where everything happens. Temporary directories are created within this directory to contain
# the database, new repositories, etc.
galaxy_test_tmp_dir = os.path.join( test_home_directory, 'tmp' )
@@ -137,6 +136,8 @@
return tool_id, tool_version
def install_and_test_repositories( app, galaxy_shed_tools_dict, galaxy_shed_tool_conf_file ):
+ global test_toolbox
+ test_toolbox = imported_test_toolbox
# Initialize a dictionary for the summary that will be printed to stdout.
install_and_test_statistics_dict = install_and_test_base_util.initialize_install_and_test_statistics_dict( test_framework )
error_message = ''
@@ -441,9 +442,6 @@
app = UniverseApplication( **kwargs )
database_contexts.galaxy_context = app.model.context
database_contexts.install_context = app.install_model.context
- global test_toolbox
- import functional.test_toolbox as imported_test_toolbox
- test_toolbox = imported_test_toolbox
log.debug( "Embedded Galaxy application started..." )
# ---- Run galaxy webserver ------------------------------------------------------
@@ -577,15 +575,12 @@
"""
tests_to_delete = []
tools_to_delete_by_id = []
-
# Push all the toolbox tests to module level
G = globals()
-
# Eliminate all previous tests from G.
for key, val in G.items():
if key.startswith( 'TestForTool_' ):
del G[ key ]
- global test_toolbox
# Find all tests previously generated by twill.
for key in test_toolbox.__dict__:
if key.startswith( 'TestForTool_' ):
@@ -609,17 +604,19 @@
def test_repository_tools( app, repository, repository_dict, tool_test_results_dicts, tool_test_results_dict,
install_and_test_statistics_dict ):
"""Test tools contained in the received repository."""
+ # Set the global variable 'test_toolbox', so that test.functional.test_toolbox will generate the
+ # appropriate test methods.
+ test_toolbox.toolbox = app.toolbox
+ # Get the attributes that identify the repository whose contained tools are being tested.
name = str( repository.name )
owner = str( repository.owner )
changeset_revision = str( repository.changeset_revision )
repository_identifier_dict = dict( name=name, owner=owner, changeset_revision=changeset_revision )
- # Set the module-level variable 'toolbox', so that test.functional.test_toolbox will generate the
- # appropriate test methods. At this point, app.toolbox contains the upload tool and all tools contained
- # in the repository.
- test_toolbox.toolbox = app.toolbox
- # Generate the test methods for this installed repository. We need to pass in True here, or it will look
- # in $GALAXY_HOME/test-data for test data, which may result in missing or invalid test files.
- test_toolbox.build_tests( testing_shed_tools=True, master_api_key=install_and_test_base_util.default_galaxy_master_api_key )
+ # 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.
+ test_toolbox.build_tests( testing_shed_tools=True,
+ master_api_key=install_and_test_base_util.default_galaxy_master_api_key )
# Set up nose to run the generated functional tests.
test_config = nose.config.Config( env=os.environ, plugins=nose.plugins.manager.DefaultPluginManager() )
test_config.configure( sys.argv )
@@ -678,7 +675,8 @@
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 ) )
- # Remove twills' old generated test before building the new tests for the current tools.
+ # 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 )
return install_and_test_statistics_dict
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2e54fd511187/
Changeset: 2e54fd511187
User: inithello
Date: 2014-01-02 15:12:43
Summary: Update functional test's string checks to account for changes in the way grids are rendered.
Affected #: 1 file
diff -r 593fce2b6335865d1225cdd23cfaf3e388ab1140 -r 2e54fd51118797935c299c5f34b37ac48f780900 test/tool_shed/functional/test_1000_install_basic_repository.py
--- a/test/tool_shed/functional/test_1000_install_basic_repository.py
+++ b/test/tool_shed/functional/test_1000_install_basic_repository.py
@@ -108,12 +108,12 @@
'''Attempt to install the already installed filtering repository.'''
installed_repository = self.test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
# The page displayed after installation is the ajaxian "Montior installing tool shed repositories" page. Since the filter
- # repository was already installed, nothing will be in the process of being installed, so the grid will display 'No Items'.
- post_submit_strings_displayed = [ 'No Items' ]
+ # repository was already installed, nothing will be in the process of being installed, so the grid will not display 'filtering_0000'.
+ post_submit_strings_not_displayed = [ 'filtering_0000' ]
self.install_repository( 'filtering_0000',
common.test_user_1_name,
'Test 0000 Basic Repository Features 1',
- post_submit_strings_displayed=post_submit_strings_displayed )
+ post_submit_strings_not_displayed=post_submit_strings_not_displayed )
strings_displayed = [ 'filtering_0000',
"Galaxy's filtering tool",
'user1',
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/593fce2b6335/
Changeset: 593fce2b6335
User: inithello
Date: 2014-01-02 15:01:46
Summary: Fix update manager functional test.
Affected #: 1 file
diff -r 8e1a2e81499c780acf08c3f195717a3523f4e55d -r 593fce2b6335865d1225cdd23cfaf3e388ab1140 test/tool_shed/functional/test_1410_update_manager.py
--- a/test/tool_shed/functional/test_1410_update_manager.py
+++ b/test/tool_shed/functional/test_1410_update_manager.py
@@ -123,9 +123,8 @@
self.galaxy_login( email=common.admin_email, username=common.admin_username )
repository = self.test_db_util.get_repository_by_name_and_owner( repository_name, common.test_user_1_name )
self.update_tool_shed_status()
- ok_icon = '/static/june_2007_style/blue/ok_small.png'
- ok_title = 'This is the latest installable revision of this repository'
+ ok_title = r'title=\"Updates are available in the Tool Shed for this revision\"'
updates_icon = '/static/images/icon_warning_sml.gif'
- strings_displayed = [ '<img src="%s" class="icon-button" title="%s"/><img src="%s' % ( ok_icon, ok_title, updates_icon ) ]
+ strings_displayed = [ ok_title, updates_icon ]
self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
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.