From 1a442c230b5b81b6d0d841a0c22d526806673648 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 16 Aug 2026 08:52:11 +0200 Subject: [PATCH] python3-glances: fix ptest args being consumed by GlancesMain's argv slicing tests/test_core.py does GlancesMain(args_begin_at=2) at module import time, slicing the real process sys.argv. Passing --automake on the pytest command line (rather than via PYTEST_ADDOPTS) shifted that slice and broke it; set it via PYTEST_ADDOPTS instead. Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-glances/run-ptest | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-python/recipes-devtools/python/python3-glances/run-ptest b/meta-python/recipes-devtools/python/python3-glances/run-ptest index f56ca03dca..5903768942 100644 --- a/meta-python/recipes-devtools/python/python3-glances/run-ptest +++ b/meta-python/recipes-devtools/python/python3-glances/run-ptest @@ -1,3 +1,6 @@ #!/bin/sh -pytest tests/test_core.py +# test_core.py does `GlancesMain(args_begin_at=2)` at module import time, +# slicing the real process sys.argv; passing --automake on the command line +# (rather than via PYTEST_ADDOPTS) shifts that slice and breaks it. +PYTEST_ADDOPTS="--automake" pytest tests/test_core.py