From dfa6c20f4b4c2c2953962a924a0de5fb92418d1f Mon Sep 17 00:00:00 2001 From: George Karpenkov Date: Thu, 13 Jul 2017 19:26:27 +0000 Subject: [lit] add a -vv option to echo all executed commands. Debugging LIT scripts can be rather painful, as LIT directly does not specify which line has failed. Rather, FileCheck is expected to report the failing location, but it can be often ambiguous if multiple commands are tested against the same prefix. This change adds a -vv option, which echoes all output. Then detecting the error becomes straightforward: last printed line is the failing one. Of course, it could be desired to try to get failing line number directly from bash, but it involves excessive hacks on older bash versions (cf. https://stackoverflow.com/questions/24398691/how-to-get-the-real-line-number-of-a-failing-bash-command) Differential Revision: https://reviews.llvm.org/D35330 llvm-svn: 307938 --- llvm/docs/CommandGuide/lit.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'llvm/docs/CommandGuide/lit.rst') diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst index b4d15ef57b7..fbe1a9ab184 100644 --- a/llvm/docs/CommandGuide/lit.rst +++ b/llvm/docs/CommandGuide/lit.rst @@ -80,6 +80,13 @@ OUTPUT OPTIONS Show more information on test failures, for example the entire test output instead of just the test result. +.. option:: -vv, --echo-all-commands + + 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. + This option implies ``--verbose``. + .. option:: -a, --show-all Show more information about all tests, for example the entire test -- cgit v1.2.3