[dpdk-dev] [RFC 17.05] test: move tests to separate folder

Mcnamara, John john.mcnamara at intel.com
Tue Feb 14 17:12:51 CET 2017



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson
> Sent: Tuesday, February 14, 2017 3:42 PM
> To: Yigit, Ferruh <ferruh.yigit at intel.com>
> Cc: Thomas Monjalon <thomas.monjalon at 6wind.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
> 
> On Tue, Feb 14, 2017 at 03:13:26PM +0000, Ferruh Yigit wrote:
> > Tests are part of app folder and compiled with library every time.
> > Moving tests into a "test" folder which won't be compiled by default.
> > To compile tests, need to give explicit "make test" command.
> >
> > "make test" was previously used to run tests, which renamed to "make
> > test_run" with this patch.
> >
> > This makes default compilation ~30% faster,
> > [clang, make -j8, old]: real    1m04.355s
> > [clang, make -j8, new]: real    0m41.740s
> >
> > For new case, test needs to built separately, which takes,
> > [clang, make -j8 test]: real    0m24.293s
> >
> > The point is tests are not required always and by every one.
> >
> > Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
> > ---
> 
> Hi Ferruh,
> 
> I'm not sure I'm convinced by this, as I think there are advantages to
> having the test code always compiled. Anything that is not compiled in
> DPDK by default is more likely to be broken by patch submissions. The
> speed boost to build is nice, but I'm not sure it's worth it.
> However, I'm open to being convinced otherwise on this...

Hi,

In general, I am in favour of separating the main compilation from
the compilation of the tests. Usually unit test code doesn't get
compiled until you run "make test". Also, having the "test" code
in the "app" dir is a little odd.


> Anything that is not compiled in
> DPDK by default is more likely to be broken by patch submissions.

It is probably more important that the user runs the tests than just
compiles them. :-) As a side effect of running the tests they will
also compile them.

As a side issue I think that we should improve the ease of running and
extending the test suite. YMMV but I have always found the test suite hard
to run with 100% passing tests.

So I think this is a good first step to separate out unit testing from the
rest of the code.

John


More information about the dev mailing list