From ee537a119b381b78ce1d58769970c0302fe5b684 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 28 Mar 2016 13:56:38 -0400 Subject: [PATCH] Restructure to simplify the main() in scripts/functional_tests.py. Previously this was entering a conditional on the same condition twice. This simplifies this to just do that once and makes the galaxy and tool shed driver code look more similar with respect to launching a Galaxy webapp. --- scripts/functional_tests.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/scripts/functional_tests.py b/scripts/functional_tests.py index 71248009b92..b17324913e8 100644 --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -86,11 +86,13 @@ def main(): # For storing Data Manager outputs and .loc files so that real ones don't get clobbered data_manager_test_tmp_path = tempfile.mkdtemp( prefix='data_manager_test_tmp', dir=galaxy_test_tmp_dir ) galaxy_data_manager_data_path = tempfile.mkdtemp( prefix='data_manager_tool-data', dir=data_manager_test_tmp_path ) - - # ---- Build Application -------------------------------------------------- master_api_key = get_master_api_key() + app = None + server = None + if start_server: + # ---- Build Application -------------------------------------------------- kwargs = dict( shed_tool_data_table_config=shed_tool_data_table_config, test_conf="test.conf", tool_config_file=tool_config_file, @@ -107,11 +109,6 @@ def main(): kwargs[ 'datatypes_config_file' ] = datatypes_conf_override app = driver_util.build_galaxy_app(kwargs) - - # ---- Run webserver ------------------------------------------------------ - server = None - - if start_server: webapp = buildapp.app_factory( kwargs[ 'global_conf' ], app=app, use_translogger=False, static_enabled=True ) server, galaxy_test_port = driver_util.serve_webapp( webapp, host=galaxy_test_host, port=galaxy_test_port )