forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lit] Improve readability of failing scripts.
- This only applies to scripts executed by the _internal_ shell script interpreter. - This patch reworks the log to look more like a shell transcript, and be less verbose (but in the interest of calling attention to the important parts). Here is an example of the new format, for commands with/without failures and with/without output: ``` $ true $ echo hi hi $ false note: command had no output on stdout or stderr error: command failed with exit status 1 ``` git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271610 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
6 changed files
with
69 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# RUN: true | ||
# RUN: echo hi | ||
# RUN: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import lit.formats | ||
config.name = 'shtest-output-printing' | ||
config.suffixes = ['.txt'] | ||
config.test_format = lit.formats.ShTest(execute_external=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 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 | ||
# | ||
# END. | ||
|
||
# CHECK: -- Testing: | ||
|
||
# CHECK: FAIL: shtest-output-printing :: basic.txt | ||
# CHECK-NEXT: *** TEST 'shtest-output-printing :: basic.txt' FAILED *** | ||
# CHECK-NEXT: Script: | ||
# CHECK-NEXT: -- | ||
# CHECK: -- | ||
# CHECK-NEXT: Exit Code: 1 | ||
# | ||
# CHECK: Command Output | ||
# CHECK-NEXT: -- | ||
# CHECK-NEXT: $ "true" | ||
# CHECK-NEXT: $ "echo" "hi" | ||
# CHECK-NEXT: # command output: | ||
# CHECK-NEXT: hi | ||
# | ||
# CHECK: $ "false" | ||
# CHECK-NEXT: note: command had no output on stdout or stderr | ||
# CHECK-NEXT: error: command failed with exit status: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters