diff mbox

[3/3] performance: scheduling: add support for VPATH builds

Message ID 1426506527-8228-3-git-send-email-stuart.haslam@linaro.org
State Accepted
Commit 0c50f6bff0a238e4bc5ceac61cd431f4875443aa
Headers show

Commit Message

Stuart Haslam March 16, 2015, 11:48 a.m. UTC
Pass the test executable path to the test script to avoid the assumption
that they're both in the same directory.

Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
---
 test/performance/Makefile.am        | 2 ++
 test/performance/odp_scheduling_run | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Maxim Uvarov March 16, 2015, 11:54 a.m. UTC | #1
I would merge patches 2 and 3 if they modify the same lines.

Maxim.

On 03/16/15 14:48, Stuart Haslam wrote:
> Pass the test executable path to the test script to avoid the assumption
> that they're both in the same directory.
>
> Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org>
> ---
>   test/performance/Makefile.am        | 2 ++
>   test/performance/odp_scheduling_run | 3 ++-
>   2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
> index 3be3721..54cf529 100644
> --- a/test/performance/Makefile.am
> +++ b/test/performance/Makefile.am
> @@ -1,5 +1,7 @@
>   include $(top_srcdir)/test/Makefile.inc
>   
> +TESTS_ENVIRONMENT = TEST_DIR=${builddir}
> +
>   EXECUTABLES =
>   
>   COMPILE_ONLY = odp_scheduling
> diff --git a/test/performance/odp_scheduling_run b/test/performance/odp_scheduling_run
> index 738963e..b64a79d 100755
> --- a/test/performance/odp_scheduling_run
> +++ b/test/performance/odp_scheduling_run
> @@ -3,6 +3,7 @@
>   # Script that passes command line arguments to odp_scheduling test when
>   # launched by 'make check'
>   
> +TEST_DIR="${TEST_DIR:-$(dirname $0)}"
>   ret=0
>   
>   run()
> @@ -10,7 +11,7 @@ run()
>   	echo odp_scheduling_run starts with $1 worker threads
>   	echo ===============================================
>   
> -	./odp_schedling -c $1 || ret=1
> +	$TEST_DIR/odp_scheduling -c $1 || ret=1
>   }
>   
>   run 1
Stuart Haslam March 16, 2015, 12:01 p.m. UTC | #2
On Mon, Mar 16, 2015 at 02:54:29PM +0300, Maxim Uvarov wrote:
> I would merge patches 2 and 3 if they modify the same lines.
> 
> Maxim.
> 

But they are doing different things, if I were to merge the patches the
description would need to explain both sets of changes and the log would
be less clear. Also patch 2 could be taken independently of patch 3
(e.g. if someone objects to the VPATH related changes).

--
Stuart.
diff mbox

Patch

diff --git a/test/performance/Makefile.am b/test/performance/Makefile.am
index 3be3721..54cf529 100644
--- a/test/performance/Makefile.am
+++ b/test/performance/Makefile.am
@@ -1,5 +1,7 @@ 
 include $(top_srcdir)/test/Makefile.inc
 
+TESTS_ENVIRONMENT = TEST_DIR=${builddir}
+
 EXECUTABLES =
 
 COMPILE_ONLY = odp_scheduling
diff --git a/test/performance/odp_scheduling_run b/test/performance/odp_scheduling_run
index 738963e..b64a79d 100755
--- a/test/performance/odp_scheduling_run
+++ b/test/performance/odp_scheduling_run
@@ -3,6 +3,7 @@ 
 # Script that passes command line arguments to odp_scheduling test when
 # launched by 'make check'
 
+TEST_DIR="${TEST_DIR:-$(dirname $0)}"
 ret=0
 
 run()
@@ -10,7 +11,7 @@  run()
 	echo odp_scheduling_run starts with $1 worker threads
 	echo ===============================================
 
-	./odp_schedling -c $1 || ret=1
+	$TEST_DIR/odp_scheduling -c $1 || ret=1
 }
 
 run 1