summaryrefslogtreecommitdiffstats
path: root/llvm/docs/CommandGuide/lit.rst
diff options
context:
space:
mode:
authorJoel E. Denny <jdenny.ornl@gmail.com>2018-05-31 00:55:32 +0000
committerJoel E. Denny <jdenny.ornl@gmail.com>2018-05-31 00:55:32 +0000
commit31b373963f86e4fa8af9844c62b16c2f42354157 (patch)
tree0413c2587d249eaa4f5240763c7f5777e3c197bb /llvm/docs/CommandGuide/lit.rst
parentc6338679446a62d64c747531a8e11250dbedc8b0 (diff)
downloadbcm5719-llvm-31b373963f86e4fa8af9844c62b16c2f42354157.tar.gz
bcm5719-llvm-31b373963f86e4fa8af9844c62b16c2f42354157.zip
[lit] Report line number for failed RUN command
(Relands r333584, reverted in 333592.) 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. To support reporting RUN line numbers in the case of windows cmd.exe as the external shell, this patch extends -vv to set "echo on" instead of "echo off" in bat files. (Support for windows cmd.exe as a lit external shell will likely be dropped later, but I found out too late.) Reviewed By: delcypher, asmith, stella.stamenova, jmorse, lebedev.ri, rnk Differential Revision: https://reviews.llvm.org/D44598 llvm-svn: 333614
Diffstat (limited to 'llvm/docs/CommandGuide/lit.rst')
-rw-r--r--llvm/docs/CommandGuide/lit.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index fbe1a9ab184..0d39311152d 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -85,6 +85,10 @@ 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.
+ :program:`lit` normally inserts a no-op command (``:`` in the case of bash)
+ with argument ``'RUN: at line N'`` before each command pipeline, and this
+ option also causes those no-op commands to be echoed to stdout to help you
+ locate the source line of the failed command.
This option implies ``--verbose``.
.. option:: -a, --show-all
OpenPOWER on IntegriCloud