1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ef5f750810f7/
Changeset: ef5f750810f7
User: greg
Date: 2014-02-24 16:20:14
Summary: Enhance the Tool Shed fabric_util.wait_for_process method to timeout after a reasonable period of waiting for stderr or stdout during tool dependency package compilation.
Affected #: 1 file
diff -r f573461f3667e8f120dc05bbd11a019d5fae1960 -r ef5f750810f791d39d5fe37f256b2526fa9916ae lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -38,6 +38,7 @@
log = logging.getLogger( __name__ )
INSTALLATION_LOG = 'INSTALLATION.log'
+NO_CMD_OUTPUT_TIMEOUT = 600
VIRTUALENV_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz'
@@ -829,19 +830,46 @@
return env
def wait_for_process( process_handle, stream_output, stdout_queue, stderr_queue ):
+ pid = process_handle.pid
standard_out = []
standard_err = []
process_handle.wait()
+ # Generate stdout.
while True:
- line = stdout_queue.get()
- if line is None:
+ try:
+ line = stdout_queue.get( timeout=NO_CMD_OUTPUT_TIMEOUT )
+ except Queue.Empty:
+ err_msg = "\nShutting down process id %s because it generated no stdout for the defined timout period of %d seconds.\n" % \
+ ( pid, NO_CMD_OUTPUT_TIMEOUT )
+ print err_msg
+ standard_out.append( err_msg )
+ stdout_queue.task_done()
+ process_handle.kill()
break
- standard_out.append(line)
+ else:
+ if line:
+ standard_out.append( line )
+ else:
+ stdout_queue.task_done()
+ break
+ # Generate stderr.
while True:
- line = stderr_queue.get()
- if line is None:
+ try:
+ line = stderr_queue.get( timeout=NO_CMD_OUTPUT_TIMEOUT )
+ except Queue.Empty:
+ err_msg = "\nShutting down process id %s because it generated no stderr for the defined timout period of %d seconds.\n" % \
+ ( pid, NO_CMD_OUTPUT_TIMEOUT )
+ print err_msg
+ standard_err.append( err_msg )
+ stderr_queue.task_done()
+ process_handle.kill()
break
- standard_err.append(line)
+ else:
+ if line:
+ standard_err.append( line )
+ else:
+ stderr_queue.task_done()
+ break
stdout = '\n'.join( standard_out )
stderr = '\n'.join( standard_err )
return stdout, stderr
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/1beac989dac9/
Changeset: 1beac989dac9
User: davebgx
Date: 2014-02-21 22:05:53
Summary: Fix the install database connection specification for the install and test framework.
Affected #: 2 files
diff -r 0a35b28844159fd534e49bbb71c0ab00c4dfb367 -r 1beac989dac959139f421353a5f33f53c1e78d96 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
@@ -66,6 +66,11 @@
default_galaxy_test_file_dir = "test-data"
os.environ[ 'GALAXY_INSTALL_TEST_TMP_DIR' ] = galaxy_test_tmp_dir
+# Use separate databases for Galaxy and tool shed install info by default,
+# set GALAXY_TEST_INSTALL_DB_MERGED to True to revert to merged databases
+# behavior.
+default_install_db_merged = False
+
# This script can be run in such a way that no Tool Shed database records should be changed.
if '-info_only' in sys.argv or 'GALAXY_INSTALL_TEST_INFO_ONLY' in os.environ:
can_update_tool_shed = False
@@ -421,9 +426,9 @@
if 'GALAXY_INSTALL_TEST_INSTALL_DBURI' in os.environ:
install_database_connection = os.environ[ 'GALAXY_INSTALL_TEST_INSTALL_DBURI' ]
elif asbool( os.environ.get( 'GALAXY_TEST_INSTALL_DB_MERGED', default_install_db_merged ) ):
- install_database_connection = galaxy_database_connection
+ install_database_connection = database_connection
else:
- install_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
+ install_galaxy_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
install_database_connection = 'sqlite:///%s' % install_galaxy_db_path
kwargs = {}
for dir in [ galaxy_test_tmp_dir ]:
diff -r 0a35b28844159fd534e49bbb71c0ab00c4dfb367 -r 1beac989dac959139f421353a5f33f53c1e78d96 test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
@@ -65,6 +65,11 @@
default_galaxy_test_file_dir = "test-data"
os.environ[ 'GALAXY_INSTALL_TEST_TMP_DIR' ] = galaxy_test_tmp_dir
+# Use separate databases for Galaxy and tool shed install info by default,
+# set GALAXY_TEST_INSTALL_DB_MERGED to True to revert to merged databases
+# behavior.
+default_install_db_merged = False
+
# This script can be run in such a way that no Tool Shed database records should be changed.
if '-info_only' in sys.argv or 'GALAXY_INSTALL_TEST_INFO_ONLY' in os.environ:
can_update_tool_shed = False
@@ -273,9 +278,9 @@
if 'GALAXY_INSTALL_TEST_INSTALL_DBURI' in os.environ:
install_database_connection = os.environ[ 'GALAXY_INSTALL_TEST_INSTALL_DBURI' ]
elif asbool( os.environ.get( 'GALAXY_TEST_INSTALL_DB_MERGED', default_install_db_merged ) ):
- install_database_connection = galaxy_database_connection
+ install_database_connection = database_connection
else:
- install_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
+ install_galaxy_db_path = os.path.join( galaxy_db_path, 'install.sqlite' )
install_database_connection = 'sqlite:///%s' % install_galaxy_db_path
kwargs = {}
for dir in [ galaxy_test_tmp_dir ]:
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/0a35b2884415/
Changeset: 0a35b2884415
User: jmchilton
Date: 2014-02-21 21:57:09
Summary: Fix Python 2.7ism in test_evaluation.py.
Affected #: 1 file
diff -r c5be84ef148e7866bfe31610cea5c9f1bae09fe0 -r 0a35b28844159fd534e49bbb71c0ab00c4dfb367 test/unit/tools/test_evaluation.py
--- a/test/unit/tools/test_evaluation.py
+++ b/test/unit/tools/test_evaluation.py
@@ -168,7 +168,7 @@
if "new_file_path" not in kwds:
kwds[ "new_file_path" ] = self.app.config.new_file_path
self.evaluator.set_compute_environment( TestComputeEnviornment( **kwds ) )
- self.assertIn( "exec_before_job", self.tool.hooks_called )
+ assert "exec_before_job" in self.tool.hooks_called
def _setup_test_bwa_job( self ):
self.job.input_datasets = [ self._job_dataset( 'input1', '/galaxy/files/dataset_1.dat' ) ]
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.