diff --git a/scripts/functional_tests.py b/scripts/functional_tests.py index 1cdeb014bac..67fb063293e 100644 --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -28,21 +28,17 @@ def main(): testing_installed_tools = _check_arg( '-installed' ) datatypes_conf_override = None + default_tool_conf = None testing_shed_tools = testing_migrated_tools or testing_installed_tools - if testing_shed_tools: - # We need the upload tool for functional tests, so we'll create a temporary tool panel config that defines it. - tool_config_file = driver_util.FRAMEWORK_UPLOAD_TOOL_CONF - else: + if not testing_shed_tools: framework_test = _check_arg( '-framework' ) # Run through suite of tests testing framework. if framework_test: - tool_conf = driver_util.FRAMEWORK_SAMPLE_TOOLS_CONF + default_tool_conf = driver_util.FRAMEWORK_SAMPLE_TOOLS_CONF datatypes_conf_override = driver_util.FRAMEWORK_DATATYPES_CONF else: # Use tool_conf.xml toolbox. - tool_conf = None if _check_arg( '-with_framework_test_tools' ): - tool_conf = "%s,%s" % ( 'config/tool_conf.xml.sample', driver_util.FRAMEWORK_SAMPLE_TOOLS_CONF ) - tool_config_file = os.environ.get( 'GALAXY_TEST_TOOL_CONF', tool_conf ) + default_tool_conf = "%s,%s" % ( 'config/tool_conf.xml.sample', driver_util.FRAMEWORK_SAMPLE_TOOLS_CONF ) start_server = 'GALAXY_TEST_EXTERNAL' not in os.environ @@ -57,6 +53,7 @@ def main(): galaxy_db_path, use_test_file_dir=not testing_shed_tools, default_install_db_merged=True, + default_tool_conf=default_tool_conf, ) app = None @@ -65,7 +62,6 @@ def main(): if start_server: # ---- Build Application -------------------------------------------------- kwargs = dict( shed_tool_data_table_config=shed_tool_data_table_config, - tool_config_file=tool_config_file, update_integrated_tool_panel=False, ) kwargs.update(galaxy_config) if datatypes_conf_override: diff --git a/test/base/driver_util.py b/test/base/driver_util.py index 7453633056b..f48b5344b6d 100644 --- a/test/base/driver_util.py +++ b/test/base/driver_util.py @@ -96,6 +96,8 @@ def setup_galaxy_config( default_install_db_merged=True, default_tool_data_table_config_path=None, enable_tool_shed_check=False, + default_tool_conf=None, + shed_tool_conf=None, ): """Setup environment and build config for test Galaxy instance.""" if not os.path.exists(tmpdir): @@ -136,6 +138,14 @@ def setup_galaxy_config( # For storing Data Manager outputs and .loc files so that real ones don't get clobbered galaxy_data_manager_data_path = tempfile.mkdtemp(prefix='data_manager_tool-data', dir=tmpdir) + tool_conf = os.environ.get('GALAXY_TEST_TOOL_CONF', default_tool_conf) + if tool_conf is None: + # As a fallback always at least allow upload. + tool_conf = FRAMEWORK_UPLOAD_TOOL_CONF + + if shed_tool_conf is not None: + tool_conf = "%s,%s" % (tool_conf, shed_tool_conf) + config = dict( admin_users='test@bx.psu.edu', allow_library_path_paste=True, @@ -159,6 +169,7 @@ def setup_galaxy_config( running_functional_tests=True, template_cache_path=template_cache_path, template_path='templates', + tool_config_file=tool_conf, tool_data_table_config_path=tool_data_table_config_path, tool_parse_help=False, tool_path=tool_path, diff --git a/test/tool_shed/functional_tests.py b/test/tool_shed/functional_tests.py index ce04f3ea45a..97f591c9263 100644 --- a/test/tool_shed/functional_tests.py +++ b/test/tool_shed/functional_tests.py @@ -57,7 +57,6 @@ def main(): shed_tool_data_table_conf_file = os.environ.get( 'TOOL_SHED_TEST_TOOL_DATA_TABLE_CONF', os.path.join( tool_shed_test_tmp_dir, 'shed_tool_data_table_conf.xml' ) ) galaxy_shed_data_manager_conf_file = os.environ.get( 'GALAXY_SHED_DATA_MANAGER_CONF', os.path.join( tool_shed_test_tmp_dir, 'test_shed_data_manager_conf.xml' ) ) default_tool_data_table_config_path = os.path.join( tool_shed_test_tmp_dir, 'tool_data_table_conf.xml' ) - galaxy_tool_conf_file = os.environ.get( 'GALAXY_TEST_TOOL_CONF', driver_util.FRAMEWORK_UPLOAD_TOOL_CONF ) galaxy_shed_tool_conf_file = os.environ.get( 'GALAXY_TEST_SHED_TOOL_CONF', os.path.join( tool_shed_test_tmp_dir, 'test_shed_tool_conf.xml' ) ) galaxy_migrated_tool_conf_file = os.environ.get( 'GALAXY_TEST_MIGRATED_TOOL_CONF', os.path.join( tool_shed_test_tmp_dir, 'test_migrated_tool_conf.xml' ) ) galaxy_tool_sheds_conf_file = os.environ.get( 'GALAXY_TEST_TOOL_SHEDS_CONF', os.path.join( tool_shed_test_tmp_dir, 'test_sheds_conf.xml' ) ) @@ -137,7 +136,7 @@ def main(): shed_tool_data_table_config=shed_tool_data_table_conf_file, shed_tool_path=galaxy_shed_tool_path, tool_data_path=tool_data_path, - tool_config_file=[ galaxy_tool_conf_file, galaxy_shed_tool_conf_file ], + tool_sheds_config_file=galaxy_tool_sheds_conf_file ) kwargs.update( driver_util.setup_galaxy_config( @@ -146,6 +145,7 @@ def main(): default_install_db_merged=False, default_tool_data_table_config_path=default_tool_data_table_config_path, enable_tool_shed_check=True, + shed_tool_conf=galaxy_shed_tool_conf_file, ) ) print "Galaxy database connection:", kwargs["database_connection"]