From 7b42974b5bf20d9db8e788e9d6817004556d660d Mon Sep 17 00:00:00 2001 From: Haixiao Yan Date: Fri, 19 Sep 2025 15:03:56 +0800 Subject: [PATCH] fail2ban: use putao.unittest.TestRunner for ptest output Switch the test runner from unittest's default TextTestRunner to putao.unittest.TestRunner (provided by unittest-automake-output) so that results are reported in Automake-compatible PASS/FAIL format. This enables ptest-runner to correctly parse and summarize individual test results. Upstream-Status: Pending Signed-off-by: Haixiao Yan --- bin/fail2ban-testcases | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/fail2ban-testcases b/bin/fail2ban-testcases index 48aae4b5ffdc..20db4a01a3d6 100755 --- a/bin/fail2ban-testcases +++ b/bin/fail2ban-testcases @@ -28,7 +28,7 @@ import logging import os import sys import time -import unittest +import putao.unittest # Check if local fail2ban module exists, and use if it exists by # modifying the path. This is done so that tests can be used in dev @@ -63,7 +63,7 @@ tests = gatherTests(regexps, opts) # # Run the tests # -testRunner = unittest.TextTestRunner(verbosity=verbosity) +testRunner = putao.unittest.TestRunner() tests_results = testRunner.run(tests) -- 2.34.1