llvm.org GIT mirror llvm / 929163d
Fix llvm-xray tests to avoid subshells We already uses pipefail to detect failure of a redirected command, so the "|| echo failure" construct was unnecessary. These tests run and pass on Windows now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312747 91177308-0d34-0410-b5e6-96231b3b80d8 Reid Kleckner 2 years ago
2 changed file(s) with 5 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
None # The redirects used in the commands to FileCheck against stderr cannot be used
1 # with a windows test.
2 #
3 # UNSUPPORTED: windows
4
5 #RUN: (llvm-xray stack %s 2>&1 || echo "Checking Command Failed") | FileCheck %s
0 # RUN: not llvm-xray stack %s 2>&1 | FileCheck %s
61 ---
72 header:
83 version: 1
138 records:
149 ...
1510 # CHECK: llvm-xray: No instrumented calls were accounted in the input file.
16 # CHECK: Checking Command Failed
1711 # CHECK-NOT: {{[0-9A-Z]+}}
None # The redirects used in the commands to FileCheck against stderr cannot be used
1 # with a windows test.
2 #
3 # UNSUPPORTED: windows
4
5 #RUN: (llvm-xray stack %s 2>&1 1>&- || echo "Check Command Failed") | FileCheck --check-prefix HALT %s
6 #RUN: (llvm-xray stack -k %s 2>&1 && echo "Check Command Succeeded") | FileCheck --check-prefix KEEP-GOING-SUCCEEDS %s
7 #RUN: llvm-xray stack -k %s | FileCheck --check-prefix KEEP-GOING %s
0 # RUN: not llvm-xray stack %s 2>&1 | FileCheck --check-prefix HALT %s
1 # RUN: llvm-xray stack -k %s 2>&1 | FileCheck --check-prefix KEEP-GOING-SUCCEEDS %s
2 # RUN: llvm-xray stack -k %s | FileCheck --check-prefix KEEP-GOING %s
83 ---
94 header:
105 version: 1
2318 - { type: 1, func-id: 1, cpu: 1, thread: 111, kind: function-exit, tsc: 10775 }
2419 ...
2520
26 #HALT: llvm-xray: Found record {FuncId: "#4", ThreadId: "111", RecordType: "Fn Exit"} with no matching function entry
27 #HALT: Check Command Failed
21 # HALT: llvm-xray: Found record {FuncId: "#4", ThreadId: "111", RecordType: "Fn Exit"} with no matching function entry
2822 #KEEP-GOING-SUCCEEDS: Found record {FuncId: "#4", ThreadId: "111", RecordType: "Fn Exit"} with no matching function entry
29 #KEEP-GOING-SUCCEEDS: Check Command Succeeded
3023 #KEEP-GOING: Unique Stacks: 2
3124 # Note the interesting case here that the stack { fn-1 } is a prefix of { fn-1, fn-2, fn-3 } but they
3225 # are still counted as unique stacks.