Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion ingest_mdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from core import Tester

CONSOLE_WIDTH = None
NONINTERACTIVE = False
BOLD = '\033[1m'
RED = '\033[31m'
GREEN = '\033[32m'
Expand Down Expand Up @@ -55,6 +56,8 @@
help='disable test, can be specified multiple times')
parser.add_argument('-t', '--test', nargs='+',
help='run only specified tests. Note: full test name is needed, e.g. "patch/pylint" or "series/ynl" not just "pylint" or "ynl"')
parser.add_argument('--noninteractive', action='store_true',
help='Avoid printing terminal control characters to output which is not a terminal')
parser.add_argument('--dbg-print-run', help='print results of previous run')


Expand Down Expand Up @@ -99,7 +102,9 @@ def __print_summary_result(offset, files, full_path):
print(RED + "FAIL " + RESET + f"({retcode})", end='')
failed = True

if failed or (desc and len(desc) + offset > get_console_width()):
wrap_on_width = not NONINTERACTIVE and \
(desc and len(desc) + offset > get_console_width())
if failed or wrap_on_width:
print("\n", end=" ")
if desc:
print("", desc, end='')
Expand Down Expand Up @@ -271,6 +276,16 @@ def main():

args = parser.parse_args()

global NONINTERACTIVE
if args.noninteractive:
NONINTERACTIVE = True
global BOLD, RED, GREEN, YELLOW, RESET
BOLD = ''
RED = ''
GREEN = ''
YELLOW = ''
RESET = ''

args.tree = os.path.abspath(args.tree)

if args.test:
Expand Down