diff mbox series

[v2,for,3.0,11/16] docker: add expansion for docker-test-FOO to Makefile.include

Message ID 20180713121741.19262-12-alex.bennee@linaro.org
State Superseded
Headers show
Series various docker fixes | expand

Commit Message

Alex Bennée July 13, 2018, 12:17 p.m. UTC
This allows us to run a particular test on all docker images. For
example:

  make docker-test-unit

Will run the unit tests on every supported image. At the same time
rename docker-test to docker-all-tests to be clearer.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


---
v2
  - docker-test -> docker-all-tests
---
 tests/docker/Makefile.include | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.17.1

Comments

Philippe Mathieu-Daudé July 16, 2018, 1:42 a.m. UTC | #1
Hi Alex,

On 07/13/2018 09:17 AM, Alex Bennée wrote:
> This allows us to run a particular test on all docker images. For

> example:

> 

>   make docker-test-unit

> 

> Will run the unit tests on every supported image. At the same time

> rename docker-test to docker-all-tests to be clearer.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

> 

> ---

> v2

>   - docker-test -> docker-all-tests

> ---

>  tests/docker/Makefile.include | 6 ++++--

>  1 file changed, 4 insertions(+), 2 deletions(-)

> 

> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include

> index fe63aacf69..e32c35be0d 100644

> --- a/tests/docker/Makefile.include

> +++ b/tests/docker/Makefile.include

> @@ -151,7 +151,8 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR

>  		$(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \

>  	) \

>  	$(foreach t,$(DOCKER_TESTS), \

> -		$(eval docker-test: docker-$t@$i) \

> +		$(eval docker-all-tests: docker-$t@$i) \

> +		$(eval docker-$t: docker-$t@$i) \


Is this supposed to work this way?

$ make docker-test-quick@debian-alpha-cross
make: *** No rule to make target 'docker-test-quick@debian-alpha-cross'.
 Stop.

>  	) \

>  )

>  

> @@ -161,7 +162,8 @@ docker:

>  	@echo 'Available targets:'

>  	@echo

>  	@echo '    docker:              Print this help.'

> -	@echo '    docker-test:         Run all image/test combinations.'

> +	@echo '    docker-all-tests:    Run all image/test combinations.'

> +	@echo '    docker-TEST:         Run TEST on all image combinations.'

>  	@echo '    docker-clean:        Kill and remove residual docker testing containers.'

>  	@echo '    docker-TEST@IMAGE:   Run "TEST" in container "IMAGE".'

>  	@echo '                         Note: "TEST" is one of the listed test name,'

>
Alex Bennée July 16, 2018, 9:07 a.m. UTC | #2
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> Hi Alex,

>

> On 07/13/2018 09:17 AM, Alex Bennée wrote:

>> This allows us to run a particular test on all docker images. For

>> example:

>>

>>   make docker-test-unit

>>

>> Will run the unit tests on every supported image. At the same time

>> rename docker-test to docker-all-tests to be clearer.

>>

>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>>

>> ---

>> v2

>>   - docker-test -> docker-all-tests

>> ---

>>  tests/docker/Makefile.include | 6 ++++--

>>  1 file changed, 4 insertions(+), 2 deletions(-)

>>

>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include

>> index fe63aacf69..e32c35be0d 100644

>> --- a/tests/docker/Makefile.include

>> +++ b/tests/docker/Makefile.include

>> @@ -151,7 +151,8 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR

>>  		$(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \

>>  	) \

>>  	$(foreach t,$(DOCKER_TESTS), \

>> -		$(eval docker-test: docker-$t@$i) \

>> +		$(eval docker-all-tests: docker-$t@$i) \

>> +		$(eval docker-$t: docker-$t@$i) \

>

> Is this supposed to work this way?

>

> $ make docker-test-quick@debian-alpha-cross

> make: *** No rule to make target

> 'docker-test-quick@debian-alpha-cross'.


No

  make docker-test-quick

will make the test-quick on all images.

Your example fails because debian-alpha-cross is a PARTIAL image, good
for building test cases but not QEMU so it's not expanded in the above
bit: $(eval docker-$t@$i: docker-image-$i docker-run-$t@$i)

>  Stop.

>

>>  	) \

>>  )

>>

>> @@ -161,7 +162,8 @@ docker:

>>  	@echo 'Available targets:'

>>  	@echo

>>  	@echo '    docker:              Print this help.'

>> -	@echo '    docker-test:         Run all image/test combinations.'

>> +	@echo '    docker-all-tests:    Run all image/test combinations.'

>> +	@echo '    docker-TEST:         Run TEST on all image combinations.'

>>  	@echo '    docker-clean:        Kill and remove residual docker testing containers.'

>>  	@echo '    docker-TEST@IMAGE:   Run "TEST" in container "IMAGE".'

>>  	@echo '                         Note: "TEST" is one of the listed test name,'

>>



--
Alex Bennée
Philippe Mathieu-Daudé July 17, 2018, 3:03 p.m. UTC | #3
On 07/16/2018 06:07 AM, Alex Bennée wrote:
> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> 

>> Hi Alex,

>>

>> On 07/13/2018 09:17 AM, Alex Bennée wrote:

>>> This allows us to run a particular test on all docker images. For

>>> example:

>>>

>>>   make docker-test-unit

>>>

>>> Will run the unit tests on every supported image. At the same time

>>> rename docker-test to docker-all-tests to be clearer.

>>>

>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

>>>

>>> ---

>>> v2

>>>   - docker-test -> docker-all-tests

>>> ---

>>>  tests/docker/Makefile.include | 6 ++++--

>>>  1 file changed, 4 insertions(+), 2 deletions(-)

>>>

>>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include

>>> index fe63aacf69..e32c35be0d 100644

>>> --- a/tests/docker/Makefile.include

>>> +++ b/tests/docker/Makefile.include

>>> @@ -151,7 +151,8 @@ $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR

>>>  		$(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \

>>>  	) \

>>>  	$(foreach t,$(DOCKER_TESTS), \

>>> -		$(eval docker-test: docker-$t@$i) \

>>> +		$(eval docker-all-tests: docker-$t@$i) \

>>> +		$(eval docker-$t: docker-$t@$i) \

>>

>> Is this supposed to work this way?

>>

>> $ make docker-test-quick@debian-alpha-cross

>> make: *** No rule to make target

>> 'docker-test-quick@debian-alpha-cross'.

> 

> No

> 

>   make docker-test-quick

> 

> will make the test-quick on all images.

> 

> Your example fails because debian-alpha-cross is a PARTIAL image, good

> for building test cases but not QEMU so it's not expanded in the above

> bit: $(eval docker-$t@$i: docker-image-$i docker-run-$t@$i)


I noticed too late ;)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


> 

>>  Stop.

>>

>>>  	) \

>>>  )

>>>

>>> @@ -161,7 +162,8 @@ docker:

>>>  	@echo 'Available targets:'

>>>  	@echo

>>>  	@echo '    docker:              Print this help.'

>>> -	@echo '    docker-test:         Run all image/test combinations.'

>>> +	@echo '    docker-all-tests:    Run all image/test combinations.'

>>> +	@echo '    docker-TEST:         Run TEST on all image combinations.'

>>>  	@echo '    docker-clean:        Kill and remove residual docker testing containers.'

>>>  	@echo '    docker-TEST@IMAGE:   Run "TEST" in container "IMAGE".'

>>>  	@echo '                         Note: "TEST" is one of the listed test name,'

>>>

> 

> 

> --

> Alex Bennée

>
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index fe63aacf69..e32c35be0d 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -151,7 +151,8 @@  $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR
 		$(eval docker-$t@$i: docker-image-$i docker-run-$t@$i) \
 	) \
 	$(foreach t,$(DOCKER_TESTS), \
-		$(eval docker-test: docker-$t@$i) \
+		$(eval docker-all-tests: docker-$t@$i) \
+		$(eval docker-$t: docker-$t@$i) \
 	) \
 )
 
@@ -161,7 +162,8 @@  docker:
 	@echo 'Available targets:'
 	@echo
 	@echo '    docker:              Print this help.'
-	@echo '    docker-test:         Run all image/test combinations.'
+	@echo '    docker-all-tests:    Run all image/test combinations.'
+	@echo '    docker-TEST:         Run TEST on all image combinations.'
 	@echo '    docker-clean:        Kill and remove residual docker testing containers.'
 	@echo '    docker-TEST@IMAGE:   Run "TEST" in container "IMAGE".'
 	@echo '                         Note: "TEST" is one of the listed test name,'