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 6/7] framework/test_result: add dpdk_version in Result
Date: Fri, 27 Nov 2020 10:50:28 +0800 [thread overview]
Message-ID: <20201127025029.22276-7-haiyangx.zhao@intel.com> (raw)
In-Reply-To: <20201127025029.22276-1-haiyangx.zhao@intel.com>
add dpdk_version and get method in class Result, and modify
all_targets as target element index changed.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
framework/test_result.py | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/framework/test_result.py b/framework/test_result.py
index e5a2b4e..3560745 100644
--- a/framework/test_result.py
+++ b/framework/test_result.py
@@ -86,6 +86,23 @@ class Result(object):
def __get_dut(self):
return self.__internals[self.__dut]
+ def current_dpdk_version(self, dut):
+ """
+ Returns the dpdk version for a given DUT
+ """
+ try:
+ dut_idx = self.__internals.index(dut)
+ return self.__internals[dut_idx + 1][0]
+ except:
+ return ''
+
+ def __set_dpdk_version(self, dpdk_version):
+ if not self.internals[self.__dut + 1]:
+ self.internals[self.__dut + 1].append(dpdk_version)
+
+ def __get_dpdk_version(self):
+ return self.internals[self.__dut + 1][0]
+
def __current_targets(self):
return self.internals[self.__dut + 1]
@@ -193,7 +210,7 @@ class Result(object):
dut_idx = self.__internals.index(dut)
except:
return None
- return self.__internals[dut_idx + 1][::3]
+ return self.__internals[dut_idx + 1][1::3]
def current_nic(self, dut, target):
"""
@@ -287,6 +304,7 @@ class Result(object):
presented interface.
"""
dut = property(__get_dut, __set_dut)
+ dpdk_version = property(__get_dpdk_version, __set_dpdk_version)
target = property(__get_target, __set_target)
test_suite = property(__get_test_suite, __set_test_suite)
test_case = property(__get_test_case, __set_test_case)
--
2.17.1
next prev parent reply other threads:[~2020-11-27 2:56 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 ` Haiyang Zhao [this message]
2020-11-27 2:50 ` [dts] [PATCH V1 7/7] framework/stats_reporter: add dpdk version in stats_reporter Haiyang Zhao
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-7-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).