brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · aa2cbca Raw
30 lines · plain
1# RUN: rm -rf %t && mkdir -p %t/foo/bar/baz2# RUN: split-file %S/Inputs/relative.split %t/foo3# RUN: split-file %S/Inputs/hello.split %t/foo/bar4# RUN: mv %t/foo/bar/hello.py %t/foo/bar/baz5# RUN: echo 'command source %t/foo/bar/hello.in' >> %t/foo/zip.in6 7# RUN: %lldb --script-language python \8# RUN:    -o 'command source %t/foo/magritte.in' \9# RUN:    -o 'command source %t/foo/zip.in' \10# RUN:    -o 'command source %t/foo/magritte.in' \11# RUN;    -o 'zip' \12# RUN:    -o 'hello'13# RUN     -o 'magritte' 2>&1 | FileCheck %s14 15# The first time importing 'magritte' fails because we didn't pass -c.16# CHECK: ModuleNotFoundError: No module named 'magritte'17# CHECK-NOT: Ceci n'est pas une pipe18# CHECK: 9512619# CHECK: Hello, World!20# The second time importing 'magritte' works, even without passing -c because21# we added '%t/foo' to the Python path when importing 'zip'.22# CHECK: Ceci n'est pas une pipe23 24# Cannot use `-o` here because the driver puts the commands in a file and25# sources them.26command script import -c %t/foo/magritte.py27quit28# RUN: cat %s | %lldb --script-language python 2>&1 | FileCheck %s --check-prefix ERROR29# ERROR: error: command script import -c can only be specified from a command file30