brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 5ba9d2f Raw
45 lines · python
1# Check that we can inject preamble commands at the beginning of a ShTest.2#3# For one case, check the execution trace as these preamble commands have4# "preamble command" instead of the usual "{{RUN}}: at line N".5 6# RUN: %{lit} %{inputs}/shtest-inject/test-empty.txt --show-all | FileCheck --check-prefix=CHECK-TEST1 %s7#8#       CHECK-TEST1: Command Output (stdout):9#  CHECK-TEST1-NEXT: --10#  CHECK-TEST1-NEXT: # preamble command line11#  CHECK-TEST1-NEXT: echo "THIS WAS"12#  CHECK-TEST1-NEXT: # executed command: echo 'THIS WAS'13#  CHECK-TEST1-NEXT: # .---command stdout{{-*}}14#  CHECK-TEST1-NEXT: # | THIS WAS15#  CHECK-TEST1-NEXT: # `---{{-*}}16#  CHECK-TEST1-NEXT: # preamble command line17#  CHECK-TEST1-NEXT: echo18#  CHECK-TEST1-NEXT: "INJECTED"19#  CHECK-TEST1-NEXT: # executed command: echo INJECTED20#  CHECK-TEST1-NEXT: # .---command stdout{{-*}}21#  CHECK-TEST1-NEXT: # | INJECTED22#  CHECK-TEST1-NEXT: # `---{{-*}}23# CHECK-TEST1-EMPTY:24#  CHECK-TEST1-NEXT: --25#26# CHECK-TEST1: Passed: 127 28# RUN: %{lit} %{inputs}/shtest-inject/test-one.txt --show-all | FileCheck --check-prefix=CHECK-TEST2 %s29#30# CHECK-TEST2: THIS WAS31# CHECK-TEST2: INJECTED32# CHECK-TEST2: IN THE FILE33#34# CHECK-TEST2: Passed: 135 36# RUN: %{lit} %{inputs}/shtest-inject/test-many.txt --show-all | FileCheck --check-prefix=CHECK-TEST3 %s37#38# CHECK-TEST3: THIS WAS39# CHECK-TEST3: INJECTED40# CHECK-TEST3: IN THE FILE41# CHECK-TEST3: IF IT WORKS42# CHECK-TEST3: AS EXPECTED43#44# CHECK-TEST3: Passed: 145