[dpdk-dev,v2,4/4] devtools: add autotest app to build script

Message ID 20170329163856.10932-5-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Bruce Richardson March 29, 2017, 4:38 p.m. UTC
  Since the test app is no longer being build by default as part of a build,
we need to update the testbuild script to take account of this.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
V2: added in test-build as a new build action, since it skips the testpmd
  build when run.
---
 devtools/test-build.sh | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Doherty, Declan March 30, 2017, 7:47 a.m. UTC | #1
On 29/03/2017 5:38 PM, Bruce Richardson wrote:
> Since the test app is no longer being build by default as part of a build,
> we need to update the testbuild script to take account of this.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> V2: added in test-build as a new build action, since it skips the testpmd
>   build when run.
> ---
>  devtools/test-build.sh | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/devtools/test-build.sh b/devtools/test-build.sh
> index a38ffab..cc8f8dc 100755
> --- a/devtools/test-build.sh
> +++ b/devtools/test-build.sh
> @@ -229,6 +229,9 @@ for conf in $configs ; do
>  	echo "================== Build $dir"
>  	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
>  		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> +	echo "================== Build tests for $dir"
> +	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> +		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
>  	! $short || break
>  	echo "================== Build examples for $dir"
>  	export RTE_SDK=$(pwd)
>

Acked-by: Declan Doherty <declan.doherty@intel.com>
  
Thomas Monjalon March 30, 2017, 2:36 p.m. UTC | #2
2017-03-29 17:38, Bruce Richardson:
> Since the test app is no longer being build by default as part of a build,
> we need to update the testbuild script to take account of this.
[...]
> --- a/devtools/test-build.sh
> +++ b/devtools/test-build.sh
> @@ -229,6 +229,9 @@ for conf in $configs ; do
>  	echo "================== Build $dir"
>  	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
>  		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> +	echo "================== Build tests for $dir"
> +	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> +		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
>  	! $short || break
>  	echo "================== Build examples for $dir"
>  	export RTE_SDK=$(pwd)

It should be added after the "short break".

The test-build target rebuild all.
I think it should be standard apps like the examples
and not re-link the libs before building.
The other way is to merge it with the above command (default build).
  
Bruce Richardson March 30, 2017, 3:33 p.m. UTC | #3
On Thu, Mar 30, 2017 at 04:36:11PM +0200, Thomas Monjalon wrote:
> 2017-03-29 17:38, Bruce Richardson:
> > Since the test app is no longer being build by default as part of a build,
> > we need to update the testbuild script to take account of this.
> [...]
> > --- a/devtools/test-build.sh
> > +++ b/devtools/test-build.sh
> > @@ -229,6 +229,9 @@ for conf in $configs ; do
> >  	echo "================== Build $dir"
> >  	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> >  		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> > +	echo "================== Build tests for $dir"
> > +	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> > +		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> >  	! $short || break
> >  	echo "================== Build examples for $dir"
> >  	export RTE_SDK=$(pwd)
> 
> It should be added after the "short break".
> 
You have no idea how many times in preparing the patchset I moved the
addition above the break, and then back below it, and above it again!
You pick what you think is best. :-)

> The test-build target rebuild all.
It rebuilds the libs, but not the apps, which is why we can't just
use test-build target, or we will skip testpmd.

> I think it should be standard apps like the examples
> and not re-link the libs before building.
> The other way is to merge it with the above command (default build).

I tried merging the two into a single command, i.e. "make all
test-build" but that failed with parallel builds because the two jobs
try and build some things at the same time and interfere with each
other. [The kernel drivers seemed to be the main problem]

/Bruce
  
Thomas Monjalon March 30, 2017, 8:42 p.m. UTC | #4
For info, Ferruh did a similar patch:
	http://dpdk.org/patch/22443
Ferruh, OK to keep Bruce one?

2017-03-30 16:33, Bruce Richardson:
> On Thu, Mar 30, 2017 at 04:36:11PM +0200, Thomas Monjalon wrote:
> > 2017-03-29 17:38, Bruce Richardson:
> > > Since the test app is no longer being build by default as part of a build,
> > > we need to update the testbuild script to take account of this.
> > [...]
> > > --- a/devtools/test-build.sh
> > > +++ b/devtools/test-build.sh
> > > @@ -229,6 +229,9 @@ for conf in $configs ; do
> > >  	echo "================== Build $dir"
> > >  	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> > >  		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> > > +	echo "================== Build tests for $dir"
> > > +	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
> > > +		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
> > >  	! $short || break
> > >  	echo "================== Build examples for $dir"
> > >  	export RTE_SDK=$(pwd)
> > 
> > It should be added after the "short break".
> > 
> You have no idea how many times in preparing the patchset I moved the
> addition above the break, and then back below it, and above it again!
> You pick what you think is best. :-)
> 
> > The test-build target rebuild all.
> It rebuilds the libs, but not the apps, which is why we can't just
> use test-build target, or we will skip testpmd.
> 
> > I think it should be standard apps like the examples
> > and not re-link the libs before building.
> > The other way is to merge it with the above command (default build).
> 
> I tried merging the two into a single command, i.e. "make all
> test-build" but that failed with parallel builds because the two jobs
> try and build some things at the same time and interfere with each
> other. [The kernel drivers seemed to be the main problem]
> 
> /Bruce
  
Ferruh Yigit April 4, 2017, 1:03 p.m. UTC | #5
On 3/30/2017 9:42 PM, Thomas Monjalon wrote:
> For info, Ferruh did a similar patch:
> 	http://dpdk.org/patch/22443
> Ferruh, OK to keep Bruce one?

Sure, go for it, they both do same thing.

> 
> 2017-03-30 16:33, Bruce Richardson:
>> On Thu, Mar 30, 2017 at 04:36:11PM +0200, Thomas Monjalon wrote:
>>> 2017-03-29 17:38, Bruce Richardson:
>>>> Since the test app is no longer being build by default as part of a build,
>>>> we need to update the testbuild script to take account of this.
>>> [...]
>>>> --- a/devtools/test-build.sh
>>>> +++ b/devtools/test-build.sh
>>>> @@ -229,6 +229,9 @@ for conf in $configs ; do
>>>>  	echo "================== Build $dir"
>>>>  	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
>>>>  		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
>>>> +	echo "================== Build tests for $dir"
>>>> +	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
>>>> +		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
>>>>  	! $short || break
>>>>  	echo "================== Build examples for $dir"
>>>>  	export RTE_SDK=$(pwd)
>>>
>>> It should be added after the "short break".
>>>
>> You have no idea how many times in preparing the patchset I moved the
>> addition above the break, and then back below it, and above it again!
>> You pick what you think is best. :-)
>>
>>> The test-build target rebuild all.
>> It rebuilds the libs, but not the apps, which is why we can't just
>> use test-build target, or we will skip testpmd.
>>
>>> I think it should be standard apps like the examples
>>> and not re-link the libs before building.
>>> The other way is to merge it with the above command (default build).
>>
>> I tried merging the two into a single command, i.e. "make all
>> test-build" but that failed with parallel builds because the two jobs
>> try and build some things at the same time and interfere with each
>> other. [The kernel drivers seemed to be the main problem]
>>
>> /Bruce
> 
>
  

Patch

diff --git a/devtools/test-build.sh b/devtools/test-build.sh
index a38ffab..cc8f8dc 100755
--- a/devtools/test-build.sh
+++ b/devtools/test-build.sh
@@ -229,6 +229,9 @@  for conf in $configs ; do
 	echo "================== Build $dir"
 	make -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
 		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
+	echo "================== Build tests for $dir"
+	make test-build -j$J EXTRA_CFLAGS="$maxerr $DPDK_DEP_CFLAGS" \
+		EXTRA_LDFLAGS="$DPDK_DEP_LDFLAGS" $verbose O=$dir
 	! $short || break
 	echo "================== Build examples for $dir"
 	export RTE_SDK=$(pwd)