test suite reviews and discussions
 help / color / mirror / Atom feed
From: Haiyang Zhao <haiyangx.zhao@intel.com>
To: Lijuan.Tu@intel.com, dts@dpdk.org
Cc: Haiyang Zhao <haiyangx.zhao@intel.com>
Subject: [dts] [PATCH V1 7/7] framework/stats_reporter: add dpdk version in stats_reporter
Date: Fri, 27 Nov 2020 10:50:29 +0800	[thread overview]
Message-ID: <20201127025029.22276-8-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201127025029.22276-1-haiyangx.zhao@intel.com>

add dpdk version in stats_reporter.

Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
 framework/stats_reporter.py | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/framework/stats_reporter.py b/framework/stats_reporter.py
index 3793ca5..8cde5cd 100644
--- a/framework/stats_reporter.py
+++ b/framework/stats_reporter.py
@@ -65,6 +65,13 @@ class StatsReporter(object):
                             self.__add_stat(test_result)
 
     def __write_stats(self):
+        duts = self.result.all_duts()
+        if len(duts) == 1:
+            self.stats_file.write("dpdk_version = {}\n".format(self.result.current_dpdk_version(duts[0])))
+        else:
+            for dut in duts():
+                dpdk_version = self.result.current_dpdk_version(dut)
+                self.stats_file.write("{}.dpdk_version = {}\n".format(dut, dpdk_version))
         self.__count_stats()
         self.stats_file.write("Passed     = %d\n" % self.passed)
         self.stats_file.write("Failed     = %d\n" % self.failed)
-- 
2.17.1


  parent reply	other threads:[~2020-11-27  2:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  2:50 [dts] [PATCH V1 0/7] framework: record DPDK version in result Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 1/7] framework/dut: record DPDK version in host DUT Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 2/7] framework/virt_dut: record DPDK version in guest DUT Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 3/7] framework/dts: save dpdk version in global result Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 4/7] framework/excel_reporter: add dpdk version in excel result Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 5/7] framework/json_reporter: add dpdk version in json Haiyang Zhao
2020-11-27  2:50 ` [dts] [PATCH V1 6/7] framework/test_result: add dpdk_version in Result Haiyang Zhao
2020-11-27  2:50 ` Haiyang Zhao [this message]
2020-12-01  1:33 ` [dts] [PATCH V1 0/7] framework: record DPDK version in result Tu, Lijuan

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=20201127025029.22276-8-haiyangx.zhao@intel.com \
    --to=haiyangx.zhao@intel.com \
    --cc=Lijuan.Tu@intel.com \
    --cc=dts@dpdk.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;
as well as URLs for NNTP newsgroup(s).