From 93cbe569582626793f79e5626970703059f88933 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Mon, 1 Apr 2019 09:32:34 +0300 Subject: runner: Refactor metadata parsing To aid testing function parsing metadata.txt is split into outer helper that operates on dirfd and inner function that operates on FILE*. This allows us to test the parsing using fmemopen(), limiting the amount of necessary boilerplate. Signed-off-by: Arkadiusz Hiler Reviewed-by: Petri Latvala --- runner/resultgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runner/resultgen.c') diff --git a/runner/resultgen.c b/runner/resultgen.c index 23eb8903..42297d8a 100644 --- a/runner/resultgen.c +++ b/runner/resultgen.c @@ -1085,7 +1085,7 @@ struct json_object *generate_results_json(int dirfd) init_settings(&settings); init_job_list(&job_list); - if (!read_settings(&settings, dirfd)) { + if (!read_settings_from_dir(&settings, dirfd)) { fprintf(stderr, "resultgen: Cannot parse settings\n"); return NULL; } -- cgit v1.2.3