DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC 0/4] Use Google Test as DPDK unit test framework
@ 2016-08-02 20:37 Declan Doherty
  2016-08-02 20:37 ` [dpdk-dev] [RFC 1/4] mk: Add support for C++ compilation Declan Doherty
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Declan Doherty @ 2016-08-02 20:37 UTC (permalink / raw)
  To: dev; +Cc: Declan Doherty

I've been trying out using google test as a possible replacement for our unit
test framework and have put to together this series of patches with help from
Anatoly as RFC to get peoples thoughts on migrating to google test.

To facilitate google test this rfc patch set contains build system changes to
allow C++ to built within the DPDK framework, this intended for unit test code
only, and to support google test which is a C++ framework. Don't worry, I'm not
advocating making DPDK a C++ project :) 

A new EAL option to allow the user to silence logging to stdout while still
logging to syslog. This was to facilitate a eclipse plugin I was using which
parses googe test output, so it is not strictly necessary.

A example application which uses the C++ build changes.

And finally a google test application which some mempool tests ported from the
current test app to give a feel of what google test is like to use for testing
C. 

Some of the major advantages of google test that I see over continuing to use the
current test include giving a consist feel to all tests, a powerful test
execution framework which allow individual test suites or tests to be specified
from the command line, support for a standard xunit output which can be integrated
into a continuous build systems, and a very powerful mocking library
which allows much more control over testing failure conditions.

Have a look at the patch set keeping in mind that this isn't intended to be
production code, I imagine that build systems changes for C++ would require some
refinement etc

Regards
Declan


Anatoly Burakov (2):
  mk: Add support for C++ compilation
  examples: add c++ example application

Declan Doherty (2):
  eal: add command line option to log output to stdout
  app/test-gtest: example google test application

 app/Makefile                               |   1 +
 app/test-gtest/Makefile                    |  67 +++++++
 app/test-gtest/main.cpp                    |  20 ++
 app/test-gtest/test_mempool.cpp            | 281 +++++++++++++++++++++++++++++
 config/common_base                         |   5 +
 examples/Makefile                          |   1 +
 examples/helloworld-cpp/Makefile           |  51 ++++++
 examples/helloworld-cpp/c_code.c           |   5 +
 examples/helloworld-cpp/c_header.h         |   6 +
 examples/helloworld-cpp/cpp_code.cpp       |  89 +++++++++
 lib/librte_eal/common/eal_common_log.c     |  14 ++
 lib/librte_eal/common/eal_common_options.c |   8 +
 lib/librte_eal/common/eal_options.h        |   2 +
 lib/librte_eal/common/include/rte_log.h    |  15 ++
 lib/librte_eal/linuxapp/eal/eal.c          |   1 +
 lib/librte_eal/linuxapp/eal/eal_log.c      |  23 ++-
 mk/internal/rte.compile-pre.mk             |  52 +++++-
 mk/target/generic/rte.vars.mk              |   3 +
 mk/toolchain/clang/rte.vars.mk             |  14 +-
 mk/toolchain/gcc/rte.vars.mk               |  14 +-
 mk/toolchain/icc/rte.vars.mk               |  10 +-
 21 files changed, 660 insertions(+), 22 deletions(-)
 create mode 100644 app/test-gtest/Makefile
 create mode 100644 app/test-gtest/main.cpp
 create mode 100644 app/test-gtest/test_mempool.cpp
 create mode 100644 examples/helloworld-cpp/Makefile
 create mode 100644 examples/helloworld-cpp/c_code.c
 create mode 100644 examples/helloworld-cpp/c_header.h
 create mode 100644 examples/helloworld-cpp/cpp_code.cpp

-- 
2.5.5

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-08-05 14:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-02 20:37 [dpdk-dev] [RFC 0/4] Use Google Test as DPDK unit test framework Declan Doherty
2016-08-02 20:37 ` [dpdk-dev] [RFC 1/4] mk: Add support for C++ compilation Declan Doherty
2016-08-02 20:37 ` [dpdk-dev] [RFC 2/4] examples: add c++ example application Declan Doherty
2016-08-02 20:37 ` [dpdk-dev] [RFC 3/4] eal: add command line option to log output to stdout Declan Doherty
2016-08-03 11:25   ` Neil Horman
2016-08-02 20:37 ` [dpdk-dev] [RFC 4/4] app/test-gtest: example google test application Declan Doherty
2016-08-02 21:52 ` [dpdk-dev] [RFC 0/4] Use Google Test as DPDK unit test framework Thomas Monjalon
2016-08-03  9:16   ` Remy Horton
2016-08-03  9:57   ` Doherty, Declan
2016-08-03 12:51     ` Neil Horman
2016-08-03 20:46     ` Ming Zhao
2016-08-04 19:47       ` Jim Murphy
2016-08-04 19:55         ` Wiles, Keith
2016-08-05  7:42           ` Thomas Monjalon
2016-08-05  7:41     ` Yerden Zhumabekov
2016-08-05  9:11       ` Remy Horton
2016-08-05 12:59         ` Neil Horman
2016-08-05 14:54           ` Remy Horton
2016-08-03 11:31   ` Neil Horman

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).