diff options
author | Petri Latvala <petri.latvala@intel.com> | 2018-10-19 11:46:48 +0300 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2018-10-23 13:28:15 +0300 |
commit | b633344e7407f2086199b9d835aa980ba4c29dfa (patch) | |
tree | fa5d9b6ce31b663c5423692cbfcc0d78c35650ca | |
parent | 741bf7064c467df725c14cc0b3b8b50436f9ee09 (diff) |
runner: Add "root" also to the "totals" object
Turns out the same information is looked up in different places in
different code paths. Piglit's summary module looks up total counts in
['totals']['root'], CI looks up ['totals']['']. The latter is
inherited from piglit, so this has probably changed at some point.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108486
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Tested-by: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r-- | runner/resultgen.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runner/resultgen.c b/runner/resultgen.c index ed8c9266..e059c65b 100644 --- a/runner/resultgen.c +++ b/runner/resultgen.c @@ -906,13 +906,14 @@ static void add_to_totals(char *binary, struct subtests *subtests, struct results *results) { - struct json_object *test, *resultobj, *roottotal, *binarytotal; + struct json_object *test, *resultobj, *emptystrtotal, *roottotal, *binarytotal; char piglit_name[256]; const char *result; size_t i; generate_piglit_name(binary, NULL, piglit_name, sizeof(piglit_name)); - roottotal = get_totals_object(results->totals, ""); + emptystrtotal = get_totals_object(results->totals, ""); + roottotal = get_totals_object(results->totals, "root"); binarytotal = get_totals_object(results->totals, piglit_name); if (subtests->size == 0) { @@ -922,6 +923,7 @@ static void add_to_totals(char *binary, return; } result = json_object_get_string(resultobj); + add_result_to_totals(emptystrtotal, result); add_result_to_totals(roottotal, result); add_result_to_totals(binarytotal, result); return; @@ -935,6 +937,7 @@ static void add_to_totals(char *binary, return; } result = json_object_get_string(resultobj); + add_result_to_totals(emptystrtotal, result); add_result_to_totals(roottotal, result); add_result_to_totals(binarytotal, result); } |