diff --git a/CMakeLists.txt b/CMakeLists.txt index 77a3671..b030187 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11.0) project(recodex-worker) -set(RECODEX_VERSION 1.8.0) +set(RECODEX_VERSION 1.9.0) enable_testing() set(EXEC_NAME ${PROJECT_NAME}) diff --git a/examples/job-config.yml b/examples/job-config.yml index 114a751..c446258 100644 --- a/examples/job-config.yml +++ b/examples/job-config.yml @@ -62,8 +62,8 @@ tasks: cmd: bin: "./test" args: [] - success_exit_codes: # list of exit codes which will be accepted as success - - 0 # zero is success by default, but if success_exit_codes is present, it must be added explicitly. + success-exit-codes: # list of exit codes which will be accepted as success + - 0 # zero is success by default, but if success-exit-codes is present, it must be added explicitly. - 1 # single code - [100, 200] # an interval (inclusive) # codes 0, 1, 100, 101, ... 199, and 200 will all be accepted diff --git a/src/helpers/config.cpp b/src/helpers/config.cpp index 24cf630..bb11de1 100644 --- a/src/helpers/config.cpp +++ b/src/helpers/config.cpp @@ -46,7 +46,7 @@ void load_task_success_exit_codes(const YAML::Node &node, std::vector &suc } } } else { - throw helpers::config_exception("Task command success_exit_codes must be an integer or a list."); + throw helpers::config_exception("Task command success-exit-codes must be an integer or a list."); } } @@ -125,8 +125,8 @@ std::shared_ptr helpers::build_job_metadata(const YAML::Node &conf task_meta->cmd_args = ctask["cmd"]["args"].as>(); } // can be omitted... no throw - if (ctask["cmd"]["success_exit_codes"]) { - load_task_success_exit_codes(ctask["cmd"]["success_exit_codes"], task_meta->success_exit_codes); + if (ctask["cmd"]["success-exit-codes"]) { + load_task_success_exit_codes(ctask["cmd"]["success-exit-codes"], task_meta->success_exit_codes); } } else { throw config_exception("Command in task is not a map"); diff --git a/tests/job_config.cpp b/tests/job_config.cpp index 3d254fe..f470fa0 100644 --- a/tests/job_config.cpp +++ b/tests/job_config.cpp @@ -192,7 +192,7 @@ TEST(job_config_test, config_data) " args:\n" " - -v\n" " - \"-f 01.in\"\n" - " success_exit_codes:\n" + " success-exit-codes:\n" " - 1\n" " - [3,5]\n" " - [10,12]\n"