public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Andi Shyti <andi.shyti@intel.com>,
	Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/1] runner: Add "root" also to the "totals" object
Date: Fri, 19 Oct 2018 11:46:48 +0300	[thread overview]
Message-ID: <20181019084648.24259-1-petri.latvala@intel.com> (raw)

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>
---
 runner/resultgen.c | 7 +++++--
 1 file 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);
 	}
-- 
2.18.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2018-10-19  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:46 Petri Latvala [this message]
2018-10-19 12:01 ` [igt-dev] [PATCH i-g-t 1/1] runner: Add "root" also to the "totals" object Andi Shyti
2018-10-19 12:17 ` Arkadiusz Hiler
2018-10-22 18:48 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/1] " Patchwork
2018-10-23  4:38 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2018-10-23  5:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181019084648.24259-1-petri.latvala@intel.com \
    --to=petri.latvala@intel.com \
    --cc=andi.shyti@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox