Skip to content

Commit

Permalink
[lldb/PDB] Make "native" pdb tests host-independent
Browse files Browse the repository at this point in the history
These test don't execute the binaries they build, and so they don't need
to build for the host. By hardcoding the target, we don't have do xfail
or skip them for targets which don't have the appropriate support in
clang(-cl).
  • Loading branch information
labath committed May 14, 2020
1 parent 2b2a961 commit eb50b64
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 42 deletions.
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
@@ -1,8 +1,8 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb

// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/ast-functions.lldbinit 2>&1 | FileCheck %s
Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
@@ -1,8 +1,8 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -GR- -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/ast-methods.lldbinit 2>&1 | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test various interesting cases for AST reconstruction.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/ast-types.lldbinit 2>&1 | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test various interesting cases for AST reconstruction.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/bitfields.lldbinit 2>&1 | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can set simple breakpoints using PDB on any platform.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/break-by-function.lldbinit | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can set simple breakpoints using PDB on any platform.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/break-by-line.lldbinit | FileCheck %s

Expand Down
@@ -1,8 +1,8 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/function-types-builtins.lldbinit | FileCheck %s

Expand Down
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can display function signatures with class types.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/function-types-classes.lldbinit | FileCheck %s

Expand Down
7 changes: 4 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
@@ -1,9 +1,10 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can display tag types.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \
// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/globals-classes.lldbinit | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Make sure we can read variables from BSS
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: llvm-readobj -s %t.exe | FileCheck --check-prefix=BSS %s
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/globals-bss.lldbinit 2>&1 | FileCheck %s
Expand Down
7 changes: 4 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
@@ -1,9 +1,10 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can display tag types.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \
// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/globals-fundamental.lldbinit | FileCheck %s

Expand Down
7 changes: 4 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
@@ -1,9 +1,10 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test various interesting cases for AST reconstruction.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 \
// RUN: -Xclang -fkeep-static-consts -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/nested-types.lldbinit 2>&1 | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can set display source of functions.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/source-list.lldbinit | FileCheck %s

Expand Down
6 changes: 3 additions & 3 deletions lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
@@ -1,9 +1,9 @@
// XFAIL: target-arm && linux-gnu
// clang-format off
// REQUIRES: lld
// REQUIRES: lld, x86

// Test that we can display tag types.
// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
// RUN: %clang_cl --target=x86_64-windows-msvc -GS- -Od -Z7 -c /Fo%t.obj -- %s
// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
// RUN: %p/Inputs/tag-types.lldbinit | FileCheck %s

Expand Down

0 comments on commit eb50b64

Please sign in to comment.