From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: dev@dpdk.org
Cc: thomas.monjalon@6wind.com, harry.van.haaren@intel.com,
Jerin Jacob <jerin.jacob@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH 2/2] test: add a new unit test case status
Date: Sun, 19 Mar 2017 19:07:34 +0530 [thread overview]
Message-ID: <1489930654-16827-3-git-send-email-jerin.jacob@caviumnetworks.com> (raw)
In-Reply-To: <1489930654-16827-1-git-send-email-jerin.jacob@caviumnetworks.com>
Add a new unit test case status called "unsupported".
This is useful in marking a test case "unsupported" if testcase
returns -ENOTSUP at runtime.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
test/test/test.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/test/test.c b/test/test/test.c
index a86dc86..c561eb5 100644
--- a/test/test/test.c
+++ b/test/test/test.c
@@ -157,7 +157,8 @@ int
unit_test_suite_runner(struct unit_test_suite *suite)
{
int test_success;
- unsigned total = 0, executed = 0, skipped = 0, succeeded = 0, failed = 0;
+ unsigned int total = 0, executed = 0, skipped = 0;
+ unsigned int succeeded = 0, failed = 0, unsupported = 0;
const char *status;
if (suite->suite_name) {
@@ -191,8 +192,12 @@ unit_test_suite_runner(struct unit_test_suite *suite)
test_success = suite->unit_test_cases[total].testcase();
if (test_success == TEST_SUCCESS)
succeeded++;
+ else if (test_success == -ENOTSUP)
+ unsupported++;
else
failed++;
+ } else if (test_success == -ENOTSUP) {
+ unsupported++;
} else {
failed++;
}
@@ -203,6 +208,8 @@ unit_test_suite_runner(struct unit_test_suite *suite)
if (test_success == TEST_SUCCESS)
status = "succeeded";
+ else if (test_success == -ENOTSUP)
+ status = "unsupported";
else
status = "failed";
@@ -224,6 +231,7 @@ unit_test_suite_runner(struct unit_test_suite *suite)
printf(" + Tests Total : %2d\n", total);
printf(" + Tests Skipped : %2d\n", skipped);
printf(" + Tests Executed : %2d\n", executed);
+ printf(" + Tests Unsupported: %2d\n", unsupported);
printf(" + Tests Passed : %2d\n", succeeded);
printf(" + Tests Failed : %2d\n", failed);
printf(" + ------------------------------------------------------- +\n");
--
2.5.5
next prev parent reply other threads:[~2017-03-19 13:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-19 13:37 [dpdk-dev] [PATCH 0/2] add support for "unsupported testcases" in test framework Jerin Jacob
2017-03-19 13:37 ` [dpdk-dev] [PATCH 1/2] test: store only the test case name Jerin Jacob
2017-03-20 9:58 ` Van Haaren, Harry
2017-03-20 10:04 ` Jerin Jacob
2017-03-20 10:14 ` Van Haaren, Harry
2017-03-19 13:37 ` Jerin Jacob [this message]
2017-03-20 9:58 ` [dpdk-dev] [PATCH 2/2] test: add a new unit test case status Van Haaren, Harry
2017-03-27 9:07 ` [dpdk-dev] [PATCH 0/2] add support for "unsupported testcases" in test framework Thomas Monjalon
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=1489930654-16827-3-git-send-email-jerin.jacob@caviumnetworks.com \
--to=jerin.jacob@caviumnetworks.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=thomas.monjalon@6wind.com \
/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).