[libcxx-commits] [compiler-rt] [libcxx] [llvm] [utils] revamp options controlling lit's output (PR #167192)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 10 09:49:20 PST 2025
================
@@ -15,6 +15,59 @@ class TestOrder(enum.Enum):
SMART = "smart"
+ at enum.unique
+class TestOutputLevel(enum.IntEnum):
+ OFF = 0
+ FAILED = 1
+ ALL = 2
+
+ @classmethod
+ def create(cls, value):
+ if value == "off":
+ return cls.OFF
+ if value == "failed":
+ return cls.FAILED
+ if value == "all":
+ return cls.ALL
+ raise ValueError(f"invalid output level {repr(value)} of type {type(value)}")
+
+
+class TestOutputAction(argparse.Action):
+ def __init__(self, option_strings, dest, **kwargs):
+ super().__init__(option_strings, dest, nargs=None, **kwargs)
+
+ def __call__(self, parser, namespace, value, option_string=None):
+ TestOutputAction.setOutputLevel(namespace, self.dest, value)
+
+ @classmethod
+ def setOutputLevel(cls, namespace, dest, value):
+ setattr(namespace, dest, value)
+ if dest == "test_output" and TestOutputLevel.create(
----------------
ldionne wrote:
Not your fault, but this is really hard to read due to the 78 column limit we impose upon ourselves. I really dislike that formatting choice.
No action needed, I just wanted to complain.
https://github.com/llvm/llvm-project/pull/167192
More information about the libcxx-commits
mailing list