summaryrefslogtreecommitdiff
path: root/runner/resultgen.c
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-04-01 09:32:34 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-04-01 14:52:01 +0300
commit93cbe569582626793f79e5626970703059f88933 (patch)
tree8cb706c5a9c38e853424a1019aab1dfc089e2094 /runner/resultgen.c
parent7cadc6105b00f8d8ef166929118a95ce69221603 (diff)
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 <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'runner/resultgen.c')
-rw-r--r--runner/resultgen.c2
1 files changed, 1 insertions, 1 deletions
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;
}