From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t 09/11] runner/resultgen: Don't report subtest result if it has dynamic subtests
Date: Mon, 2 Dec 2019 15:01:07 +0200 [thread overview]
Message-ID: <20191202130109.929-10-petri.latvala@intel.com> (raw)
In-Reply-To: <20191202130109.929-1-petri.latvala@intel.com>
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
---
runner/resultgen.c | 43 +++++++++++++++++++++++++++++++++----------
1 file changed, 33 insertions(+), 10 deletions(-)
diff --git a/runner/resultgen.c b/runner/resultgen.c
index 64b899ca..2e15331e 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -1148,6 +1148,22 @@ static void fill_from_journal(int fd,
fclose(f);
}
+static void prune_subtests_with_dynamic_subtests(const char *binary,
+ struct subtest_list *subtests,
+ struct json_object *tests)
+{
+ char piglit_name[256];
+ size_t i;
+
+ for (i = 0; i < subtests->size; i++) {
+ if (subtests->subs[i].dynamic_size) {
+ generate_piglit_name(binary, subtests->subs[i].name, piglit_name, sizeof(piglit_name));
+ json_object_object_del(tests, piglit_name);
+ }
+
+ }
+}
+
static bool stderr_contains_warnings(const char *beg, const char *end)
{
struct match_needle needles[] = {
@@ -1218,8 +1234,10 @@ static void override_results(char *binary,
for (i = 0; i < subtests->size; i++) {
generate_piglit_name(binary, subtests->subs[i].name, piglit_name, sizeof(piglit_name));
- obj = get_or_create_json_object(tests, piglit_name);
- override_result_single(obj);
+ if (subtests->subs[i].dynamic_size == 0) {
+ obj = get_or_create_json_object(tests, piglit_name);
+ override_result_single(obj);
+ }
for (k = 0; k < subtests->subs[i].dynamic_size; k++) {
generate_piglit_name_for_dynamic(piglit_name, subtests->subs[i].dynamic_names[k],
@@ -1300,15 +1318,18 @@ static void add_to_totals(const char *binary,
for (i = 0; i < subtests->size; i++) {
generate_piglit_name(binary, subtests->subs[i].name, piglit_name, sizeof(piglit_name));
- test = get_or_create_json_object(results->tests, piglit_name);
- if (!json_object_object_get_ex(test, "result", &resultobj)) {
- fprintf(stderr, "Warning: No results set for %s\n", piglit_name);
- return;
+
+ if (subtests->subs[i].dynamic_size == 0) {
+ test = get_or_create_json_object(results->tests, piglit_name);
+ if (!json_object_object_get_ex(test, "result", &resultobj)) {
+ fprintf(stderr, "Warning: No results set for %s\n", piglit_name);
+ 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);
}
- result = json_object_get_string(resultobj);
- add_result_to_totals(emptystrtotal, result);
- add_result_to_totals(roottotal, result);
- add_result_to_totals(binarytotal, result);
for (k = 0; k < subtests->subs[i].dynamic_size; k++) {
generate_piglit_name_for_dynamic(piglit_name, subtests->subs[i].dynamic_names[k],
@@ -1355,6 +1376,8 @@ static bool parse_test_directory(int dirfd,
goto parse_output_end;
}
+ prune_subtests_with_dynamic_subtests(entry->binary, &subtests, results->tests);
+
override_results(entry->binary, &subtests, results->tests);
add_to_totals(entry->binary, &subtests, results);
--
2.19.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-12-02 13:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-02 13:00 [igt-dev] [PATCH i-g-t 00/11] runner: Don't report subtests that have dynamic subtests Petri Latvala
2019-12-02 13:00 ` [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 02/11] runner/resultgen: Extract finding begin/end lines for a subtest " Petri Latvala
2019-12-03 13:33 ` Arkadiusz Hiler
2019-12-11 12:46 ` Arkadiusz Hiler
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 03/11] runner/resultgen: Extract finding begin/end pointers for test output to helpers Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 04/11] runner/resultgen: Hoist handling of dynamic subtest output to a helper Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 05/11] runner/resultgen: Extrude dynamic subtest result texts Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 06/11] runner/resultgen: Add support for extra validation hook in find_matches() Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 07/11] runner/resultgen: Make subtest result line finding more robust Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 08/11] runner/json_tests: Adapt to dynamic subtest result parsing Petri Latvala
2019-12-02 13:01 ` Petri Latvala [this message]
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 10/11] runner/json_tests: Adapt to no longer reporting subtests with dynamic subtests Petri Latvala
2019-12-02 13:01 ` [igt-dev] [PATCH i-g-t 11/11] runner/json_tests: Add test for parsing dynamic subtests with same name Petri Latvala
2019-12-02 13:47 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Don't report subtests that have dynamic subtests Patchwork
2019-12-02 15:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2019-12-17 9:47 [igt-dev] [PATCH i-g-t 01/11] runner/resultgen: Extract igt-version field handling to a helper Petri Latvala
2019-12-17 9:47 ` [igt-dev] [PATCH i-g-t 09/11] runner/resultgen: Don't report subtest result if it has dynamic subtests Petri Latvala
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=20191202130109.929-10-petri.latvala@intel.com \
--to=petri.latvala@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