diff options
author | Daniel Dunbar <daniel@zuster.org> | 2016-06-07 16:13:40 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2016-06-07 16:13:40 +0000 |
commit | 1934108270bff50517b6b9c0978c7e52c449850f (patch) | |
tree | 04afb84653ac23224f93b352758eab7410e2100d /llvm/utils/lit/tests | |
parent | 422ea24d45c3c2903d82fd65c33a2b53efda36a6 (diff) | |
download | bcm5719-llvm-1934108270bff50517b6b9c0978c7e52c449850f.tar.gz bcm5719-llvm-1934108270bff50517b6b9c0978c7e52c449850f.zip |
[lit] Improve logging with file redirection.
- This will cause lit to automatically include the first 1K of data in
redirected output files when a command fails (previously if the command
failed, but the main point of the test was, say, a `FileCheck` later on, then
the log wasn't helpful in showing why the command failed).
llvm-svn: 272021
Diffstat (limited to 'llvm/utils/lit/tests')
-rw-r--r-- | llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt | 2 | ||||
-rw-r--r-- | llvm/utils/lit/tests/shtest-output-printing.py | 8 | ||||
-rw-r--r-- | llvm/utils/lit/tests/shtest-shell.py | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt b/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt index 1720c6097bd..4899c7e63db 100644 --- a/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt +++ b/llvm/utils/lit/tests/Inputs/shtest-output-printing/basic.txt @@ -1,3 +1,3 @@ # RUN: true # RUN: echo hi -# RUN: false +# RUN: wc missing-file &> %t.out diff --git a/llvm/utils/lit/tests/shtest-output-printing.py b/llvm/utils/lit/tests/shtest-output-printing.py index 1d5fc04ab81..24580b37f1f 100644 --- a/llvm/utils/lit/tests/shtest-output-printing.py +++ b/llvm/utils/lit/tests/shtest-output-printing.py @@ -1,7 +1,7 @@ # Check the various features of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-output-printing > %t.out -# RUN: FileCheck < %t.out %s +# RUN: FileCheck --input-file %t.out %s # # END. @@ -21,6 +21,8 @@ # CHECK-NEXT: # command output: # CHECK-NEXT: hi # -# CHECK: $ "false" -# CHECK-NEXT: note: command had no output on stdout or stderr +# CHECK: $ "wc" "missing-file" +# CHECK-NEXT: # redirected output from '{{.*}}/basic.txt.tmp.out': +# CHECK-NEXT: missing-file{{.*}} No such file or directory +# CHECK: note: command had no output on stdout or stderr # CHECK-NEXT: error: command failed with exit status: 1 diff --git a/llvm/utils/lit/tests/shtest-shell.py b/llvm/utils/lit/tests/shtest-shell.py index 379b040fc45..18b80cd7d08 100644 --- a/llvm/utils/lit/tests/shtest-shell.py +++ b/llvm/utils/lit/tests/shtest-shell.py @@ -1,7 +1,7 @@ # Check the internal shell handling component of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-shell > %t.out -# RUN: FileCheck < %t.out %s +# RUN: FileCheck --input-file %t.out %s # # END. |