DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Richardson, Bruce" <bruce.richardson@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if set
Date: Mon, 18 Dec 2017 21:11:50 +0530	[thread overview]
Message-ID: <20171218154149.GA18012@jerin> (raw)
In-Reply-To: <E923DB57A917B54B9182A2E928D00FA650FE308A@IRSMSX102.ger.corp.intel.com>

-----Original Message-----
> Date: Mon, 18 Dec 2017 15:24:22 +0000
> From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> CC: "dev@dpdk.org" <dev@dpdk.org>, "Richardson, Bruce"
>  <bruce.richardson@intel.com>
> Subject: RE: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if
>  set
> 
> > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> > Sent: Monday, December 18, 2017 2:59 PM
> > To: Van Haaren, Harry <harry.van.haaren@intel.com>
> > Cc: dev@dpdk.org; Richardson, Bruce <bruce.richardson@intel.com>
> > Subject: Re: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if
> > set
> > 
> > -----Original Message-----
> > > Date: Mon, 18 Dec 2017 11:53:57 +0000
> > > From: Harry van Haaren <harry.van.haaren@intel.com>
> > > To: dev@dpdk.org
> > > CC: bruce.richardson@intel.com, Harry van Haaren
> > >  <harry.van.haaren@intel.com>
> > > Subject: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if set
> > > X-Mailer: git-send-email 2.7.4
> > >
> > > This commit paves the way for the meson tests in the next
> > > patch. With this patch the test binary checks the DPDK_TEST
> > > environment variable and if set, the contents of the var
> > > are inserted on the test app command line, and run.
> > >
> > > This allows testing of various different unit tests without
> > > manual interaction with the RTE>> test prompt, instead automating
> > > it using the DPDK_TEST environment variable.
> > 
> > Another alternative is to pipe the command.
> > example:
> > echo "eventdev_common_autotest" | sudo ./build/app/test
> 
> 
> With the current implementation, meson handles which tests to run, and the command line. This gives us a clean interface from which to run tests. Note that the following command will run the tests requested:
> 
> $ meson test ring_autotest ring_perf_autotest acl_autotest
> 
> Meson itself supports two methods of launching tests from the same binary: argv and env variables. In this implementation, the DPDK_TEST env is set by the test runner - and the user doesn't have to use it manually at all, and it is not exported in the shell after the tests have run.
> 
> In short - I don't see added value in reworking this to argc argv, or in using terminal tricks like echo "test" | sudo ./test.
> 
> Actually, the current method has an easter egg included:
> If a developer is focused on a single test-case (TDD anyone? :), then they could use the DPDK_TEST env var as a feature, $ export DPDK_TEST=ring_autotest  and run that test automatically when the binary is launched.

Yup. I don't see any harm in exposing DPDK_TEST means of test selection.

  reply	other threads:[~2017-12-18 15:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-18 11:53 [dpdk-dev] [PATCH 0/2] next-build: add test app to build Harry van Haaren
2017-12-18 11:53 ` [dpdk-dev] [PATCH 1/2] test: use env variable to run test if set Harry van Haaren
2017-12-18 13:50   ` Bruce Richardson
2017-12-18 14:59   ` Jerin Jacob
2017-12-18 15:24     ` Van Haaren, Harry
2017-12-18 15:41       ` Jerin Jacob [this message]
2017-12-18 11:53 ` [dpdk-dev] [PATCH 2/2] meson: add tests app to build Harry van Haaren
2017-12-18 13:55   ` Bruce Richardson
2017-12-18 15:24     ` Van Haaren, Harry
2017-12-20 10:23   ` Bruce Richardson
2017-12-18 13:57 ` [dpdk-dev] [PATCH 0/2] next-build: add test " Bruce Richardson
2017-12-18 15:24   ` Van Haaren, Harry
2017-12-20 11:16 ` [dpdk-dev] [PATCH v2 " Harry van Haaren
2017-12-20 11:16   ` [dpdk-dev] [PATCH v2 1/2] test: use env variable to run test if set Harry van Haaren
2017-12-20 11:47     ` Bruce Richardson
2017-12-20 11:16   ` [dpdk-dev] [PATCH v2 2/2] meson: add tests app to build Harry van Haaren
2017-12-20 11:57     ` Laatz, Kevin
2017-12-20 12:00       ` Bruce Richardson
2017-12-20 12:20     ` Bruce Richardson
2017-12-20 12:22   ` [dpdk-dev] [PATCH v2 0/2] next-build: add test " Bruce Richardson

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=20171218154149.GA18012@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.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).