* [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors
@ 2026-11-14 22:21 Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 2/3] Revert "support/testing: test_python.py: disable interpreter colors" Julien Olivain via buildroot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2026-11-14 22:21 UTC (permalink / raw)
To: buildroot; +Cc: Ricardo Martincoski, Julien Olivain
Buildroot commit [1] disabled colors of the Python interpreter (which
introduced automatic coloring in version 3.14). Those colors were
introducing Python test failures.
It appears that more an more programs, not only Python, are following
this trend to enable colors when programs are running interactively
on a terminal.
Disabling those colors by setting the NO_COLOR environment variable
is becoming common. See [2].
This commit sets the NO_COLOR=1 environment variable to globally
request to disable color in all runtime tests.
[1] https://gitlab.com/buildroot.org/buildroot/-/commit/3a6e2b4a0395f6e049cd847cf16406a4d0d998ad
[2] https://no-color.org/
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
support/testing/infra/emulator.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/support/testing/infra/emulator.py b/support/testing/infra/emulator.py
index d690949120..4171ddfe3b 100644
--- a/support/testing/infra/emulator.py
+++ b/support/testing/infra/emulator.py
@@ -160,6 +160,7 @@ class Emulator(object):
def connect_shell(self):
extra_init_cmd = " && ".join([
+ 'export NO_COLOR=1',
'export PAGER=cat',
'dmesg -n 1',
# Prevent the shell from wrapping the commands at 80 columns.
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 2/3] Revert "support/testing: test_python.py: disable interpreter colors"
2026-11-14 22:21 [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Julien Olivain via buildroot
@ 2026-11-14 22:21 ` Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 3/3] support/testing: test_systemd: remove unneeded NO_COLOR=1 Julien Olivain via buildroot
2026-11-15 9:54 ` [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2026-11-14 22:21 UTC (permalink / raw)
To: buildroot; +Cc: Ricardo Martincoski, Julien Olivain
We are now disabling colors for all runtime tests. Setting NO_COLOR in
test_python is no longer needed.
This reverts commit 3a6e2b4a0395f6e049cd847cf16406a4d0d998ad.
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
support/testing/tests/package/test_python.py | 3 ---
1 file changed, 3 deletions(-)
diff --git a/support/testing/tests/package/test_python.py b/support/testing/tests/package/test_python.py
index e815376d21..c9ecf9acda 100644
--- a/support/testing/tests/package/test_python.py
+++ b/support/testing/tests/package/test_python.py
@@ -17,9 +17,6 @@ class TestPythonBase(infra.basetest.BRTest):
kernel="builtin",
options=["-initrd", cpio_file])
self.emulator.login()
- # Disable Python colors for all Python tests, to make pexpect
- # pattern matching easier.
- self.assertRunOk("export NO_COLOR=1")
def version_test(self, version, timeout=-1):
cmd = self.interpreter + " --version 2>&1 | grep '^{}'".format(version)
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* [Buildroot] [PATCH 3/3] support/testing: test_systemd: remove unneeded NO_COLOR=1
2026-11-14 22:21 [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 2/3] Revert "support/testing: test_python.py: disable interpreter colors" Julien Olivain via buildroot
@ 2026-11-14 22:21 ` Julien Olivain via buildroot
2026-11-15 9:54 ` [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Julien Olivain via buildroot @ 2026-11-14 22:21 UTC (permalink / raw)
To: buildroot; +Cc: Ricardo Martincoski, Julien Olivain
Colors are now globally disabled for all runtime tests.
It is no longer needed to do it in tests, so this commit
removes this NO_COLOR=1.
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
support/testing/tests/init/test_systemd.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/support/testing/tests/init/test_systemd.py b/support/testing/tests/init/test_systemd.py
index 1112d5e269..35d5031d86 100644
--- a/support/testing/tests/init/test_systemd.py
+++ b/support/testing/tests/init/test_systemd.py
@@ -32,7 +32,7 @@ class InitSystemSystemdBase(InitSystemBase):
self.check_init("/lib/systemd/systemd")
# Test there is no tainted flag.
- output, ret = self.emulator.run("NO_COLOR=1 systemctl --no-pager status")
+ output, ret = self.emulator.run("systemctl --no-pager status")
self.assertEqual(ret, 0, f"'systemctl status' failed with exit code {ret}, with:\n{output}")
try:
# 'support-ended' tainted flag is only set based on the
--
2.56.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors
2026-11-14 22:21 [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 2/3] Revert "support/testing: test_python.py: disable interpreter colors" Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 3/3] support/testing: test_systemd: remove unneeded NO_COLOR=1 Julien Olivain via buildroot
@ 2026-11-15 9:54 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-15 9:54 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Ricardo Martincoski
On Sat, Nov 14, 2026 at 11:21:53PM +0100, Julien Olivain via buildroot wrote:
> Buildroot commit [1] disabled colors of the Python interpreter (which
> introduced automatic coloring in version 3.14). Those colors were
> introducing Python test failures.
>
> It appears that more an more programs, not only Python, are following
> this trend to enable colors when programs are running interactively
> on a terminal.
>
> Disabling those colors by setting the NO_COLOR environment variable
> is becoming common. See [2].
>
> This commit sets the NO_COLOR=1 environment variable to globally
> request to disable color in all runtime tests.
>
> [1] https://gitlab.com/buildroot.org/buildroot/-/commit/3a6e2b4a0395f6e049cd847cf16406a4d0d998ad
> [2] https://no-color.org/
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
Series applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-15 9:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-14 22:21 [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 2/3] Revert "support/testing: test_python.py: disable interpreter colors" Julien Olivain via buildroot
2026-11-14 22:21 ` [Buildroot] [PATCH 3/3] support/testing: test_systemd: remove unneeded NO_COLOR=1 Julien Olivain via buildroot
2026-11-15 9:54 ` [Buildroot] [PATCH 1/3] support/testing/infra/emulator.py: globally disable colors Thomas Petazzoni via buildroot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.