[llvm] [llvm-debuginfod] Update tests to work with internal shell (PR #158141)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 12:40:48 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-debuginfo
Author: Aiden Grossman (boomanaiden154)
<details>
<summary>Changes</summary>
This patch updates the llvm-debuginfod tests to work with the lit internal shell. One test was missing env before environment variables and another was using a brace expansion.
---
Full diff: https://github.com/llvm/llvm-project/pull/158141.diff
2 Files Affected:
- (modified) llvm/test/tools/llvm-debuginfod-find/cache.test (+3-2)
- (modified) llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test (+4-4)
``````````diff
diff --git a/llvm/test/tools/llvm-debuginfod-find/cache.test b/llvm/test/tools/llvm-debuginfod-find/cache.test
index eae341f3eb299..66af974a2596d 100644
--- a/llvm/test/tools/llvm-debuginfod-find/cache.test
+++ b/llvm/test/tools/llvm-debuginfod-find/cache.test
@@ -2,9 +2,10 @@ REQUIRES: curl
UNSUPPORTED: system-windows
RUN: rm -rf %t/*
-RUN: mkdir -p %t/buildid/012345678901234{5,6}
+RUN: mkdir -p %t/buildid/0123456789012345
+RUN: mkdir -p %t/buildid/0123456789012346
RUN: echo 'f' > %t/buildid/0123456789012345/debuginfo
-RUN: cp %t/buildid/012345678901234{5,6}/debuginfo
+RUN: cp %t/buildid/0123456789012345/debuginfo %t/buildid/0123456789012346/debuginfo
RUN: mkdir %t/cache
RUN: env DEBUGINFOD_CACHE_PATH=%t/cache DEBUGINFOD_URLS=file://%t \
RUN: llvm-debuginfod-find --debuginfo 0123456789012345 > /dev/null
diff --git a/llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test b/llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test
index edeae375a5079..c32c7b75e79c1 100644
--- a/llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test
+++ b/llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test
@@ -13,20 +13,20 @@
# RUN: rm -rf %t
# RUN: mkdir %t
# # Query the debuginfod server for artifacts
-# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-cmd 'llvm-debuginfod -v -c 3 %S/Inputs' \
+# RUN: env DEBUGINFOD_CACHE_PATH=%t %python %s --server-cmd 'llvm-debuginfod -v -c 3 %S/Inputs' \
# RUN: --tool-cmd 'llvm-debuginfod-find --dump --executable 2c39b7557c50162aaeb5a3148c9f76e6e46012e3' | \
# RUN: diff - %S/Inputs/main.exe
-# RUN: DEBUGINFOD_CACHE_PATH=%t %python %s --server-cmd 'llvm-debuginfod -v -c 3 %S/Inputs' \
+# RUN: env DEBUGINFOD_CACHE_PATH=%t %python %s --server-cmd 'llvm-debuginfod -v -c 3 %S/Inputs' \
# RUN: --tool-cmd 'llvm-debuginfod-find --dump --debuginfo 2c39b7557c50162aaeb5a3148c9f76e6e46012e3' | \
# RUN: diff - %S/Inputs/main-debug.exe
# Debuginfod server does not yet support source files
# # The artifacts should still be present in the cache without needing to query
# # the server.
-# RUN: DEBUGINFOD_CACHE_PATH=%t llvm-debuginfod-find --dump \
+# RUN: env DEBUGINFOD_CACHE_PATH=%t llvm-debuginfod-find --dump \
# RUN: --executable 2c39b7557c50162aaeb5a3148c9f76e6e46012e3 | \
# RUN: diff - %S/Inputs/main.exe
-# RUN: DEBUGINFOD_CACHE_PATH=%t llvm-debuginfod-find --dump \
+# RUN: env DEBUGINFOD_CACHE_PATH=%t llvm-debuginfod-find --dump \
# RUN: --debuginfo 2c39b7557c50162aaeb5a3148c9f76e6e46012e3 | \
# RUN: diff - %S/Inputs/main-debug.exe
``````````
</details>
https://github.com/llvm/llvm-project/pull/158141
More information about the llvm-commits
mailing list