-----Original Message----- > Date: Mon, 18 Dec 2017 15:24:22 +0000 > From: "Van Haaren, Harry" <[email protected]> > To: Jerin Jacob <[email protected]> > CC: "[email protected]" <[email protected]>, "Richardson, Bruce" > <[email protected]> > Subject: RE: [dpdk-dev] [PATCH 1/2] test: use env variable to run test if > set > > > From: Jerin Jacob [mailto:[email protected]] > > Sent: Monday, December 18, 2017 2:59 PM > > To: Van Haaren, Harry <[email protected]> > > Cc: [email protected]; Richardson, Bruce <[email protected]> > > 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 <[email protected]> > > > To: [email protected] > > > CC: [email protected], Harry van Haaren > > > <[email protected]> > > > 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.

