From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bruce.richardson@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id BC36C9E7
 for <dev@dpdk.org>; Tue, 14 Feb 2017 18:30:18 +0100 (CET)
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 Feb 2017 09:30:17 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.35,162,1484035200"; d="scan'208";a="1094707851"
Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23])
 by orsmga001.jf.intel.com with ESMTP; 14 Feb 2017 09:30:16 -0800
Received: from irsmsx103.ger.corp.intel.com ([169.254.3.77]) by
 IRSMSX109.ger.corp.intel.com ([169.254.13.44]) with mapi id 14.03.0248.002;
 Tue, 14 Feb 2017 17:30:14 +0000
From: "Richardson, Bruce" <bruce.richardson@intel.com>
To: "Yigit, Ferruh" <ferruh.yigit@intel.com>
CC: Thomas Monjalon <thomas.monjalon@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
Thread-Index: AQHShtT4Fs5/wL0tWUeP6qO4in6AKqFoo/aAgAAX8wCAAAVDgA==
Date: Tue, 14 Feb 2017 17:30:14 +0000
Message-ID: <59AF69C657FD0841A61C55336867B5B035B9815F@IRSMSX103.ger.corp.intel.com>
References: <20170214151326.7554-1-ferruh.yigit@intel.com>
 <20170214154131.GA20524@bricha3-MOBL3.ger.corp.intel.com>
 <8e969f23-6a65-553e-25ca-593c01c9fe8b@intel.com>
In-Reply-To: <8e969f23-6a65-553e-25ca-593c01c9fe8b@intel.com>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjZjNzIwOWYtOGJhYi00YzgxLTk3YTktMWE3NGQ4OWIyNjVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjIuMTEuMCIsIlRydXN0ZWRMYWJlbEhhc2giOiJXdGY0TlZXNVI3OElmTXFVUVFMWGFYSFVMMU13clBIVmYwRTk0Ujk4TkhBPSJ9
x-ctpclassification: CTP_IC
x-originating-ip: [163.33.239.181]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 14 Feb 2017 17:30:19 -0000



> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Tuesday, February 14, 2017 5:07 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>
> Cc: Thomas Monjalon <thomas.monjalon@6wind.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] [RFC 17.05] test: move tests to separate folder
>=20
> On 2/14/2017 3:41 PM, Bruce Richardson wrote:
> > 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@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...
>=20
> Perhaps I should send this as two patches, first separate the unit tests
> and second disable tests in default compilation.
>=20
> Your concern is about disabling test compilation by default.
>=20
> - If nobody interested in running test, why force them to compile. If
> people interested in unit tests, test will be compiled and issues will be
> resolved.
> Unit tests are for developers more than end users, and if developers are
> not using unit tests we may have another thing to focus.
>=20
> - This should be automated somehow, unit test should be build and run
> regularly and automatically. So we can see when it is broken.
>=20
Ok, makes sense.

Just to be awkward :-), one last question: Why separate building and runnin=
g
the tests? My suggestion would be to have "make test" both build and run th=
e
tests. If there is no work to do in building them, then the time cost of th=
e
extra empty build is negligible compared to the time taken to actually run
the tests. If we really want to build the tests without running them I'd
suggest "build_test" target instead. This keeps "make test" pretty much as
it was before.

/Bruce