mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
dd1fd5b646
Without this patch, `FILECHECK_OPTS` isn't propagated to FileCheck's test suite so that `FILECHECK_OPTS` doesn't inadvertently affect test results by affecting the output of FileCheck calls under test. As a result, `FILECHECK_OPTS` is useless for debugging FileCheck's test suite. In `llvm/test/FileCheck/lit.local.cfg`, this patch provides a new subsitution, `%ProtectFileCheckOutput`, to address this problem for both `FILECHECK_OPTS` and the deprecated `FILECHECK_DUMP_INPUT_ON_FAILURE`. The rest of the patch uses `%ProtectFileCheckOutput` throughout the test suite Fixes PR40284. Reviewed By: probinson, thopre Differential Revision: https://reviews.llvm.org/D65121
47 lines
2.4 KiB
Plaintext
47 lines
2.4 KiB
Plaintext
; Test functionality of -D# option: numeric variables are defined to the right
|
|
; value and CHECK directives using them match as expected given the value set.
|
|
|
|
RUN: FileCheck -D#NUMVAL1=8 -D#NUMVAL2='NUMVAL1 + 4' -check-prefixes CHECKNUM1,CHECKNUM2 -input-file %s %s
|
|
|
|
RUN: %ProtectFileCheckOutput \
|
|
RUN: not FileCheck -D#NUMVAL1=7 -D#NUMVAL2=12 -check-prefix CHECKNUM1 -input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace -check-prefix NUMERRMSG1
|
|
|
|
RUN: %ProtectFileCheckOutput \
|
|
RUN: not FileCheck -D#NUMVAL1=8 -D#NUMVAL2=8 -check-prefix CHECKNUM2 -input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace -check-prefix NUMERRMSG2
|
|
|
|
RUN: %ProtectFileCheckOutput \
|
|
RUN: not FileCheck -D#NUMVAL1=8 -D#NUMVAL2=8 -check-prefix NUMNOT -input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace -check-prefixes NOT-NUMERRMSG1
|
|
|
|
RUN: %ProtectFileCheckOutput \
|
|
RUN: not FileCheck -D#NUMVAL1=7 -D#NUMVAL2=12 -check-prefix NUMNOT -input-file %s %s 2>&1 \
|
|
RUN: | FileCheck %s --strict-whitespace -check-prefixes NOT-NUMERRMSG2
|
|
RUN: FileCheck -D#NUMVAL1=7 -D#NUMVAL2=8 -check-prefixes NUMNOT -input-file %s %s
|
|
|
|
Numeric value #1 = 8
|
|
Numeric value #2 = 12
|
|
CHECKNUM1: Numeric value #1 = [[#NUMVAL1]]
|
|
CHECKNUM2: Numeric value #2 = [[#NUMVAL2]]
|
|
NUMNOT-NOT: Numeric value #1 = [[#NUMVAL1]]
|
|
NUMNOT-NOT: Numeric value #2 = [[#NUMVAL2]]
|
|
|
|
NUMERRMSG1: defines.txt:[[#@LINE-5]]:12: error: CHECKNUM1: expected string not found in input
|
|
NUMERRMSG1: defines.txt:1:1: note: scanning from here
|
|
NUMERRMSG1: defines.txt:1:1: note: with "NUMVAL1" equal to "7"
|
|
NUMERRMSG1: defines.txt:[[#@LINE-10]]:1: note: possible intended match here
|
|
|
|
NUMERRMSG2: defines.txt:[[#@LINE-9]]:12: error: CHECKNUM2: expected string not found in input
|
|
NUMERRMSG2: defines.txt:1:1: note: scanning from here
|
|
NUMERRMSG2: defines.txt:1:1: note: with "NUMVAL2" equal to "8"
|
|
NUMERRMSG2: defines.txt:[[#@LINE-14]]:1: note: possible intended match here
|
|
|
|
NOT-NUMERRMSG1: defines.txt:[[#@LINE-13]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
|
|
NOT-NUMERRMSG1: defines.txt:[[#@LINE-18]]:1: note: found here
|
|
NOT-NUMERRMSG1: defines.txt:[[#@LINE-19]]:1: note: with "NUMVAL1" equal to "8"
|
|
|
|
NOT-NUMERRMSG2: defines.txt:[[#@LINE-16]]:13: error: {{NUMNOT}}-NOT: excluded string found in input
|
|
NOT-NUMERRMSG2: defines.txt:[[#@LINE-21]]:1: note: found here
|
|
NOT-NUMERRMSG2: defines.txt:[[#@LINE-22]]:1: note: with "NUMVAL2" equal to "12"
|