diff options
author | Zachary Turner <zturner@google.com> | 2018-12-01 00:22:21 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-12-01 00:22:21 +0000 |
commit | ba968c0d1d849d0598ebb2dbcdbace97f0709a29 (patch) | |
tree | 0adb998fa731bdb6749dde219b171db35a675c37 /lldb/lit/SymbolFile/NativePDB/source-list.cpp | |
parent | e5664b15593d6e0302e89d96fd62b39b407eeff9 (diff) | |
download | bcm5719-llvm-ba968c0d1d849d0598ebb2dbcdbace97f0709a29.tar.gz bcm5719-llvm-ba968c0d1d849d0598ebb2dbcdbace97f0709a29.zip |
[lit] Add a generic build script with a lit substitution.
This adds a script called build.py as well as a lit substitution
called %build that we can use to invoke it. The idea is that
this allows a lit test to build test inferiors without having
to worry about architecture / platform specific differences,
command line syntax, finding / configurationg a proper toolchain,
and other issues. They can simply write something like:
%build --arch=32 -o %t.exe %p/Inputs/foo.cpp
and it will just work. This paves the way for being able to
run lit tests with multiple configurations, platforms, and
compilers with a single test.
Differential Revision: https://reviews.llvm.org/D54914
llvm-svn: 348058
Diffstat (limited to 'lldb/lit/SymbolFile/NativePDB/source-list.cpp')
-rw-r--r-- | lldb/lit/SymbolFile/NativePDB/source-list.cpp | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/lldb/lit/SymbolFile/NativePDB/source-list.cpp b/lldb/lit/SymbolFile/NativePDB/source-list.cpp index 36cf5f75ebe..6b749b082e3 100644 --- a/lldb/lit/SymbolFile/NativePDB/source-list.cpp +++ b/lldb/lit/SymbolFile/NativePDB/source-list.cpp @@ -2,8 +2,7 @@ // REQUIRES: lld // Test that we can set display source of functions. -// RUN: %clang_cl /Z7 /GS- /GR- /c /Fo%t.obj -- %s -// RUN: lld-link /DEBUG /nodefaultlib /entry:main /OUT:%t.exe /PDB:%t.pdb -- %t.obj +// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \ // RUN: %p/Inputs/source-list.lldbinit | FileCheck %s @@ -27,17 +26,17 @@ int main(int argc, char **argv) { // CHECK: (lldb) source list -n main // CHECK: File: {{.*}}source-list.cpp -// CHECK: 11 -// CHECK: 12 // Some context lines before -// CHECK: 13 // the function. +// CHECK: 10 +// CHECK: 11 // Some context lines before +// CHECK: 12 // the function. +// CHECK: 13 // CHECK: 14 -// CHECK: 15 -// CHECK: 16 int main(int argc, char **argv) { -// CHECK: 17 // Here are some comments. -// CHECK: 18 // That we should print when listing source. -// CHECK: 19 return 0; -// CHECK: 20 } -// CHECK: 21 -// CHECK: 22 // Some context lines after -// CHECK: 23 // the function. -// CHECK: 24 +// CHECK: 15 int main(int argc, char **argv) { +// CHECK: 16 // Here are some comments. +// CHECK: 17 // That we should print when listing source. +// CHECK: 18 return 0; +// CHECK: 19 } +// CHECK: 20 +// CHECK: 21 // Some context lines after +// CHECK: 22 // the function. +// CHECK: 23 |