diff mbox series

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

Message ID 20180709152117.21585-11-alex.bennee@linaro.org
State New
Headers show
Series various docker fixes | expand

Commit Message

Alex Bennée July 9, 2018, 3:21 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.

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

---
 tests/docker/Makefile.include | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.17.1

Comments

Philippe Mathieu-Daudé July 10, 2018, 8:49 p.m. UTC | #1
On 07/09/2018 12:21 PM, 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.

> 

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

> ---

>  tests/docker/Makefile.include | 2 ++

>  1 file changed, 2 insertions(+)

> 

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

> index fe63aacf69..765b2c36f2 100644

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

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

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

>  	) \

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

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

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

>  	) \

>  )

>  

> @@ -162,6 +163,7 @@ docker:

>  	@echo

>  	@echo '    docker:              Print this help.'

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


Can we rename "docker-test" -> "docker-tests" or is it too late?

> +	@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 10, 2018, 9:04 p.m. UTC | #2
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:

> On 07/09/2018 12:21 PM, 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.

>>

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

>> ---

>>  tests/docker/Makefile.include | 2 ++

>>  1 file changed, 2 insertions(+)

>>

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

>> index fe63aacf69..765b2c36f2 100644

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

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

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

>>  	) \

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

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

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

>>  	) \

>>  )

>>

>> @@ -162,6 +163,7 @@ docker:

>>  	@echo

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

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

>

> Can we rename "docker-test" -> "docker-tests" or is it too late?


Probably, I don't know how many people were actively using it. Fam?

>

>> +	@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
Fam Zheng July 11, 2018, 1:31 a.m. UTC | #3
On Tue, 07/10 22:04, Alex Bennée wrote:
> 

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

> 

> > On 07/09/2018 12:21 PM, 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.

> >>

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

> >> ---

> >>  tests/docker/Makefile.include | 2 ++

> >>  1 file changed, 2 insertions(+)

> >>

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

> >> index fe63aacf69..765b2c36f2 100644

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

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

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

> >>  	) \

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

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

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

> >>  	) \

> >>  )

> >>

> >> @@ -162,6 +163,7 @@ docker:

> >>  	@echo

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

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

> >

> > Can we rename "docker-test" -> "docker-tests" or is it too late?

> 

> Probably, I don't know how many people were actively using it. Fam?


I don't know either. Maybe because I'm not native English speaker, but why
bother? "Docker test" sounds like a generic "cover all" test, whereas "docker
tests" sounds like a set of many independent tests based on Docker. Both make
sense to me, though I agree the latter describes it better.

On the other hand, maybe we should create a selection instead of "all
combinations" and call it docker-test, to make it a bit more useful. Then we can
rename the current docker-test to "docker-all" or "docker-test-all".

Fam

> 

> >

> >> +	@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
Alex Bennée July 12, 2018, 8:41 a.m. UTC | #4
Fam Zheng <famz@redhat.com> writes:

> On Tue, 07/10 22:04, Alex Bennée wrote:

>>

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

>>

>> > On 07/09/2018 12:21 PM, 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.

>> >>

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

>> >> ---

>> >>  tests/docker/Makefile.include | 2 ++

>> >>  1 file changed, 2 insertions(+)

>> >>

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

>> >> index fe63aacf69..765b2c36f2 100644

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

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

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

>> >>  	) \

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

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

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

>> >>  	) \

>> >>  )

>> >>

>> >> @@ -162,6 +163,7 @@ docker:

>> >>  	@echo

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

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

>> >

>> > Can we rename "docker-test" -> "docker-tests" or is it too late?

>>

>> Probably, I don't know how many people were actively using it. Fam?

>

> I don't know either. Maybe because I'm not native English speaker, but why

> bother? "Docker test" sounds like a generic "cover all" test, whereas "docker

> tests" sounds like a set of many independent tests based on Docker. Both make

> sense to me, though I agree the latter describes it better.

>

> On the other hand, maybe we should create a selection instead of "all

> combinations" and call it docker-test, to make it a bit more useful.


Well allowing the individual docket-test-FOO expansion is a halfway
house to that.

> Then we can

> rename the current docker-test to "docker-all" or "docker-test-all".


docker-all-tests might be better in case we ever create and test-all
test script...

>

> Fam

>

>>

>> >

>> >> +	@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



--
Alex Bennée
diff mbox series

Patch

diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index fe63aacf69..765b2c36f2 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -152,6 +152,7 @@  $(foreach i,$(filter-out $(DOCKER_PARTIAL_IMAGES),$(DOCKER_IMAGES) $(DOCKER_DEPR
 	) \
 	$(foreach t,$(DOCKER_TESTS), \
 		$(eval docker-test: docker-$t@$i) \
+		$(eval docker-$t: docker-$t@$i) \
 	) \
 )
 
@@ -162,6 +163,7 @@  docker:
 	@echo
 	@echo '    docker:              Print this help.'
 	@echo '    docker-test:         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,'