Skip to contentSkip to conversation

docker: Don't allocate tty unless DEBUG=1

PATCH In review Fam Zheng 2 participants 3 messages Oct 13, 2017

lore
Share & tools
lore

Fam Zheng

author
#0 lore raw

PATCH 1/1 docker: Don't allocate tty unless DEBUG=1

The existence of tty in the container seems to urge gcc into colorize the output, but the escape chars will clutter the report once turned into email replies on patchew. Move -t to debug mode.

---
 tests/docker/Makefile.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/Makefile.include +2 -2
index 6f9ea196a7..ab939f2bec 100644
@@ -134,10 +134,10 @@ docker-run: docker-qemu-src
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\
 		$(SRC_PATH)/tests/docker/docker.py run 			\
-			$(if $(NOUSER),,-u $(shell id -u)) -t 		\
+			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
-			$(if $(DEBUG),-i,)				\
+			$(if $(DEBUG),-ti,)				\
 			$(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
 			-e TARGET_LIST=$(TARGET_LIST) 			\
 			-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
Signature · 1 line
2.13.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Fam Zheng

The existence of tty in the container seems to urge gcc into colorize the output, but the escape chars will clutter the report once turned into email replies on patchew. Move -t to debug mode.

I certainly improves my Emacs compilation-mode buffer when applied:

Quoted 11 lines
---
 tests/docker/Makefile.include | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tests/docker/Makefile.include +0 -0
index 6f9ea196a7..ab939f2bec 100644
@@ -134,10 +134,10 @@ docker-run: docker-qemu-src
 			"  COPYING $(EXECUTABLE) to $(IMAGE)"))
 	$(call quiet-command,						\

tests/docker/Makefile.include docker-run: docker-qemu-src · line 143

Quoted 10 lines
tests/docker/Makefile.include +2 -2
 		$(SRC_PATH)/tests/docker/docker.py run 			\
-			$(if $(NOUSER),,-u $(shell id -u)) -t 		\
+			$(if $(NOUSER),,-u $(shell id -u)) 		\
 			--security-opt seccomp=unconfined		\
 			$(if $V,,--rm) 					\
-			$(if $(DEBUG),-i,)				\
+			$(if $(DEBUG),-ti,)				\
 			$(if $(NETWORK),$(if $(subst $(NETWORK),,1),--net=$(NETWORK)),--net=none) \
 			-e TARGET_LIST=$(TARGET_LIST) 			\
 			-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \

--
Alex Bennée

author
#2 lore raw
Quoted 7 lines · Alex Bennée
Quoted 4 lines · Fam Zheng

The existence of tty in the container seems to urge gcc into colorize the output, but the escape chars will clutter the report once turned into email replies on patchew. Move -t to debug mode.

Quoted 6 lines
Quoted 2 lines

I certainly improves my Emacs compilation-mode buffer when applied:

Nice, thanks! I'll send a pull request soon.

Fam