1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/270ef5007ae8/ Changeset: 270ef5007ae8 User: inithello Date: 2013-04-16 21:28:23 Summary: Added info_only option to install and test script. Affected #: 1 file diff -r 95c90c1d90294032a0db5f3cb9312a967ac00e49 -r 270ef5007ae876bfbaa3110d6666432751152323 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 @@ -265,9 +265,8 @@ tool_id = parts[ -2 ] return tool_id, tool_version -def get_tool_test_errors_from_api( tool_shed_url, metadata_dict ): - params = dict() - api_path = metadata_dict[ 'url' ].split( '/' ) +def get_tool_test_errors_from_api( tool_shed_url, metadata_revision_id ): + api_path = [ 'api', 'repository_revisions', metadata_revision_id ] api_url = get_api_url( base=tool_shed_url, parts=api_path ) repository_metadata = json_from_url( api_url ) if repository_metadata[ 'tool_test_errors' ] is None: @@ -292,7 +291,10 @@ params[ 'tools_functionally_correct' ] = 'false' params[ 'do_not_test' ] = 'false' params[ 'tool_test_errors' ] = test_results_dict - return update( tool_shed_api_key, '%s' % ( url_join( galaxy_tool_shed_url, 'api', 'repository_revisions', metadata_id ) ), params, return_formatted=False ) + if '-info_only' in sys.argv: + return {} + else: + return update( tool_shed_api_key, '%s' % ( url_join( galaxy_tool_shed_url, 'api', 'repository_revisions', metadata_id ) ), params, return_formatted=False ) def run_tests( test_config ): loader = nose.loader.TestLoader( config=test_config ) @@ -332,8 +334,6 @@ galaxy_test_file_dir = os.environ.get( 'GALAXY_INSTALL_TEST_FILE_DIR', default_galaxy_test_file_dir ) if not os.path.isabs( galaxy_test_file_dir ): galaxy_test_file_dir = os.path.abspath( galaxy_test_file_dir ) - # Set up the tool dependency path for the Galaxy instance. - tool_dependency_dir = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_DEPENDENCY_DIR', None ) use_distributed_object_store = os.environ.get( 'GALAXY_INSTALL_TEST_USE_DISTRIBUTED_OBJECT_STORE', False ) if not os.path.isdir( galaxy_test_tmp_dir ): os.mkdir( galaxy_test_tmp_dir ) @@ -363,9 +363,12 @@ new_repos_path = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) galaxy_tempfiles = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) galaxy_shed_tool_path = tempfile.mkdtemp( dir=galaxy_test_tmp_dir, prefix='shed_tools' ) - galaxy_migrated_tool_path = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) - galaxy_tool_dependency_dir = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) - os.environ[ 'GALAXY_INSTALL_TEST_TOOL_DEPENDENCY_DIR' ] = galaxy_tool_dependency_dir + galaxy_migrated_tool_path = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) + # Set up the tool dependency path for the Galaxy instance. + tool_dependency_dir = os.environ.get( 'GALAXY_INSTALL_TEST_TOOL_DEPENDENCY_DIR', None ) + if tool_dependency_dir is None: + tool_dependency_dir = tempfile.mkdtemp( dir=galaxy_test_tmp_dir ) + os.environ[ 'GALAXY_INSTALL_TEST_TOOL_DEPENDENCY_DIR' ] = tool_dependency_dir if 'GALAXY_INSTALL_TEST_DBURI' in os.environ: database_connection = os.environ[ 'GALAXY_INSTALL_TEST_DBURI' ] else: @@ -422,7 +425,7 @@ tool_config_file = [ galaxy_tool_conf_file, galaxy_shed_tool_conf_file ], tool_data_path = tool_data_path, tool_data_table_config_path = galaxy_tool_data_table_conf_file, - tool_dependency_dir = galaxy_tool_dependency_dir, + tool_dependency_dir = tool_dependency_dir, tool_path = tool_path, tool_parse_help = False, tool_sheds_config_file = galaxy_tool_sheds_conf_file, @@ -625,7 +628,7 @@ # }, # ] # } - repository_status = get_tool_test_errors_from_api( galaxy_tool_shed_url, repository_info_dict ) + repository_status = get_tool_test_errors_from_api( galaxy_tool_shed_url, metadata_revision_id ) if 'test_environment' not in repository_status: repository_status[ 'test_environment' ] = {} test_environment = get_test_environment( repository_status[ 'test_environment' ] ) @@ -775,6 +778,8 @@ print "####################################################################################" print "# %s - repository installation and testing script completed." % now print "# Repository revisions tested: %d" % repositories_tested + if '-info_only' in sys.argv: + print "# -info_only set, not updating the tool shed." if repositories_tested > 0: if repositories_passed: print '# ----------------------------------------------------------------------------------' 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.