diff mbox

[PATCHv2] simple compile all tests in ./test dir

Message ID 1400498140-8341-1-git-send-email-maxim.uvarov@linaro.org
State Accepted
Headers show

Commit Message

Maxim Uvarov May 19, 2014, 11:15 a.m. UTC
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 v2: break if compilation of submakefile fails.


 test/Makefile | 30 ++++++++----------------------
 1 file changed, 8 insertions(+), 22 deletions(-)

Comments

Anders Roxell May 20, 2014, 11:10 a.m. UTC | #1
On 2014-05-19 15:15, Maxim Uvarov wrote:
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

Reviewed-by: Anders Roxell <anders.roxell@linaro.org>

> ---
>  v2: break if compilation of submakefile fails.
> 
> 
>  test/Makefile | 30 ++++++++----------------------
>  1 file changed, 8 insertions(+), 22 deletions(-)
> 
> diff --git a/test/Makefile b/test/Makefile
> index cc3f4e9..500fd13 100644
> --- a/test/Makefile
> +++ b/test/Makefile
> @@ -3,29 +3,15 @@
>  #
>  # SPDX-License-Identifier:	BSD-3-Clause
>  
> -.PHONY: all
> -all:
> -	 $(MAKE) -C api_test
> -	 $(MAKE) -C example
> -	 $(MAKE) -C packet
> -	 $(MAKE) -C packet_netmap
> -	 $(MAKE) -C timer
> -	 $(MAKE) -C generator
> +TESTS=$(filter %, $(wildcard */))
> +
> +.PHONY: all clean install
> +
> +all: $(TESTS)
> +	for T in $(TESTS); do $(MAKE) -C $$T || exit 1; done
>  
> -.PHONY: clean
>  clean:
> -	 $(MAKE) -C api_test clean
> -	 $(MAKE) -C example clean
> -	 $(MAKE) -C packet clean
> -	 $(MAKE) -C packet_netmap clean
> -	 $(MAKE) -C timer clean
> -	 $(MAKE) -C generator clean
> +	for T in $(TESTS); do $(MAKE) -C $$T clean || true; done
>  
> -.PHONY: install
>  install:
> -	 $(MAKE) -C api_test install
> -	 $(MAKE) -C example install
> -	 $(MAKE) -C packet install
> -	 $(MAKE) -C packet_netmap install
> -	 $(MAKE) -C timer install
> -	 $(MAKE) -C generator install
> +	for T in $(TESTS); do $(MAKE) -C $$T install ||exit 1; done
> -- 
> 1.8.5.1.163.gd7aced9
> 
> 
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Maxim Uvarov May 21, 2014, 10:40 a.m. UTC | #2
Applied!

Maxim.

On 05/20/2014 03:10 PM, Anders Roxell wrote:
> On 2014-05-19 15:15, Maxim Uvarov wrote:
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> Reviewed-by: Anders Roxell <anders.roxell@linaro.org>
>
>> ---
>>   v2: break if compilation of submakefile fails.
>>
>>
>>   test/Makefile | 30 ++++++++----------------------
>>   1 file changed, 8 insertions(+), 22 deletions(-)
>>
>> diff --git a/test/Makefile b/test/Makefile
>> index cc3f4e9..500fd13 100644
>> --- a/test/Makefile
>> +++ b/test/Makefile
>> @@ -3,29 +3,15 @@
>>   #
>>   # SPDX-License-Identifier:	BSD-3-Clause
>>   
>> -.PHONY: all
>> -all:
>> -	 $(MAKE) -C api_test
>> -	 $(MAKE) -C example
>> -	 $(MAKE) -C packet
>> -	 $(MAKE) -C packet_netmap
>> -	 $(MAKE) -C timer
>> -	 $(MAKE) -C generator
>> +TESTS=$(filter %, $(wildcard */))
>> +
>> +.PHONY: all clean install
>> +
>> +all: $(TESTS)
>> +	for T in $(TESTS); do $(MAKE) -C $$T || exit 1; done
>>   
>> -.PHONY: clean
>>   clean:
>> -	 $(MAKE) -C api_test clean
>> -	 $(MAKE) -C example clean
>> -	 $(MAKE) -C packet clean
>> -	 $(MAKE) -C packet_netmap clean
>> -	 $(MAKE) -C timer clean
>> -	 $(MAKE) -C generator clean
>> +	for T in $(TESTS); do $(MAKE) -C $$T clean || true; done
>>   
>> -.PHONY: install
>>   install:
>> -	 $(MAKE) -C api_test install
>> -	 $(MAKE) -C example install
>> -	 $(MAKE) -C packet install
>> -	 $(MAKE) -C packet_netmap install
>> -	 $(MAKE) -C timer install
>> -	 $(MAKE) -C generator install
>> +	for T in $(TESTS); do $(MAKE) -C $$T install ||exit 1; done
>> -- 
>> 1.8.5.1.163.gd7aced9
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/Makefile b/test/Makefile
index cc3f4e9..500fd13 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -3,29 +3,15 @@ 
 #
 # SPDX-License-Identifier:	BSD-3-Clause
 
-.PHONY: all
-all:
-	 $(MAKE) -C api_test
-	 $(MAKE) -C example
-	 $(MAKE) -C packet
-	 $(MAKE) -C packet_netmap
-	 $(MAKE) -C timer
-	 $(MAKE) -C generator
+TESTS=$(filter %, $(wildcard */))
+
+.PHONY: all clean install
+
+all: $(TESTS)
+	for T in $(TESTS); do $(MAKE) -C $$T || exit 1; done
 
-.PHONY: clean
 clean:
-	 $(MAKE) -C api_test clean
-	 $(MAKE) -C example clean
-	 $(MAKE) -C packet clean
-	 $(MAKE) -C packet_netmap clean
-	 $(MAKE) -C timer clean
-	 $(MAKE) -C generator clean
+	for T in $(TESTS); do $(MAKE) -C $$T clean || true; done
 
-.PHONY: install
 install:
-	 $(MAKE) -C api_test install
-	 $(MAKE) -C example install
-	 $(MAKE) -C packet install
-	 $(MAKE) -C packet_netmap install
-	 $(MAKE) -C timer install
-	 $(MAKE) -C generator install
+	for T in $(TESTS); do $(MAKE) -C $$T install ||exit 1; done