Commit f2f90d79 authored by Philip ABBET's avatar Philip ABBET

Make all the tests pass

parent 31092b08
......@@ -310,8 +310,7 @@ def execute(prefix, cache, instructions_file):
database_cache = {}
algorithm_cache = {}
host = Host()
host.setup(raise_on_errors=False)
host = Host(raise_on_errors=False)
executor = DockerExecutor(host, prefix, configuration, cache, dataformat_cache,
database_cache, algorithm_cache)
......
......@@ -299,6 +299,9 @@ def load_db_view(db_name, protocol_name, set_name, database, excluded_outputs=No
logger.error(' %s', e)
return (None, None)
if excluded_outputs is None:
excluded_outputs = []
# Setup the inputs
input_group = view.input_group(exclude_outputs=excluded_outputs)
......@@ -373,7 +376,8 @@ def index_outputs(configuration, names, uid=None, db_root=None, docker=False):
retcode = 0
host = dock.Host(raise_on_errors=False)
if docker:
host = dock.Host(raise_on_errors=False)
for database_name in names:
logger.info("Indexing database %s...", database_name)
......@@ -388,7 +392,8 @@ def index_outputs(configuration, names, uid=None, db_root=None, docker=False):
(view, input_group) = load_db_view(db_name, protocol_name, set_name, database)
if view is None:
return 1
retcode += 1
continue
else:
(databases_container, db_socket, zmq_context, input_list) = \
start_db_container(
......@@ -455,12 +460,13 @@ def index_outputs(configuration, names, uid=None, db_root=None, docker=False):
retcode += 1
continue
host.kill(databases_container)
host.wait(databases_container)
if docker:
host.kill(databases_container)
host.wait(databases_container)
db_socket.setsockopt(zmq.LINGER, 0)
db_socket.close()
zmq_context.term()
db_socket.setsockopt(zmq.LINGER, 0)
db_socket.close()
zmq_context.term()
return retcode
......@@ -577,7 +583,6 @@ def view_outputs(configuration, dataset_name, excluded_outputs=None, uid=None,
return ('\n' + ' ' * indent).join(value.split('\n'))
# Load the infos about the database set
(db_name, database, sets) = load_database_sets(configuration, dataset_name)
if (database is None) or (len(sets) != 1):
......
......@@ -16,6 +16,6 @@
},
"environment": {
"name": "Python 2.7",
"version": "1.1.0"
"version": "1.2.0"
}
}
......@@ -19,6 +19,6 @@
},
"environment": {
"name": "Python 2.7",
"version": "1.1.0"
"version": "1.2.0"
}
}
......@@ -23,6 +23,6 @@
},
"environment": {
"name": "Python 2.7",
"version": "1.1.0"
"version": "1.2.0"
}
}
......@@ -11,6 +11,6 @@
},
"environment": {
"name": "Python 2.7",
"version": "1.1.0"
"version": "1.2.0"
}
}
......@@ -119,7 +119,7 @@ def test_view_unknown_set():
def test_view_bad():
nose.tools.eq_(call('view', 'integers_db/1/double'), 1)
nose.tools.eq_(call('view', 'integers_db/1/two_sets'), 1)
def test_view_invalid():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment