Skip to content

Commit 1896e51

Browse files
author
Kevin Frei
committed
Positive tests only run if we have libcurl
1 parent d5ea702 commit 1896e51

10 files changed

+14
-9
lines changed

lldb/test/Shell/Debuginfod/okdstrip-positive-a.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 2a:
44
# A stripped binary, with an "-only-keep-debug" symbols file.

lldb/test/Shell/Debuginfod/okdstrip-positive-b.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 2b:
44
# A stripped binary, with an "-only-keep-debug" symbols file.

lldb/test/Shell/Debuginfod/split-okdstrip-positive.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 5:
44
# * A stripped, split binary, with --add-gnu-debuglink symbol file where

lldb/test/Shell/Debuginfod/split-positive.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 3:
44
# * A split-dwarf binary with a Debuginfod-hosted .dwp file.
@@ -25,6 +25,6 @@
2525
# CHECK-NEXT: Type: "dwo"
2626
# CHECK-NEXT: Dwo ID{{.*}}
2727
# CHECK-NEXT: {{[- ]+}}
28-
# The cache key is stable, so mandating it's location verifies it was cached
29-
# The '.tmp' (sort of) ensures the cache is our private cache, not the system cache
28+
# The cache key is stable, so mandating it's location verifies it was cached.
29+
# The '.tmp' (sort of) ensures the cache is our private cache, not the system cache.
3030
# CHECK-NEXT: {{0x[0-9a-f]+.* +}}/{{.*}}.tmp/cache/llvmcache-6559017670391320133{{ *$}}

lldb/test/Shell/Debuginfod/split-strip-positive.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 4:
44
# * A stripped, split binary, with the unstripped binary and .dwp file

lldb/test/Shell/Debuginfod/strip-positive-a.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 1a:
44
# * A plain stripped binary

lldb/test/Shell/Debuginfod/strip-positive-b.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# REQUIRES: system-linux && native && target-x86_64
1+
# REQUIRES: curl && system-linux && native && target-x86_64
22

33
# Scenario 1b:
44
# * A plain stripped binary

lldb/test/Shell/lit.cfg.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ def calculate_arch_features(arch_string):
144144
if config.lldb_system_debugserver:
145145
config.available_features.add("system-debugserver")
146146

147+
if config.llvm_enable_curl:
148+
config.available_features.add("curl")
149+
147150
if config.have_lldb_server:
148151
config.available_features.add("lldb-server")
149152

lldb/test/Shell/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ config.python_executable = "@Python3_EXECUTABLE@"
1919
config.have_zlib = @LLVM_ENABLE_ZLIB@
2020
config.objc_gnustep_dir = "@LLDB_TEST_OBJC_GNUSTEP_DIR@"
2121
config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
22+
config.llvm_enable_curl = @LLVM_ENABLE_CURL@
2223
config.host_triple = "@LLVM_HOST_TRIPLE@"
2324
config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
2425
config.lldb_enable_python = @LLDB_ENABLE_PYTHON@

llvm/lib/Debuginfod/Debuginfod.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ Expected<std::string> getCachedOrDownloadDebuginfo(BuildIDRef ID) {
158158
std::string UrlPath = getDebuginfodDebuginfoUrlPath(ID);
159159
return getCachedOrDownloadArtifact(getDebuginfodCacheKey(UrlPath), UrlPath);
160160
}
161+
161162
// General fetching function.
162163
Expected<std::string> getCachedOrDownloadArtifact(StringRef UniqueKey,
163164
StringRef UrlPath) {

0 commit comments

Comments
 (0)