Skip to content
Snippets Groups Projects
Unverified Commit 91a32fc9 authored by MarcoUCM's avatar MarcoUCM Committed by GitHub
Browse files

BugFix: Italian contest exporter and communication tasks (#1196)

* BugFix: Italian contest exporter and communication tasks

When the task is a communication task and it has no stubs,
exporter assumes "alone" and "std_io".
It only changes its mind to "stub" and "fifo_io" when a stub of
any language is found.

* Yaml format extended with user_io option

This option overrides the default asumption of User I/O option in
communication tasks (stdin/stdout in tasks without stubs and
fifos in tasks with stubs).

* Formatting (maximum line length)
parent 9044332e
Branches
No related tags found
No related merge requests found
......@@ -627,10 +627,17 @@ class YamlLoader(ContestLoader, TaskLoader, UserLoader, TeamLoader):
num_processes = load(conf, None, "num_processes")
if num_processes is None:
num_processes = 1
io_type = load(conf, None, "user_io")
if io_type is not None:
if io_type not in ["std_io", "fifo_io"]:
logger.warning("user_io incorrect. Valid options "
"are 'std_io' and 'fifo_io'. "
"Ignored.")
io_type = None
logger.info("Task type Communication")
args["task_type"] = "Communication"
args["task_type_parameters"] = \
[num_processes, "stub", "fifo_io"]
[num_processes, "alone", io_type or "std_io"]
digest = self.file_cacher.put_file_from_path(
path,
"Manager for task %s" % task.name)
......@@ -644,6 +651,8 @@ class YamlLoader(ContestLoader, TaskLoader, UserLoader, TeamLoader):
stub_name,
"Stub for task %s and language %s" % (
task.name, lang.name))
args["task_type_parameters"] = \
[num_processes, "stub", io_type or "fifo_io"]
args["managers"] += [
Manager(
"stub%s" % lang.source_extension, digest)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment