diff mbox

[PATCHv2,1/3] validation: pktio: add support for VPATH builds

Message ID 1426588316-13309-1-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 681336670799981137bc52813a9ee98ee4271c6b
Headers show

Commit Message

Stuart Haslam March 17, 2015, 10:31 a.m. UTC
Running "make check" in a VPATH build fails as the odp_pktio_run script
incorrectly assumes that the odp_pktio binary is in the same directory.
Resolve this by passing the path to the test binary to the script via
the TESTS_ENVIRONMENT variable.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 test/validation/Makefile.am   | 4 +++-
 test/validation/odp_pktio_run | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Maxim Uvarov March 19, 2015, 1:29 p.m. UTC | #1
Looks like that is good to go. Mike, Anders ok?

Maxim.

On 03/17/15 13:31, Stuart Haslam wrote:
> Running "make check" in a VPATH build fails as the odp_pktio_run script
> incorrectly assumes that the odp_pktio binary is in the same directory.
> Resolve this by passing the path to the test binary to the script via
> the TESTS_ENVIRONMENT variable.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> ---
>   test/validation/Makefile.am   | 4 +++-
>   test/validation/odp_pktio_run | 2 +-
>   2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
> index 0833181..e695e07 100644
> --- a/test/validation/Makefile.am
> +++ b/test/validation/Makefile.am
> @@ -3,7 +3,7 @@ include $(top_srcdir)/test/Makefile.inc
>   AM_CFLAGS += -I$(srcdir)/common
>   AM_LDFLAGS += -static
>   
> -TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
> +TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} TEST_DIR=${builddir}
>   
>   EXECUTABLES = odp_buffer \
>   	      odp_classification \
> @@ -31,6 +31,8 @@ if test_vald
>   TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
>   endif
>   
> +dist_bin_SCRIPTS = odp_pktio_run
> +
>   bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
>   
>   ODP_CU_COMMON=common/odp_cunit_common.c
> diff --git a/test/validation/odp_pktio_run b/test/validation/odp_pktio_run
> index 6177caa..856dfac 100755
> --- a/test/validation/odp_pktio_run
> +++ b/test/validation/odp_pktio_run
> @@ -27,7 +27,7 @@
>   # (repeat running test multiple times..)
>   # odp_pktio_run cleanup
>   #
> -TEST_DIR=$(dirname $0)
> +TEST_DIR="${TEST_DIR:-$(dirname $0)}"
>   IF0=pktio-p0
>   IF1=pktio-p1
>
Mike Holmes March 19, 2015, 2:46 p.m. UTC | #2
On 19 March 2015 at 09:29, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Looks like that is good to go. Mike, Anders ok?
>
> Maxim.
>
>
> On 03/17/15 13:31, Stuart Haslam wrote:
>
>> Running "make check" in a VPATH build fails as the odp_pktio_run script
>> incorrectly assumes that the odp_pktio binary is in the same directory.
>> Resolve this by passing the path to the test binary to the script via
>> the TESTS_ENVIRONMENT variable.
>>
>> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
>>
>
For the serise
Tested-by: Mike Holmes <mike.holmes@linaro.org>


> ---
>>   test/validation/Makefile.am   | 4 +++-
>>   test/validation/odp_pktio_run | 2 +-
>>   2 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
>> index 0833181..e695e07 100644
>> --- a/test/validation/Makefile.am
>> +++ b/test/validation/Makefile.am
>> @@ -3,7 +3,7 @@ include $(top_srcdir)/test/Makefile.inc
>>   AM_CFLAGS += -I$(srcdir)/common
>>   AM_LDFLAGS += -static
>>   -TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>> +TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} TEST_DIR=${builddir}
>>     EXECUTABLES = odp_buffer \
>>               odp_classification \
>> @@ -31,6 +31,8 @@ if test_vald
>>   TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
>>   endif
>>   +dist_bin_SCRIPTS = odp_pktio_run
>> +
>>   bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
>>     ODP_CU_COMMON=common/odp_cunit_common.c
>> diff --git a/test/validation/odp_pktio_run b/test/validation/odp_pktio_
>> run
>> index 6177caa..856dfac 100755
>> --- a/test/validation/odp_pktio_run
>> +++ b/test/validation/odp_pktio_run
>> @@ -27,7 +27,7 @@
>>   # (repeat running test multiple times..)
>>   # odp_pktio_run cleanup
>>   #
>> -TEST_DIR=$(dirname $0)
>> +TEST_DIR="${TEST_DIR:-$(dirname $0)}"
>>   IF0=pktio-p0
>>   IF1=pktio-p1
>>
>>
>
>
Maxim Uvarov March 20, 2015, 9:25 a.m. UTC | #3
Merged,
Maxim.

On 03/19/15 17:46, Mike Holmes wrote:
>
>
> On 19 March 2015 at 09:29, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     Looks like that is good to go. Mike, Anders ok?
>
>     Maxim.
>
>
>     On 03/17/15 13:31, Stuart Haslam wrote:
>
>         Running "make check" in a VPATH build fails as the
>         odp_pktio_run script
>         incorrectly assumes that the odp_pktio binary is in the same
>         directory.
>         Resolve this by passing the path to the test binary to the
>         script via
>         the TESTS_ENVIRONMENT variable.
>
>         Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org
>         <mailto:stuart.haslam@linaro.org>>
>
>
> For the serise
> Tested-by: Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>>
>
>         ---
>           test/validation/Makefile.am   | 4 +++-
>           test/validation/odp_pktio_run | 2 +-
>           2 files changed, 4 insertions(+), 2 deletions(-)
>
>         diff --git a/test/validation/Makefile.am
>         b/test/validation/Makefile.am
>         index 0833181..e695e07 100644
>         --- a/test/validation/Makefile.am
>         +++ b/test/validation/Makefile.am
>         @@ -3,7 +3,7 @@ include $(top_srcdir)/test/Makefile.inc
>           AM_CFLAGS += -I$(srcdir)/common
>           AM_LDFLAGS += -static
>           -TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>         +TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
>         TEST_DIR=${builddir}
>             EXECUTABLES = odp_buffer \
>                       odp_classification \
>         @@ -31,6 +31,8 @@ if test_vald
>           TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
>           endif
>           +dist_bin_SCRIPTS = odp_pktio_run
>         +
>           bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
>             ODP_CU_COMMON=common/odp_cunit_common.c
>         diff --git a/test/validation/odp_pktio_run
>         b/test/validation/odp_pktio_run
>         index 6177caa..856dfac 100755
>         --- a/test/validation/odp_pktio_run
>         +++ b/test/validation/odp_pktio_run
>         @@ -27,7 +27,7 @@
>           # (repeat running test multiple times..)
>           # odp_pktio_run cleanup
>           #
>         -TEST_DIR=$(dirname $0)
>         +TEST_DIR="${TEST_DIR:-$(dirname $0)}"
>           IF0=pktio-p0
>           IF1=pktio-p1
>
>
>
>
>
> -- 
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
>
diff mbox

Patch

diff --git a/test/validation/Makefile.am b/test/validation/Makefile.am
index 0833181..e695e07 100644
--- a/test/validation/Makefile.am
+++ b/test/validation/Makefile.am
@@ -3,7 +3,7 @@  include $(top_srcdir)/test/Makefile.inc
 AM_CFLAGS += -I$(srcdir)/common
 AM_LDFLAGS += -static
 
-TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform}
+TESTS_ENVIRONMENT = ODP_PLATFORM=${with_platform} TEST_DIR=${builddir}
 
 EXECUTABLES = odp_buffer \
 	      odp_classification \
@@ -31,6 +31,8 @@  if test_vald
 TESTS = $(EXECUTABLES) $(TESTSCRIPTS)
 endif
 
+dist_bin_SCRIPTS = odp_pktio_run
+
 bin_PROGRAMS = $(EXECUTABLES) $(COMPILE_ONLY)
 
 ODP_CU_COMMON=common/odp_cunit_common.c
diff --git a/test/validation/odp_pktio_run b/test/validation/odp_pktio_run
index 6177caa..856dfac 100755
--- a/test/validation/odp_pktio_run
+++ b/test/validation/odp_pktio_run
@@ -27,7 +27,7 @@ 
 # (repeat running test multiple times..)
 # odp_pktio_run cleanup
 #
-TEST_DIR=$(dirname $0)
+TEST_DIR="${TEST_DIR:-$(dirname $0)}"
 IF0=pktio-p0
 IF1=pktio-p1