[llvm] [llvm-debuginfod] Update tests to work with internal shell (PR #158141)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 12:40:15 PDT 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/158141
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.
>From c2e0ea45676cecb873750f2fb8f25f1c395ef800 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Thu, 11 Sep 2025 19:37:50 +0000
Subject: [PATCH] [llvm-debuginfod] Update tests to work with internal shell
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.
---
llvm/test/tools/llvm-debuginfod-find/cache.test | 5 +++--
llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test | 8 ++++----
2 files changed, 7 insertions(+), 6 deletions(-)
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
More information about the llvm-commits
mailing list