Message ID | 1470202928-3392-1-git-send-email-famz@redhat.com |
---|---|
State | New |
Headers | show |
On Wed, 08/03 13:42, Fam Zheng wrote: > By not using "--format" with docker images command. > > The option is not available on RHEL 7 docker command. Use an awk > matching command instead. > > Reported-by: Paolo Bonzini <pbonzini@redhat.com> > Signed-off-by: Fam Zheng <famz@redhat.com> > --- > tests/docker/Makefile.include | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index 78af468..4f4707d 100644 > --- a/tests/docker/Makefile.include > +++ b/tests/docker/Makefile.include > @@ -107,9 +107,8 @@ docker-run-%: docker-qemu-src > fi > $(if $(filter $(TESTS),$(CMD)),$(if $(filter $(IMAGES),$(IMAGE)), \ > $(call quiet-command,\ > - if $(SRC_PATH)/tests/docker/docker.py images \ > - --format={{.Repository}}:{{.Tag}} | \ > - grep -qx qemu:$(IMAGE); then \ > + if $(SRC_PATH)/tests/docker/docker.py images | \ > + awk '$$1=="qemu" && $$2=="$(IMAGE)"{found=1} END{exit(!found)}'; then \ > $(SRC_PATH)/tests/docker/docker.py run $(if $V,,--rm) \ > -t \ > $(if $(DEBUG),-i,--net=none) \ > -- > 2.7.4 > > Paolo, does this work for you? Fam
On 04/08/2016 04:33, Fam Zheng wrote: > On Wed, 08/03 13:42, Fam Zheng wrote: >> By not using "--format" with docker images command. >> >> The option is not available on RHEL 7 docker command. Use an awk >> matching command instead. >> >> Reported-by: Paolo Bonzini <pbonzini@redhat.com> >> Signed-off-by: Fam Zheng <famz@redhat.com> >> --- >> tests/docker/Makefile.include | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) > > Paolo, does this work for you? Yes, it works. Thanks! Paolo
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index 78af468..4f4707d 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -107,9 +107,8 @@ docker-run-%: docker-qemu-src fi $(if $(filter $(TESTS),$(CMD)),$(if $(filter $(IMAGES),$(IMAGE)), \ $(call quiet-command,\ - if $(SRC_PATH)/tests/docker/docker.py images \ - --format={{.Repository}}:{{.Tag}} | \ - grep -qx qemu:$(IMAGE); then \ + if $(SRC_PATH)/tests/docker/docker.py images | \ + awk '$$1=="qemu" && $$2=="$(IMAGE)"{found=1} END{exit(!found)}'; then \ $(SRC_PATH)/tests/docker/docker.py run $(if $V,,--rm) \ -t \ $(if $(DEBUG),-i,--net=none) \
By not using "--format" with docker images command. The option is not available on RHEL 7 docker command. Use an awk matching command instead. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Fam Zheng <famz@redhat.com> --- tests/docker/Makefile.include | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)