internal/rosa/package/meson: respect CLICOLOR_FORCE
Test / Create distribution (push) Successful in 1m17s
Test / Sandbox (push) Successful in 3m22s
Test / Hakurei (push) Successful in 6m25s
Test / Sandbox (race detector) (push) Successful in 7m47s
Test / Hakurei (race detector) (push) Successful in 10m39s
Test / ShareFS (push) Successful in 14m12s
Test / Flake checks (push) Successful in 1m37s
Test / Create distribution (push) Successful in 1m17s
Test / Sandbox (push) Successful in 3m22s
Test / Hakurei (push) Successful in 6m25s
Test / Sandbox (race detector) (push) Successful in 7m47s
Test / Hakurei (race detector) (push) Successful in 10m39s
Test / ShareFS (push) Successful in 14m12s
Test / Flake checks (push) Successful in 1m37s
Upstream had ticket and patch available since 2017, still unmerged and refuses to support the environment variable, so patch it in. This also strips out the variable for test execution to work around buggy test suites like glib. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -9,6 +9,10 @@ package meson {
|
|||||||
tag = version;
|
tag = version;
|
||||||
checksum = "9AMilGxTOVqPA2DaGMASyuVs1BeTzgDZ0NH2oSYoRZk846ApvfOBa4cc18XEEK7M";
|
checksum = "9AMilGxTOVqPA2DaGMASyuVs1BeTzgDZ0NH2oSYoRZk846ApvfOBa4cc18XEEK7M";
|
||||||
};
|
};
|
||||||
|
patches = [
|
||||||
|
"respect-colour.patch",
|
||||||
|
"test-strip-colour.patch",
|
||||||
|
];
|
||||||
|
|
||||||
env = [
|
env = [
|
||||||
"CMAKE_MAKE_PROGRAM=ninja",
|
"CMAKE_MAKE_PROGRAM=ninja",
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
|
||||||
|
index e1d998a5d..83d6cf9d2 100644
|
||||||
|
--- a/mesonbuild/mlog.py
|
||||||
|
+++ b/mesonbuild/mlog.py
|
||||||
|
@@ -404,6 +404,8 @@ class _Logger:
|
||||||
|
_colorize_console = os.isatty(output.fileno()) and _windows_ansi()
|
||||||
|
else:
|
||||||
|
_colorize_console = os.isatty(output.fileno()) and os.environ.get('TERM', 'dumb') != 'dumb'
|
||||||
|
+ if os.environ.get('CLICOLOR_FORCE', '') != '':
|
||||||
|
+ _colorize_console = True
|
||||||
|
except Exception:
|
||||||
|
_colorize_console = False
|
||||||
|
output.colorize_console = _colorize_console # type: ignore
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
|
||||||
|
index 0661fa529..34ab36aa9 100644
|
||||||
|
--- a/mesonbuild/mtest.py
|
||||||
|
+++ b/mesonbuild/mtest.py
|
||||||
|
@@ -1817,6 +1817,8 @@ class TestHarness:
|
||||||
|
test.exe_wrapper and test.exe_wrapper.found()):
|
||||||
|
env['MESON_EXE_WRAPPER'] = join_args(test.exe_wrapper.get_command())
|
||||||
|
env['MESON_TEST_ITERATION'] = str(iteration + 1)
|
||||||
|
+ env.pop('CLICOLOR_FORCE')
|
||||||
|
+ env.pop('FORCE_COLOR')
|
||||||
|
return SingleTestRunner(test, env, name, options)
|
||||||
|
|
||||||
|
def process_test_result(self, result: TestRun) -> None:
|
||||||
Reference in New Issue
Block a user