Skip to content

Commit 2dea832

Browse files
committed
[BOLT][test] Add missing stderr redirections
BOLT-ERROR and BOLT-WARNING messages are output to stderr which is not captured by piping to FileCheck. Redirect stderr to stdout to fix that in tests. Reviewed By: #bolt, maksfb Differential Revision: https://reviews.llvm.org/D156340
1 parent 161c0d5 commit 2dea832

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

bolt/test/X86/issue26.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
88
# RUN: %s -o %t.o
99
# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
10-
# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \
10+
# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out 2>&1 \
1111
# RUN: | FileCheck %s
1212

1313
# CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0

bolt/test/X86/issue26.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This reproduces issue 26 from our github repo
22

33
# RUN: yaml2obj %p/Inputs/issue26.yaml &> %t.exe
4-
# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out \
4+
# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out 2>&1 \
55
# RUN: | FileCheck %s
66

77
CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB0

bolt/test/runtime/X86/exceptions-instrumentation.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN: %t.exc arg1 arg2 arg3
99

1010
RUN: llvm-bolt %t_exc_split -o %t.exc.bolted --data %t.fdata \
1111
RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
12-
RUN: --split-functions --split-eh=1 \
12+
RUN: --split-functions --split-eh=1 2>&1 \
1313
RUN: | FileCheck --check-prefix=EXCEPTIONS %s
1414
EXCEPTIONS-NOT: invalid (possibly stale) profile
1515

bolt/test/runtime/meta-merge-fdata.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ CHECK-FDATA: 0 [unknown] 0 1 _start 0 0 1
2222
# Check that BOLT works with this profile
2323
RUN: llvm-bolt merge-fdata -o %t.bolt --data %t.fdata1 \
2424
RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
25-
RUN: --split-functions \
25+
RUN: --split-functions 2>&1 \
2626
RUN: | FileCheck %s --check-prefix=CHECK-BOLT1
2727
CHECK-BOLT1-NOT: invalid (possibly stale) profile
2828

@@ -44,7 +44,7 @@ RUN: cmp %t.fdata.base %t.fdata.inst
4444
# Optimize using merged fdata
4545
RUN: llvm-bolt merge-fdata -o %t.opt --data %t.fdata.base \
4646
RUN: --reorder-blocks=ext-tsp --reorder-functions=hfsort+ \
47-
RUN: --split-functions \
47+
RUN: --split-functions 2>&1 \
4848
RUN: | FileCheck %s --check-prefix=CHECK-BOLT2
4949
CHECK-BOLT2-NOT: invalid (possibly stale) profile
5050

0 commit comments

Comments
 (0)