From 8a475307bd2fdc1a414d7f0d72c6d1a40e831b3d Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Tue, 24 Apr 2018 18:43:25 +0000 Subject: [lit] Report line number for failed RUN command When debugging test failures with -vv (or -v in the case of the internal shell), this makes it easier to locate the RUN line that failed. For example, clang's test/Driver/linux-ld.c has 892 total RUN lines, and clang's test/Driver/arm-cortex-cpus.c has 424 RUN lines after concatenation for line continuations. When reading the generated shell script, this also makes it easier to locate the RUN line that produced each command. To support reporting RUN line numbers in the case of the internal shell, this patch extends the internal shell to support the null command, ":", except pipelines are not supported. Reviewed By: asmith, delcypher Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 330755 --- llvm/docs/CommandGuide/lit.rst | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/docs/CommandGuide/lit.rst') diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst index fbe1a9ab184..11337696eb5 100644 --- a/llvm/docs/CommandGuide/lit.rst +++ b/llvm/docs/CommandGuide/lit.rst @@ -85,6 +85,8 @@ OUTPUT OPTIONS Echo all commands to stdout, as they are being executed. This can be valuable for debugging test failures, as the last echoed command will be the one which has failed. + To help you find the source RUN line, :program:`lit` inserts a no-op ``:`` + command with argument ``'RUN: at line N'`` before each command pipeline. This option implies ``--verbose``. .. option:: -a, --show-all -- cgit v1.2.3