Commit 053dc1eb authored by Stanislav Bohm's avatar Stanislav Bohm

FIX: Fixed problem with redirecting loom/run/run

parent 16a74eb6
......@@ -67,8 +67,13 @@ void RunTask::start(DataVector &inputs)
std::string path = get_path(name);
std::string filename = inputs[i]->get_filename();
assert(!filename.empty());
llog->debug("Creating symlink of '{}' for input id={} filename={}",
msg.map_inputs(i), task->get_inputs()[i], filename);
if (!task->get_inputs().empty()) {
llog->debug("Creating symlink of '{}' for input id={} filename={}",
msg.map_inputs(i), task->get_inputs()[i], filename);
} else {
llog->debug("Creating symlink of '{}' for filename={}",
msg.map_inputs(i), filename);
}
if (symlink(filename.c_str(), path.c_str())) {
log_errno_abort("symlink");
}
......
......@@ -74,6 +74,20 @@ def test_py_redirect2(loom_env):
assert b"usr\n" in result
def test_py_redirect3(loom_env):
def f(a):
return tasks.run("cat X", [(a, "X")])
loom_env.start(1)
c = tasks.const("DataData")
a = tasks.py_call(f, (c,))
result = loom_env.submit(a)
assert b"DataData" in result
def test_py_fail_too_many_args(loom_env):
def g():
......
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